TT#104162 Improve 'Invoice template' SVG editor layout for v1 and v2

Do not show "Back" button on v2 also put all buttons in one line on v1
(it will improve free space allocation on the page allowing users
focusing on editing the invoice template inside SVG editor).

Change-Id: Ibe66340cda5c679df23ff3810b917d0908668304
mr11.0
Alexander Lutay 3 years ago committed by Oleksandr Lutai
parent 3b588057e9
commit 4e181efa92

@ -15,19 +15,10 @@
[% PROCESS "invoice/uri_wrapper_js.tt" %]
<div class="row">
<span>
<a class="btn btn-primary btn-large" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
</div>
<div class="row" id="messages">
[%PROCESS 'helpers/ajax_messages.tt' -%]
</div>
<div class="ngcp-separator"></div>
[% back_created = 1 -%]
<div id="template_editor_form">
[%PROCESS 'invoice/template_editor_form.tt' %]
</div>

@ -6,16 +6,22 @@ function formSerialize(){
return $('form[id=template_editor]').serialize();
}
</script>
<form name="template_editor" id="template_editor" action="[% c.uri_for_action('/invoicetemplate/get_content_ajax', [tmpl.id]) -%]" class="form-horizontal" enctype="multipart/form-data" method="post">
[% UNLESS framed -%]
<span>
<a class="btn btn-primary btn-small" onclick="
saveTemplate({},
refreshMessagesAjax );void(0);"><i class="icon-download-alt"></i> [% c.loc('Save SVG')%]</a>
<a class="btn btn-primary btn-small" href="[% c.uri_for('/back') %]"><i class="icon-arrow-left"></i> [% c.loc('Back') %]</a>
</span>
[% back_created = 1 -%]
[% END -%]
<span>
<a class="btn btn-primary btn-small" target="_blank" href="[% c.uri_for_action('/invoicetemplate/preview_content', [ tmpl.id ]) %]"><i class="icon-eye-open"></i> [% c.loc('Preview as PDF')%]</a>
<a class="btn btn-primary btn-small" onclick="saveTemplate({}, refreshMessagesAjax );void(0);"><i class="icon-download-alt"></i>[% c.loc('Save SVG')%]</a>
</span>
<span>
<a class="btn btn-primary btn-small" target="_blank" href="[% c.uri_for_action('/invoicetemplate/preview_content', [ tmpl.id ]) %]"><i class="icon-eye-open"></i> [% c.loc('Preview as PDF')%]</a>
</span>
<span id="load_saved_control">
@ -33,6 +39,7 @@ function formSerialize(){
});
void(0);"><i class="icon-info-sign"></i> [% c.loc('Show Variables')%]</a>
</span>
<style>
#template_variables_help{
display:none;

Loading…
Cancel
Save