2 [% BLOCK translate_label_element %]
4 [%- CASE 'layout' -%]layout
5 [%- CASE 'Layouts' -%]Layouts
6 [%- CASE 'template' -%]template
7 [%- CASE 'Templates' -%]Templates
8 [%- CASE 'profile' -%]profile
9 [%- CASE 'Profiles' -%]Profiles
10 [%- CASE 'batch' -%]batch
11 [%- CASE 'Batches' -%]Batches
14 [% INCLUDE 'doc-head-open.inc' %]
15 <title>Koha › Tools › Label creator › [% PROCESS translate_label_element element=label_element_title %]</title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 [% INCLUDE 'greybox.inc' %]
18 <script type="text/javascript">
22 if(document.layouts.action.length > 0) {
23 for (var i=0; i < document.layouts.action.length; i++) {
24 if (document.layouts.action[i].checked) {
25 batches.push("batch_id=" + document.layouts.action[i].value);
28 if (batches.length < 1) {
29 alert(_("Please select at least one batch to export."));
30 return; // no batch selected
32 getstr = batches.join("&");
34 else if (document.layouts.action.checked) {
35 getstr = "batch_id="+document.layouts.action.value;
38 alert(_("Please select at least one batch to export."));
39 return; // no batch selected
41 return GB_showCenter(_("Export Labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
43 function selected_layout(op) {
44 var selected = new Array;
45 if (document.layouts.action.length) {
46 for (i=0;i<document.layouts.action.length;i++){
47 if (document.layouts.action[i].checked){
51 if (selected.length == 1) {
52 return(document.layouts.action[selected[0]].value);
55 alert(_("Please select only one %s to %s.").format("[% label_element %]", op));
60 if (document.layouts.action.checked){
61 return(document.layouts.action.value);
64 alert(_("Please select a %s.").format("[% label_element %]"));
67 $(document).ready(function(){
68 $("#print").click(function(e){
72 $(".delete").on("click", function(){
73 return confirmDelete( _("Are you sure you want to delete this?") );
79 [% Asset.css("css/datatables.css") %]
80 [% INCLUDE 'datatables.inc' %]
81 <script type="text/javascript" id="js">
82 $(document).ready(function() {
83 $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
84 "sPaginationType": "four_button",
85 "aaSorting": [[ 1, "asc" ]],
87 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
94 <body id="labels_label-manage" class="tools labels">
95 [% INCLUDE 'header.inc' %]
96 [% INCLUDE 'cat-search.inc' %]
97 <div id="breadcrumbs">
98 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
99 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
100 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a> ›
101 [% PROCESS translate_label_element element=label_element_title %]
103 <div id="doc3" class="yui-t2">
107 [% INCLUDE 'labels-toolbar.inc' %]
109 <div class="yui-u first" id="manage-label-layouts">
110 <div class="hint">Current library: [% LoginBranchname %]</div>
111 [% IF ( table_loop ) %]
112 <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element %]">
113 [% IF ( label_element == 'layout' ) %]
114 <h2>Currently available layouts</h2>
115 [% ELSIF ( label_element == 'template' ) %]
116 <h2>Currently available templates</h2>
117 [% ELSIF ( label_element == 'profile' ) %]
118 <h2>Currently available profiles</h2>
119 [% ELSIF ( label_element == 'batch' ) %]
120 <h2>Currently available batches</h2>
122 <table id="labels-table">
123 [% FOREACH table_loo IN table_loop %]
124 [% IF ( table_loo.header_fields ) %]
127 [% FOREACH header_field IN table_loo.header_fields %]
128 [% SWITCH header_field.field_label %]
129 [% CASE 'Layout ID' %]<th>Layout ID</th>
130 [% CASE 'Layout' %]<th>Layout</th>
131 [% CASE 'Barcode Type' %]<th>Barcode type</th>
132 [% CASE 'Print Type' %]<th>Print type</th>
133 [% CASE 'Template ID' %]<th>Template ID</th>
134 [% CASE 'Template Name' %]<th>Template name</th>
135 [% CASE 'Description' %]<th>Description</th>
136 [% CASE 'Actions' %]<th>Actions</th>
137 [% CASE 'Profile ID' %]<th>Profile ID</th>
138 [% CASE 'Printer Name' %]<th>Printer name</th>
139 [% CASE 'Paper Bin' %]<th>Paper bin</th>
140 [% CASE 'Batch ID' %]<th>Batch ID</th>
141 [% CASE 'Item Count' %]<th>Item count</th>
142 [% CASE 'Fields to Print' %]<th>Fields to print</th>
143 [% CASE %]<th>[% header_field.field_label %]</th>
150 [% FOREACH text_field IN table_loo.text_fields %]
151 [% IF ( text_field.select_field ) %]
153 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit&element_id=[% text_field.field_value |url %]"><i class="fa fa-edit"></i> Edit</a>
154 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&label_element=[% label_element %]&element_id=[% text_field.field_value |url %]"><i class="fa fa-trash"></i> Delete</a>
156 [% IF label_element == 'batch' %] <td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
157 [% ELSIF ( text_field.field_value ) %]
158 <td>[% text_field.field_value %]</td>
167 [% IF ( print ) %]<button type="button" class="btn btn-default btn-sm" id="print">Export selected</button>[% END %]
171 <div class="dialog message">
173 [% PROCESS translate_label_element element=label_element_title %]
174 currently available.</h4>
175 <p>Use the toolbar above to create a new
176 [% PROCESS translate_label_element element=label_element %].</p></div>
181 <div class="dialog alert">
182 <strong>WARNING:</strong> An error was encountered and the [% op %] operation for [% label_element %] [% element_id %] was not completed. Please have your system administrator check the error log for details.
190 [% INCLUDE 'tools-menu.inc' %]
193 [% INCLUDE 'intranet-bottom.inc' %]