Bug 19641: (follow-up) Move patron templates to the footer
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-layout.tt
index 45a084d..402ea9e 100644 (file)
@@ -1,11 +1,23 @@
+[% BLOCK translate_label_types %]
+[%  SWITCH type %]
+[%   CASE 'BIB'    %]Biblio
+[%   CASE 'BARBIB' %]Barcode/Biblio
+[%   CASE 'BIBBAR' %]Biblio/Barcode
+[%   CASE 'ALT'    %]Alternating
+[%   CASE 'BAR'    %]Barcode
+[%  END %]
+[% END %]
     [% INCLUDE 'doc-head-open.inc' %]
-    <title>Koha &rsaquo; Tools &rsaquo; Labels</title>
+    <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Layouts &rsaquo; [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]</title>
     [% INCLUDE 'doc-head-close.inc' %]
-    <script type="text/JavaScript" language="JavaScript">
+    <script type="text/JavaScript">
         //<![CDATA[
             $(document).ready(function() {
                 $("input[name='layout_choice']").change( function() { layout_method() } );
                 layout_method();
+                $("#font").on("change",function(){
+                     checkOblique();
+                });
             });
             function layout_method() {
                 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
                     $('#layout_string').hide();
                 }
             }
+            function checkOblique() {
+                var font = document.getElementById("font");
+                var selectedfont = font.options[font.selectedIndex].value;
+                if ( selectedfont.match("I$") || selectedfont.match("O$") ) {
+                    document.getElementById("oblique_title").disabled = true;
+                } else {
+                    document.getElementById("oblique_title").disabled = false;
+                }
+            }
         //]]>
     </script>
 </head>
+[% BLOCK translate_justification_types %]
+[%  SWITCH type %]
+[%   CASE 'L' %]Left
+[%   CASE 'C' %]Center
+[%   CASE 'R' %]Right
+[%  END %]
+[% END %]
 <body id="labels_label-edit-layout" class="tools labels">
     [% INCLUDE 'header.inc' %]
     [% INCLUDE 'cat-search.inc' %]
     <div id="breadcrumbs">
         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
-        <a href="/cgi-bin/koha/labels/label-home.pl">Labels home</a> &rsaquo;
-        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage label layouts</a> &rsaquo;
-        [% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout
+        <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> &rsaquo;
+        <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a> &rsaquo;
+        [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %]
     </div>
     <div id="doc3" class="yui-t2">
         <div id="bd">
             <div id="yui-main">
                 <div class="yui-b">
+                    <div class="yui-g">
+                    [% INCLUDE 'labels-toolbar.inc' %]
+                        <div class="yui-u first">
+
+                        </div>
+                    </div>
                     <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
                         <fieldset class="rows">
-                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
+                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] label layout</legend>
                             <ol>
                                 <li>
-                                    <label for="layout_name">Layout name</label>
+                                    <label for="layout_name">Layout name</label>
                                     <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name %]" />
                                 </li>
                                 <li>
-                                    <label for="barcode_type">Choose barcode type (encoding)</label>
+                                    <label for="barcode_type">Choose barcode type (encoding)</label>
                                     <select name="barcode_type" id="barcode_type">
                                     [% FOREACH barcode_type IN barcode_types %]
                                     [% IF ( barcode_type.selected ) %]
                                     </select>
                                 </li>
                                 <li>
-                                    <label for="printing_type">Choose layout type</label>
+                                    <label for="printing_type">Choose layout type</label>
                                     <select name="printing_type" id="printing_type">
                                     [% FOREACH label_type IN label_types %]
                                     [% IF ( label_type.selected ) %]
-                                    <option value="[% label_type.type %]" selected="selected">[% label_type.name %]</option>
+                                    <option value="[% label_type.type %]" selected="selected">[% PROCESS translate_label_types type=label_type.type %]</option>
                                     [% ELSE %]
-                                    <option value="[% label_type.type %]">[% label_type.name %]</option>
+                                    <option value="[% label_type.type %]">[% PROCESS translate_label_types type=label_type.type %]</option>
                                     [% END %]
                                     [% END %]
                                     </select>
                                                     <p>Enter a comma separated list of fields to print.  You may include any <em>Koha field</em> or MARC subfield.</p>
                                                     <p>See online help for advanced options</p>
                                                     <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
+                                                    <p>Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code.</p>
                                                 </div>
                                             </fieldset></li>
                                                                                        </ol>
                                     </fieldset>
                                 </li>
                                 <li>
-                                    <label for="guidebox">Draw guide boxes</label>
+                                    <label for="guidebox">Draw guide boxes</label>
                                     [% IF ( guidebox ) %]
                                     <input type="checkbox" name="guidebox" id="guidebox" value="1"  checked="checked" />
                                     [% ELSE %]
                                     [% END %]
                                 </li>
                                 <li>
-                                    <label for="callnum_split">Split call numbers</label>
+                                    <label for="callnum_split">Split call numbers</label>
                                     [% IF ( callnum_split ) %]
                                     <input type="checkbox" name="callnum_split" id="callnum_split" value="1"  checked="checked" />
                                     [% ELSE %]
                                     [% END %]
                                 </li>
                                 <li>
-                                    <label for="text_justify">Text justification</label>
+                                    <label for="text_justify">Text justification</label>
                                     <select name="text_justify" id="text_justify">
                                         [% FOREACH text_justification_type IN text_justification_types %]
                                         [% IF ( text_justification_type.selected ) %]
-                                        <option value="[% text_justification_type.type %]" selected="selected">[% text_justification_type.name %]</option>
+                                        <option value="[% text_justification_type.type %]" selected="selected">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
                                         [% ELSE %]
-                                        <option value="[% text_justification_type.type %]">[% text_justification_type.name %]</option>
+                                        <option value="[% text_justification_type.type %]">[% PROCESS translate_justification_types type=text_justification_type.type %]</option>
                                         [% END %]
                                         [% END %]
                                     </select>
                                 </li>
                                 <li>
-                                    <label for="font">Font</label>
+                                    <label for="font">Font</label>
                                     <select name="font" id="font">
                                         [% FOREACH font_type IN font_types %]
                                         [% IF ( font_type.selected ) %]
                                     </select>
                                 </li>
                                 <li>
-                                    <label for="font_size">Font size</label>
+                                    <label for="font_size">Font size</label>
                                     <input type="text" name="font_size" id="font_size" size="2" value="[% font_size |html %]" />
                                 </li>
+                                <li>
+                                    <label for="oblique_title">Oblique title: </label>
+                                    [% IF ( oblique_title ) %]
+                                    <input type="checkbox" name="oblique_title" id="oblique_title" value="1"  checked="checked" />
+                                    [% ELSE %]
+                                    <input type="checkbox" name="oblique_title" id="oblique_title" value="1" />
+                                    [% END %]
+                                </li>
                             </ol>
                         </fieldset>
                         <fieldset class="action">
                 </div>
             </div>
             <div class="yui-b">
-                [% INCLUDE 'labels-menu.inc' %]
+              [% INCLUDE 'tools-menu.inc' %]
             </div>
         </div>
         [% INCLUDE 'intranet-bottom.inc' %]