3 [% PROCESS 'i18n.inc' %]
5 [% BLOCK translate_label_element %]
7 [%- CASE 'layout' -%][% t('layout') | html %]
8 [%- CASE 'Layouts' -%][% t('Label layouts') | html %]
9 [%- CASE 'template' -%][% t('template') | html %]
10 [%- CASE 'Templates' -%][% t('Label templates') | html %]
11 [%- CASE 'profile' -%][% t('profile') | html %]
12 [%- CASE 'Profiles' -%][% t('Printer profiles') | html %]
13 [%- CASE 'batch' -%][% t('batch') | html %]
14 [%- CASE 'Batches' -%][% t('Label batches') | html %]
17 [% INCLUDE 'doc-head-open.inc' %]
18 <title>[% FILTER collapse %]
19 [% PROCESS translate_label_element element=label_element_title %] ›
20 [% t("Label creator") | html %] ›
21 [% t("Cataloging") | html %] ›
22 [% t("Koha") | html %]
24 [% INCLUDE 'doc-head-close.inc' %]
27 <body id="labels_label-manage" class="tools labels">
28 [% WRAPPER 'header.inc' %]
29 [% INCLUDE 'cat-search.inc' %]
32 [% WRAPPER 'sub-header.inc' %]
33 [% WRAPPER breadcrumbs %]
34 [% WRAPPER breadcrumb_item %]
35 <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
37 [% WRAPPER breadcrumb_item %]
38 <a href="/cgi-bin/koha/labels/label-home.pl">Label creator</a>
40 [% WRAPPER breadcrumb_item bc_active= 1 %]
41 [% PROCESS translate_label_element element=label_element_title %]
43 [% END #/ WRAPPER breadcrumbs %]
44 [% END #/ WRAPPER sub-header.inc %]
46 <div class="main container-fluid">
48 <div class="col-sm-10 col-sm-push-2">
51 [% INCLUDE 'labels-toolbar.inc' %]
52 <h2>[% PROCESS translate_label_element element=label_element_title %]</h2>
55 <div class="dialog alert">
56 <strong>WARNING:</strong> An error was encountered and the [% op | html %] operation for [% label_element | html %] [% element_id | html %] was not completed. Please have your system administrator check the error log for details.
60 <div id="manage-label-layouts" class="page-section">
61 [% IF ( table_loop ) %]
62 <form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element | html %]">
64 <div class="page-section">
65 <table id="labels-table">
66 [% FOREACH table_loo IN table_loop %]
67 [% IF ( table_loo.header_fields ) %]
70 [% FOREACH header_field IN table_loo.header_fields %]
71 [% SWITCH header_field.field_label %]
72 [% CASE 'Layout ID' %]<th>Layout ID</th>
73 [% CASE 'Layout' %]<th>Layout</th>
74 [% CASE 'Barcode Type' %]<th>Barcode type</th>
75 [% CASE 'Print Type' %]<th>Print type</th>
76 [% CASE 'Template ID' %]<th>Template ID</th>
77 [% CASE 'Template Name' %]<th>Template name</th>
78 [% CASE 'Description' %]<th>Description</th>
79 [% CASE 'Actions' %]<th class="noExport">Actions</th>
80 [% CASE 'Profile ID' %]<th>Profile ID</th>
81 [% CASE 'Printer Name' %]<th>Printer name</th>
82 [% CASE 'Paper Bin' %]<th>Paper bin</th>
83 [% CASE 'Batch ID' %]<th>Batch ID</th>
84 [% CASE 'Item Count' %]<th>Item count</th>
85 [% CASE 'Fields to Print' %]<th>Fields to print</th>
86 [% CASE %]<th>[% header_field.field_label | html %]</th>
93 [% FOREACH text_field IN table_loo.text_fields %]
94 [% IF ( text_field.select_field ) %]
96 <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-solid fa-pencil" aria-hidden="true"></i> Edit</a>
97 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&label_element=[% label_element | html %]&element_id=[% text_field.field_value |url %]"><i class="fa fa-trash-can"></i> Delete</a>
99 [% IF label_element == 'batch' %] <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]" /></td>[% END %]
100 [% ELSIF ( text_field.field_value ) %]
101 <td>[% text_field.field_value | html %]</td>
110 </div> <!-- /.page-section -->
111 [% IF ( print ) %]<button type="button" class="btn btn-default" id="print">Export selected</button>[% END %]
115 <div class="dialog message">
117 [% PROCESS translate_label_element element=label_element_title %]
118 currently available.</h4>
119 <p>Use the toolbar above to create a new
120 [% PROCESS translate_label_element element=label_element %].</p></div>
124 </div> <!-- /.col-sm-10.col-sm-push-2 -->
126 <div class="col-sm-2 col-sm-pull-10">
128 [% INCLUDE 'cat-menu.inc' %]
130 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
131 </div> <!-- /.row -->
133 [% MACRO jsinclude BLOCK %]
134 [% INCLUDE 'greybox.inc' %]
135 [% INCLUDE 'datatables.inc' %]
139 if(document.layouts.action.length > 0) {
140 for (var i=0; i < document.layouts.action.length; i++) {
141 if (document.layouts.action[i].checked) {
142 batches.push("batch_id=" + document.layouts.action[i].value);
145 if (batches.length < 1) {
146 alert(_("Please select at least one batch to export."));
147 return; // no batch selected
149 getstr = batches.join("&");
151 else if (document.layouts.action.checked) {
152 getstr = "batch_id="+document.layouts.action.value;
155 alert(_("Please select at least one batch to export."));
156 return; // no batch selected
158 return GB_showCenter(_("Export labels"), "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800);
160 function selected_layout(op) {
161 var selected = new Array;
162 if (document.layouts.action.length) {
163 for (i=0;i<document.layouts.action.length;i++){
164 if (document.layouts.action[i].checked){
168 if (selected.length == 1) {
169 return(document.layouts.action[selected[0]].value);
172 alert(_("Please select only one %s to %s.").format("[% label_element | html %]", op));
177 if (document.layouts.action.checked){
178 return(document.layouts.action.value);
181 alert(_("Please select a %s.").format("[% label_element | html %]"));
184 $(document).ready(function(){
185 $('#navmenulist a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current");
186 $("#print").click(function(e){
190 $(".delete").on("click", function(){
191 return confirmDelete( _("Are you sure you want to delete this?") );
193 $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
194 "sPaginationType": "full",
195 "aaSorting": [[ 1, "asc" ]],
197 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
204 [% INCLUDE 'intranet-bottom.inc' %]