Merge remote-tracking branch 'origin/new/bug_7016'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-edit-layout.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Labels</title>
3     [% INCLUDE 'doc-head-close.inc' %]
4     <script type="text/JavaScript" language="JavaScript">
5         //<![CDATA[
6             $(document).ready(function() {
7                 $("input[name='layout_choice']").change( function() { layout_method() } );
8                 layout_method();
9             });
10             function layout_method() {
11                 if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
12                     $('#layout_table').hide();
13                     $('#layout_string').show();
14                 } else {
15                     $('#layout_table').show();
16                     $('#layout_string').hide();
17                 }
18             }
19         //]]>
20     </script>
21 </head>
22 <body id="labels_label-edit-layout" class="tools labels">
23     [% INCLUDE 'header.inc' %]
24     [% INCLUDE 'cat-search.inc' %]
25     <div id="breadcrumbs">
26         <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
27         <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
28         <a href="/cgi-bin/koha/labels/label-home.pl">Labels home</a> &rsaquo;
29         <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage label layouts</a> &rsaquo;
30         [% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout
31     </div>
32     <div id="doc3" class="yui-t2">
33         <div id="bd">
34             <div id="yui-main">
35                 <div class="yui-b">
36                     <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
37                         <fieldset class="rows">
38                             <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
39                             <ol>
40                                 <li>
41                                     <label for="layout_name">Layout name</label>
42                                     <input type="text" name="layout_name" id="layout_name" size="20" value="[% layout_name %]" />
43                                 </li>
44                                 <li>
45                                     <label for="barcode_type">Choose barcode type (encoding)</label>
46                                     <select name="barcode_type" id="barcode_type">
47                                     [% FOREACH barcode_type IN barcode_types %]
48                                     [% IF ( barcode_type.selected ) %]
49                                     <option value="[% barcode_type.type %]" selected="selected">[% barcode_type.name %]</option>
50                                     [% ELSE %]
51                                     <option value="[% barcode_type.type %]">[% barcode_type.name %]</option>
52                                     [% END %]
53                                     [% END %]
54                                     </select>
55                                 </li>
56                                 <li>
57                                     <label for="printing_type">Choose layout type</label>
58                                     <select name="printing_type" id="printing_type">
59                                     [% FOREACH label_type IN label_types %]
60                                     [% IF ( label_type.selected ) %]
61                                     <option value="[% label_type.type %]" selected="selected">[% label_type.name %]</option>
62                                     [% ELSE %]
63                                     <option value="[% label_type.type %]">[% label_type.name %]</option>
64                                     [% END %]
65                                     [% END %]
66                                     </select>
67                                 </li>
68                                 <li>
69                                     <fieldset>
70                                         <legend>Bibliographic data to print</legend>
71                                                                                 <ol>
72                                         <li class="radio">[% IF ( layout_string ) %]
73                                         <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" checked="checked" /><label for="layout_choice_order">Choose order of text fields to print</label>
74                                         [% ELSE %]
75                                         <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" /><label for="layout_choice_order">Choose Order Of Text Fields to Print</label>
76                                         [% END %]
77                                                                                                 <div id="layout_table">
78                                                     <p>
79                                             [% FOREACH text_field IN fields %]
80                                                         <select name="[% text_field.field_name %]" id="[% text_field.field_name |url %]">
81                                                             <option value=""></option>
82                                                             [% FOREACH orde IN [1..field_count] %]
83                                                                 [% IF ( orde == text_field.order ) %]
84                                                             <option value="[% orde %]" selected="1">[% orde %]</option>
85                                                                 [% ELSE %]
86                                                             <option value="[% orde %]">[% orde %]</option>
87                                                                 [% END %]
88                                                             [% END %]
89                                                         </select>&nbsp;<label for="[% text_field.field_name |url %]">[% text_field.field_label %]</label>
90
91                                                         &nbsp;&nbsp;
92
93                                             [% END %]
94                                                     </p>
95                                                                                         </div>
96                                             </li>
97                                             [% UNLESS ( layout_string ) %]
98                                             <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" checked="checked" /> <label for="layout_choice_list">List fields</label></li>
99                                             [% ELSE %]
100                                             <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" /> <label for="layout_choice_list">List Fields</label></li>
101                                             [% END %]
102                                            <li> <fieldset id="layout_string" class="brief">
103                                                 <label for="format_string">Data fields</label>
104                                                 <input type="text" name="format_string" id="format_string" size="80" value="[% format_string |html %]" />
105                                                 <div class="hint">
106                                                     <p>Enter a comma separated list of fields to print.  You may include any <em>Koha field</em> or MARC subfield.</p>
107                                                     <p>See online help for advanced options</p>
108                                                     <p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
109                                                 </div>
110                                             </fieldset></li>
111                                                                                         </ol>
112                                     </fieldset>
113                                 </li>
114                                 <li>
115                                     <label for="guidebox">Draw guide boxes</label>
116                                     [% IF ( guidebox ) %]
117                                     <input type="checkbox" name="guidebox" id="guidebox" value="1"  checked="checked" />
118                                     [% ELSE %]
119                                     <input type="checkbox" name="guidebox" id="guidebox" value="1" />
120                                     [% END %]
121                                 </li>
122                                 <li>
123                                     <label for="callnum_split">Split call numbers</label>
124                                     [% IF ( callnum_split ) %]
125                                     <input type="checkbox" name="callnum_split" id="callnum_split" value="1"  checked="checked" />
126                                     [% ELSE %]
127                                     <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
128                                     [% END %]
129                                 </li>
130                                 <li>
131                                     <label for="text_justify">Text justification</label>
132                                     <select name="text_justify" id="text_justify">
133                                         [% FOREACH text_justification_type IN text_justification_types %]
134                                         [% IF ( text_justification_type.selected ) %]
135                                         <option value="[% text_justification_type.type %]" selected="selected">[% text_justification_type.name %]</option>
136                                         [% ELSE %]
137                                         <option value="[% text_justification_type.type %]">[% text_justification_type.name %]</option>
138                                         [% END %]
139                                         [% END %]
140                                     </select>
141                                 </li>
142                                 <li>
143                                     <label for="font">Font</label>
144                                     <select name="font" id="font">
145                                         [% FOREACH font_type IN font_types %]
146                                         [% IF ( font_type.selected ) %]
147                                         <option value="[% font_type.type %]" selected="selected">[% font_type.name %]</option>
148                                         [% ELSE %]
149                                         <option value="[% font_type.type %]">[% font_type.name %]</option>
150                                         [% END %]
151                                         [% END %]
152                                     </select>
153                                 </li>
154                                 <li>
155                                     <label for="font_size">Font size</label>
156                                     <input type="text" name="font_size" id="font_size" size="2" value="[% font_size |html %]" />
157                                 </li>
158                             </ol>
159                         </fieldset>
160                         <fieldset class="action">
161                             <input type="submit" value="Save" />
162                             <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
163                             <input type="hidden" name="op" value="save" />
164                             <input type="hidden" name="layout_id" value="[% layout_id %]" />
165                         </fieldset>
166                     </form>
167                 </div>
168             </div>
169             <div class="yui-b">
170                 [% INCLUDE 'labels-menu.inc' %]
171             </div>
172         </div>
173         [% INCLUDE 'intranet-bottom.inc' %]