View | Details | Raw Unified | Return to bug 14676
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-menu.inc (-5 lines)
Lines 1-9 Link Here
1
<div id="navmenu"><ul id="navmenulist">
1
<div id="navmenu"><ul id="navmenulist">
2
    <li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator home</a></li>
2
    <li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator home</a></li>
3
    <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Manage layouts</a></li>
4
    <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Manage templates</a></li>
5
    <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Manage profiles</a></li>
6
    <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Manage batches</a></li>
7
    <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Manage images</a></li>
8
</ul>
3
</ul>
9
</div>
4
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-toolbar.inc (-4 / +20 lines)
Lines 1-6 Link Here
1
<div id="toolbar" class="btn-toolbar">
1
<div id="toolbar" class="btn-toolbar">
2
    <a class="btn btn-small" id="layouts" href="/cgi-bin/koha/patroncards/edit-layout.pl?op=new">New layout</a>
2
    <div class="btn-group">
3
    <a class="btn btn-small" id="templates" href="/cgi-bin/koha/patroncards/edit-template.pl?op=new">New template</a>
3
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New <span class="caret"></span></button>
4
    <a class="btn btn-small" id="profiles" href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">New profile</a>
4
        <ul class="dropdown-menu">
5
    <a class="btn btn-small" id="batches" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=new">New batch</a>
5
            <li><a href="/cgi-bin/koha/patroncards/edit-batch.pl?op=new">Card batch</a></li>
6
            <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Image</a></li>
7
            <li><a href="/cgi-bin/koha/patroncards/edit-layout.pl?op=new">Layout</a></li>
8
            <li><a href="/cgi-bin/koha/patroncards/edit-template.pl?op=new">Card template</a></li>
9
            <li><a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Printer profile</a></li>
10
        </ul>
11
    </div>
12
    <div class="btn-group">
13
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-edit"></i> Manage <span class="caret"></span></button>
14
        <ul class="dropdown-menu">
15
            <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Card batches</a></li>
16
            <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Images</a></li>
17
            <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Layouts</a></li>
18
            <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Card templates</a></li>
19
            <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Printer profiles</a></li>
20
        </ul>
21
    </div>
6
</div>
22
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt (-2 / +2 lines)
Lines 184-190 function filterByFirstLetterSurname(letter) { Link Here
184
                    </li>
184
                    </li>
185
                </ol>
185
                </ol>
186
                <fieldset class="action">
186
                <fieldset class="action">
187
                    <input type="submit" value="Search" />
187
                    <input class="btn btn-default" type="submit" value="Search" />
188
                </fieldset>
188
                </fieldset>
189
            </fieldset>
189
            </fieldset>
190
        <form>
190
        <form>
Lines 227-233 function filterByFirstLetterSurname(letter) { Link Here
227
            </table>
227
            </table>
228
        </div>
228
        </div>
229
229
230
<div id="closewindow"><a href="#" class="close">Close</a></div>
230
<div id="closewindow"><a href="#" class="btn btn-default close">Close</a></div>
231
</div>
231
</div>
232
</div>
232
</div>
233
[% INCLUDE 'intranet-bottom.inc' %]
233
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-15 / +24 lines)
Lines 6-11 Link Here
6
    [% INCLUDE 'datatables.inc' %]
6
    [% INCLUDE 'datatables.inc' %]
7
    <script type="text/javascript">
7
    <script type="text/javascript">
8
        //<![CDATA[
8
        //<![CDATA[
9
           var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this patron from the card batch?");
9
           function DeleteConfirm() {
10
           function DeleteConfirm() {
10
                var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
11
                var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
11
                var answer = confirm(msg);
12
                var answer = confirm(msg);
Lines 88-97 Link Here
88
                        alert(_("Please select at least one card to export."));
89
                        alert(_("Please select at least one card to export."));
89
                        return;     // no batch selected
90
                        return;     // no batch selected
90
                    }
91
                    }
91
                    return GB_showCenter(_("Export labels"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800);
92
                    return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800);
92
                }
93
                }
93
                else if (mode == 'batch') {
94
                else if (mode == 'batch') {
94
                    return GB_showCenter(_("Export labels"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800);
95
                    return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800);
95
                }
96
                }
96
                else {
97
                else {
97
                    // some pass-thru error trapping just in case...
98
                    // some pass-thru error trapping just in case...
Lines 117-125 Link Here
117
         $(document).ready(function() {
118
         $(document).ready(function() {
118
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
119
            $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
119
                "aoColumnDefs": [
120
                "aoColumnDefs": [
120
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
121
                    { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false }
121
                ],
122
                ],
122
                "aaSorting": [[ 1, "asc" ]],
123
                "aaSorting": [[ 0, "asc" ]],
123
                "sPaginationType": "four_button"
124
                "sPaginationType": "four_button"
124
            }));
125
            }));
125
            $("#additems").click(function(){
126
            $("#additems").click(function(){
Lines 168-182 Link Here
168
        <div id="bd">
169
        <div id="bd">
169
            <div id="yui-main">
170
            <div id="yui-main">
170
                <div class="yui-b">
171
                <div class="yui-b">
172
                    <div class="yui-g">
173
                    [% INCLUDE 'patroncards-toolbar.inc' %]
174
                        <div class="yui-u first">
171
175
172
                <div id="toolbar" class="btn-toolbar">
176
                        </div>
173
                    <a class="btn btn-small" id="additems" href="#">Add item(s)</a>[% IF ( table_loop ) %]
177
                    </div>
174
                    <a class="btn btn-small" id="removeitems" href="#">Remove item(s)</a>
175
                    <a class="btn btn-small" id="deletebatch" href="#">Delete batch</a>
176
                    <a class="btn btn-small" id="deduplicate" href="#">Remove duplicates</a>
177
                    <a class="btn btn-small" id="exportitems" href="#">Export item(s)</a>
178
                    <a class="btn btn-small" id="exportbatch" href="#">Export batch</a>[% END %]
179
                </div>
180
178
181
                [% IF ( duplicate_message ) %]
179
                [% IF ( duplicate_message ) %]
182
                    <div class="dialog message">
180
                    <div class="dialog message">
Lines 201-206 Link Here
201
                                    </fieldset>
199
                                    </fieldset>
202
                                </div>
200
                                </div>
203
                            </form>
201
                            </form>
202
                            <div id="batch-manage" class="action">
203
                                <a class="btn btn-small" id="additems" href="#"><icon class="icon-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %]
204
                                <a class="btn btn-small" id="removeitems" href="#"><icon class="icon-trash"></icon> Remove selected patrons</a>
205
                                <a class="btn btn-small" id="deduplicate" href="#"><icon class="icon-minus"></icon> Remove duplicates</a>
206
                                <a class="btn btn-small" id="exportitems" href="#"><icon class="icon-share"></icon> Export selected card(s)</a>
207
                                <a class="btn btn-small" id="exportbatch" href="#"><icon class="icon-share"></icon> Export card batch</a>[% END %]
208
                            </div>
204
                            [% IF ( table_loop ) %]
209
                            [% IF ( table_loop ) %]
205
                            <form name="items" class="checkboxed">
210
                            <form name="items" class="checkboxed">
206
                                <h2>Items in batch number [% batch_id %]</h2>
211
                                <h2>Items in batch number [% batch_id %]</h2>
Lines 211-222 Link Here
211
                                                <tr>
216
                                                <tr>
212
                                                    [% FOREACH header_field IN table_loo.header_fields %]
217
                                                    [% FOREACH header_field IN table_loo.header_fields %]
213
                                                        [% SWITCH header_field.field_label -%]
218
                                                        [% SWITCH header_field.field_label -%]
214
                                                            [% CASE "Card Number" -%]
215
                                                                <th>Card number</th>
216
                                                            [% CASE "Summary" -%]
219
                                                            [% CASE "Summary" -%]
217
                                                                <th>Summary</th>
220
                                                                <th>Borrower name</th>
218
                                                            [% CASE "Borrower Number" %]
221
                                                            [% CASE "Borrower Number" %]
219
                                                                <th>Borrower number</th>
222
                                                                <th>Borrower number</th>
223
                                                            [% CASE "Actions " %]
224
                                                                <th>Actions</th>
220
                                                            [% CASE "Select" -%]
225
                                                            [% CASE "Select" -%]
221
                                                                <th>Select</th>
226
                                                                <th>Select</th>
222
                                                            [% CASE %]
227
                                                            [% CASE %]
Lines 230-235 Link Here
230
                                            <tr>
235
                                            <tr>
231
                                                [% FOREACH text_field IN table_loo.text_fields %]
236
                                                [% FOREACH text_field IN table_loo.text_fields %]
232
                                                    [% IF ( text_field.select_field ) %]
237
                                                    [% IF ( text_field.select_field ) %]
238
                                                        <td>
239
                                                            <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&amp;batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a>
240
                                                            <a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single card','/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&label_id=[% text_field.field_value %]')"><icon class="icon-share"></icon> Export</a>
241
                                                        </td>
233
                                                        <td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
242
                                                        <td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
234
                                                    [% ELSE %]
243
                                                    [% ELSE %]
235
                                                        <td>[% text_field.field_value %]</td>
244
                                                        <td>[% text_field.field_value %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-layout.tt (-3 / +10 lines)
Lines 120-131 Link Here
120
        <div id="bd">
120
        <div id="bd">
121
            <div id="yui-main">
121
            <div id="yui-main">
122
                <div class="yui-b">
122
                <div class="yui-b">
123
                    <div class="yui-g">
124
                    [% INCLUDE 'patroncards-toolbar.inc' %]
125
                        <div class="yui-u first">
126
127
                        </div>
128
                    </div>
129
123
                <!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned...  -->
130
                <!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned...  -->
124
                <form name="input" action="/cgi-bin/koha/patroncards/edit-layout.pl" method="get">
131
                <form name="input" action="/cgi-bin/koha/patroncards/edit-layout.pl" method="get">
125
                <div class="yui-g">
132
                <div class="yui-g">
126
                <div class="yui-g first">
133
                <div class="yui-g first">
127
                        <fieldset class="rows">
134
                        <fieldset class="rows">
128
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Patron card text layout</legend>
135
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] patron card text layout</legend>
129
                            <ol>
136
                            <ol>
130
                                <li>
137
                                <li>
131
                                <fieldset>
138
                                <fieldset>
Lines 346-352 Link Here
346
                </div>
353
                </div>
347
                <div class="yui-g">
354
                <div class="yui-g">
348
                    <fieldset class="rows">
355
                    <fieldset class="rows">
349
                    <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Patron card graphic layout</legend>
356
                    <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] patron card graphic layout</legend>
350
                    <ol>
357
                    <ol>
351
<!--
358
<!--
352
                            <li>
359
                            <li>
Lines 539-545 Link Here
539
                </div>
546
                </div>
540
                </div>
547
                </div>
541
                    <fieldset class="action">
548
                    <fieldset class="action">
542
                        <input type="submit" value="Save" />
549
                        <input class="btn btn-default" type="submit" value="Save" />
543
                        <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a>
550
                        <a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a>
544
                        <input type="hidden" name="op" value="save" />
551
                        <input type="hidden" name="op" value="save" />
545
                        <input type="hidden" name="layout_id" value="[% layout_id %]" />
552
                        <input type="hidden" name="layout_id" value="[% layout_id %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-profile.tt (+6 lines)
Lines 50-55 Link Here
50
        <div id="bd">
50
        <div id="bd">
51
        <div id="yui-main">
51
        <div id="yui-main">
52
            <div class="yui-b">
52
            <div class="yui-b">
53
                    <div class="yui-g">
54
                    [% INCLUDE 'patroncards-toolbar.inc' %]
55
                        <div class="yui-u first">
56
57
                        </div>
58
                    </div>
53
                        <div class="yui-g">
59
                        <div class="yui-g">
54
                            <h3>Edit printer profile</h3>
60
                            <h3>Edit printer profile</h3>
55
                                <div class="yui-g first">
61
                                <div class="yui-g first">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-template.tt (+6 lines)
Lines 50-55 Link Here
50
        <div id="bd">
50
        <div id="bd">
51
            <div id="yui-main">
51
            <div id="yui-main">
52
                <div class="yui-b">
52
                <div class="yui-b">
53
                    <div class="yui-g">
54
                    [% INCLUDE 'patroncards-toolbar.inc' %]
55
                        <div class="yui-u first">
56
57
                        </div>
58
                    </div>
53
                    <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
59
                    <form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
54
                    <div class="yui-g">
60
                    <div class="yui-g">
55
                        <h3>Edit patron card template</h3>
61
                        <h3>Edit patron card template</h3>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/home.tt (-17 lines)
Lines 18-40 Link Here
18
                    <div class="yui-g">
18
                    <div class="yui-g">
19
                    [% INCLUDE 'patroncards-toolbar.inc' %]
19
                    [% INCLUDE 'patroncards-toolbar.inc' %]
20
                        <div class="yui-u first">
20
                        <div class="yui-u first">
21
                            <div class="justify homeimage">
22
                            <div class="lci_01"></div>
23
                            <div class="lci_02"></div>
24
                            <div class="lci_03"></div>
25
                                <h2>Welcome to Koha's Patron card creator module</h2>
26
                                <p>The Patron card creator allow you to use layouts and templates which you design to print a nearly unlimited variety of patron cards including barcodes. Here are some of the features of the Patron card creator module:</p>
27
                                <ul>
28
                                    <li>Customize patron card layouts</li>
29
                                    <li>Design custom card templates for printed patron cards</li>
30
                                    <li>Build and manage batches of patron cards</li>
31
                                    <li>Export single or multiple batches</li>
32
                                    <li>Export single or multiple patron cards from within a batch</li>
33
                                    <li>Export card data as a PDF readable by any standard PDF reader, making patron cards printable directly on a printer</li>
34
                                </ul>
35
                                <p>At the top of each screen within the Patron card creator, you will see a toolbar allowing quick access to relevant functions. The menu to the left of each screen also allows easy access to the different sections of the Patron card creator. The breadcrumb trail near the top of each screen will give specific indication as to where you are within the Patron Card Creator module and allow quick navigation to previously traversed sections. And finally, you can find more detailed information on each section of the Patron card creator by clicking the online help link at the upper left-hand corner of every page.</p>
36
                                <p>The developers of the Patron card creator module hope you will find this an extremely useful tool. You are encouraged to submit any enhancement requests as well as any bugs via <a href="http://bugs.koha-community.org/">Koha Project Bugzilla</a>.</p>
37
                            </div>
38
                        </div>
21
                        </div>
39
                    </div>
22
                    </div>
40
                </div>
23
                </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-23 / +48 lines)
Lines 3-8 Link Here
3
    [% INCLUDE 'doc-head-close.inc' %]
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    <script type="text/javascript">
4
    <script type="text/javascript">
5
        //<![CDATA[
5
        //<![CDATA[
6
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this image?");
6
            function DeleteConfirm() {
7
            function DeleteConfirm() {
7
                var results = selected_images("delete");
8
                var results = selected_images("delete");
8
                if (results.images != -1) {
9
                if (results.images != -1) {
Lines 56-72 Link Here
56
    <div id="bd">
57
    <div id="bd">
57
        <div id="yui-main">
58
        <div id="yui-main">
58
            <div class="yui-b">
59
            <div class="yui-b">
60
                    <div class="yui-g">
61
                    [% INCLUDE 'patroncards-toolbar.inc' %]
62
                        <div class="yui-u first">
63
64
                        </div>
65
                    </div>
59
                [% INCLUDE 'patroncards-errors.inc' %]
66
                [% INCLUDE 'patroncards-errors.inc' %]
60
                <div class="yui-g">
67
                <div class="yui-g">
61
                    <div class="yui-u first">
68
                    <div class="yui-u first">
62
                        <h1>Upload Images</h1>
69
                        <h1>Upload Images</h1>
63
                        [% IF ( IMPORT_SUCCESSFUL ) %]
64
                        <div id="dialog" class="dialog message">
65
                            <h3>Image successfully uploaded</h3>
66
                            <ul><li>File: [% SOURCE_FILE %]</li>
67
                            <li>Image name: [% IMAGE_NAME %]</li></ul>
68
                        </div>
69
                        [% END %]
70
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
70
                        <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
71
                            <fieldset class="brief">
71
                            <fieldset class="brief">
72
                                <div class="hint">
72
                                <div class="hint">
Lines 86-106 Link Here
86
                                    <input type="text" id="image_name" name="image_name" size="20" />
86
                                    <input type="text" id="image_name" name="image_name" size="20" />
87
                                </li>
87
                                </li>
88
                                </ol>
88
                                </ol>
89
                                <div class="action">
90
                                    <input type="hidden" name="op" value="upload" />
91
                                    <input class="btn btn-default" id="uploadsu" type="submit" value="Upload" />
92
                                </div>
93
                                [% IF ( IMPORT_SUCCESSFUL ) %]
94
                                    <div class="dialog message">
95
                                    <h3>Image successfully uploaded</h3>
96
                                    <ul><li>File: [% SOURCE_FILE %]</li>
97
                                    <li>Image name: [% IMAGE_NAME %]</li></ul>
98
                                    </div>
99
                                [% END %]
89
                            </fieldset>
100
                            </fieldset>
90
                            <fieldset class="action">
101
91
                                <input type="hidden" name="op" value="upload" />
92
                                <input id="uploadsu" type="submit" value="Upload" />
93
                                <a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
94
                            </fieldset>
95
                        </form>
102
                        </form>
96
                    </div>
103
                    </div>
97
                    <div class="yui-u">
104
                    <div class="yui-u">
98
                    <h1>Delete Images</h1>
105
                    <h1>Delete Images</h1>
99
                        [% IF ( DELETE_SUCCESSFULL ) %]
100
                        <div id="dialog" class="dialog message">
101
                            <h3>Image(s) successfully deleted</h3>
102
                        </div>
103
                        [% END %]
104
                        [% IF ( TABLE ) %]
106
                        [% IF ( TABLE ) %]
105
                        <form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
107
                        <form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
106
                            <fieldset class="brief">
108
                            <fieldset class="brief">
Lines 109-124 Link Here
109
                                </div>
111
                                </div>
110
                               <table>
112
                               <table>
111
                                    [% FOREACH TABL IN TABLE %]
113
                                    [% FOREACH TABL IN TABLE %]
114
112
                                    [% IF ( TABL.header_fields ) %]
115
                                    [% IF ( TABL.header_fields ) %]
116
113
                                    <tr>
117
                                    <tr>
114
                                    [% FOREACH header_field IN TABL.header_fields %]
118
                                    [% FOREACH header_field IN TABL.header_fields %]
115
                                        <th>[% header_field.field_label %]</th>
119
                                    [% SWITCH header_field.field_label -%]
120
                                        [% CASE "ID" %]
121
                                            <th>Image ID</th>
122
                                        [% CASE "Name" %]
123
                                            <th>Name</th>
124
                                        [% CASE " " %]
125
                                            <th>Delete</th>
126
                                        [% CASE %]
127
                                           <th>[% header_field.field_label %]</th>
128
                                    [% END %]
116
                                    [% END %]
129
                                    [% END %]
117
                                    </tr>
130
                                    </tr>
118
                                    [% ELSE %]
131
                                    [% ELSE %]
119
                                    <tr>
132
                                    <tr>
120
                                    [% FOREACH text_field IN TABL.text_fields %]
133
                                    [% FOREACH text_field IN TABL.text_fields %]
121
                                    [% IF ( text_field.select_field ) %]
134
                                    [% IF ( text_field.select_field ) %]
135
                                        <td>
136
                                            <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/image-manage.pl?op=delete&image_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a>
137
                                        </td>
122
                                        <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
138
                                        <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
123
                                    [% ELSIF ( text_field.field_value ) %]
139
                                    [% ELSIF ( text_field.field_value ) %]
124
                                        <td>[% text_field.field_value %]</td>
140
                                        <td>[% text_field.field_value %]</td>
Lines 130-140 Link Here
130
                                    [% END %]
146
                                    [% END %]
131
                                    [% END %]
147
                                    [% END %]
132
                                </table>
148
                                </table>
133
                            </fieldset>
149
                                <div class="action">
134
                            <fieldset class="action">
150
                                    <input type="hidden" name="op" value="delete" />
135
                                <input type="hidden" name="op" value="delete" />
151
                                    <input class="btn btn-default" type="button" id="delete" value="Delete selected" />
136
                                <input type="button" id="delete" value="Delete" />
152
                                </div>
137
                                <a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
153
                                [% IF ( DELETE_SUCCESSFULL ) %]
154
                                <div id="dialog" class="dialog message">
155
                                    <h3>Image(s) successfully deleted</h3>
156
                                </div>
157
                                [% END %]
138
                            </fieldset>
158
                            </fieldset>
139
                        </form>
159
                        </form>
140
                        [% ELSE %]
160
                        [% ELSE %]
Lines 142-147 Link Here
142
                            <div class="hint">
162
                            <div class="hint">
143
                                No images are currently available.
163
                                No images are currently available.
144
                            </div>
164
                            </div>
165
                            [% IF ( DELETE_SUCCESSFULL ) %]
166
                                <div id="dialog" class="dialog message">
167
                                    <h3>Image(s) successfully deleted</h3>
168
                                </div>
169
                            [% END %]
145
                        </fieldset>
170
                        </fieldset>
146
                        [% END %]
171
                        [% END %]
147
                    </div>
172
                    </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-5 / +15 lines)
Lines 8-13 Link Here
8
[%-  CASE 'Profiles'  -%]Profiles
8
[%-  CASE 'Profiles'  -%]Profiles
9
[%-  CASE 'batch'     -%]batch
9
[%-  CASE 'batch'     -%]batch
10
[%-  CASE 'Batches'   -%]Batches
10
[%-  CASE 'Batches'   -%]Batches
11
[%-  CASE 'Actions'   -%]Actions
11
[%-  END -%]
12
[%-  END -%]
12
[% END %]
13
[% END %]
13
    [% INCLUDE 'doc-head-open.inc' %]
14
    [% INCLUDE 'doc-head-open.inc' %]
Lines 16-21 Link Here
16
    [% INCLUDE 'greybox.inc' %]
17
    [% INCLUDE 'greybox.inc' %]
17
    <script type="text/javascript">
18
    <script type="text/javascript">
18
        //<![CDATA[
19
        //<![CDATA[
20
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
19
            function DeleteConfirm() {
21
            function DeleteConfirm() {
20
                var element_id = selected_layout("delete");
22
                var element_id = selected_layout("delete");
21
                if (element_id>-1) {
23
                if (element_id>-1) {
Lines 132-145 Link Here
132
                                [% IF ( table_loo.header_fields ) %]
134
                                [% IF ( table_loo.header_fields ) %]
133
                                <tr>
135
                                <tr>
134
                                [% FOREACH header_field IN table_loo.header_fields %]
136
                                [% FOREACH header_field IN table_loo.header_fields %]
135
                                    <th>[% header_field.field_label %]</th>
137
                                    [% SWITCH header_field.field_label -%]
138
                                        [% CASE "Select" -%]
139
                                             [% IF ( print ) %]<th>Select</th>[% END %]
140
                                        [% CASE %]
141
                                             <th>[% header_field.field_label %]</th>
142
                                        [% END -%]
136
                                [% END %]
143
                                [% END %]
137
                                </tr>
144
                                </tr>
138
                                [% ELSE %]
145
                                [% ELSE %]
139
                                <tr>
146
                                <tr>
140
                                [% FOREACH text_field IN table_loo.text_fields %]
147
                                [% FOREACH text_field IN table_loo.text_fields %]
141
                                [% IF ( text_field.select_field ) %]
148
                                [% IF ( text_field.select_field ) %]
142
                                    <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
149
                                    <td>
150
                                      <a class="btn btn-mini" href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><icon class="icon-edit"></icon> Edit</a>
151
                                      [% IF ( print ) %]<a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single batch','/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]')"><icon class="icon-share"></icon> Export</a>[% END %]
152
                                      <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a>
153
                                    </td>
154
                                    [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
143
                                [% ELSIF ( text_field.field_value ) %]
155
                                [% ELSIF ( text_field.field_value ) %]
144
                                    <td>[% text_field.field_value %]</td>
156
                                    <td>[% text_field.field_value %]</td>
145
                                [% ELSE %]
157
                                [% ELSE %]
Lines 151-159 Link Here
151
                                [% END %]
163
                                [% END %]
152
                            </table>
164
                            </table>
153
                            <fieldset class="action">
165
                            <fieldset class="action">
154
                                <input type="button" id="edit" value="Edit" />
166
                                [% IF ( print ) %]<input class="btn btn-sm" type="button" id="print" value="Export selected batches" />[% END %]
155
                                <input type="button" id="delete" value="Delete" />
156
                                [% IF ( print ) %]<input type="button" id="print" value="Export" />[% END %]
157
                            </fieldset>
167
                            </fieldset>
158
                            </form>
168
                            </form>
159
                            [% ELSE %]
169
                            [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt (-4 / +4 lines)
Lines 38-52 Link Here
38
                    </fieldset>
38
                    </fieldset>
39
39
40
                <fieldset class="action">
40
                <fieldset class="action">
41
                    <input type="button" class="submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
41
                    <input type="button" class="btn btn-default submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
42
                </fieldset>
42
                </fieldset>
43
            </form>
43
            </form>
44
            [% ELSE %]
44
            [% ELSE %]
45
            <h3>
45
            <h3>
46
                    [% IF ( label_ids ) %]
46
                    [% IF ( label_ids ) %]
47
                        [% IF ( card_count == 1 ) %]Exporting [% card_count %] patroncard[% ELSE %]Exporting [% card_count %] patroncards[% END %]
47
                        [% IF ( card_count == 1 ) %]Exporting [% card_count %] patron card[% ELSE %]Exporting [% card_count %] patron cards[% END %]
48
                    [% ELSIF ( borrower_numbers ) %]
48
                    [% ELSIF ( borrower_numbers ) %]
49
                        [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patroncard[% ELSE %]Exporting [% borrower_count %] patroncards[% END %]
49
                        [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patron card[% ELSE %]Exporting [% borrower_count %] patron cards[% END %]
50
                    [% ELSE %]
50
                    [% ELSE %]
51
                        [% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
51
                        [% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
52
                    [% END %]
52
                    [% END %]
Lines 88-94 Link Here
88
                    </ol>
88
                    </ol>
89
                </fieldset>
89
                </fieldset>
90
                <fieldset class="action">
90
                <fieldset class="action">
91
                    <input type="submit" class="submit" value="Export" />
91
                    <input type="submit" class="btn btn-default submit" value="Export" />
92
                    <a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();">Cancel</a>
92
                    <a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();">Cancel</a>
93
                </fieldset>
93
                </fieldset>
94
            </form>
94
            </form>
(-)a/patroncards/edit-batch.pl (-2 / +2 lines)
Lines 47-55 my $duplicate_count = undef; Link Here
47
my $duplicate_message = undef;
47
my $duplicate_message = undef;
48
my $db_rows = {};
48
my $db_rows = {};
49
my $batch = undef;
49
my $batch = undef;
50
my $display_columns = [ {_card_number   => {label => 'Card Number', link_field => 0}},
50
my $display_columns = [ {_summary       => {label => 'Summary', link_field => 0}},
51
                        {_summary       => {label => 'Summary', link_field => 0}},
52
                        {borrowernumber => {label => 'Borrower Number', link_field => 0}},
51
                        {borrowernumber => {label => 'Borrower Number', link_field => 0}},
52
                        {_action        => {label => 'Actions ', link_field => 0}},
53
                        {select         => {label => 'Select', value => '_label_id'}},
53
                        {select         => {label => 'Select', value => '_label_id'}},
54
                      ];
54
                      ];
55
my $op = $cgi->param('op') || 'new';
55
my $op = $cgi->param('op') || 'new';
(-)a/patroncards/image-manage.pl (+1 lines)
Lines 37-42 my $source_file = "$file_name"; # otherwise we end up with what amounts to a poi Link Here
37
my $display_columns = { image =>    [  #{db column      => {label => 'col label', is link?          }},
37
my $display_columns = { image =>    [  #{db column      => {label => 'col label', is link?          }},
38
                                        {image_id       => {label => 'ID',      link_field      => 0}},
38
                                        {image_id       => {label => 'ID',      link_field      => 0}},
39
                                        {image_name     => {label => 'Name',    link_field      => 0}},
39
                                        {image_name     => {label => 'Name',    link_field      => 0}},
40
                                        {_delete        => {label => 'Delete', link_field => 0}},
40
                                        {select         => {label => 'Select',  value           => 'image_id'}},
41
                                        {select         => {label => 'Select',  value           => 'image_id'}},
41
                                    ],
42
                                    ],
42
};
43
};
(-)a/patroncards/manage.pl (-1 / +4 lines)
Lines 51-72 my $db_rows = {}; Link Here
51
my $display_columns = { layout =>   [  # db column       => {col label                  is link?
51
my $display_columns = { layout =>   [  # db column       => {col label                  is link?
52
                                        {layout_id       => {label => 'Layout ID',      link_field      => 0}},
52
                                        {layout_id       => {label => 'Layout ID',      link_field      => 0}},
53
                                        {layout_name     => {label => 'Layout',         link_field      => 0}},
53
                                        {layout_name     => {label => 'Layout',         link_field      => 0}},
54
                                        {_action         => {label => 'Action',         link_field      => 0}},
54
                                        #{layout_xml      => {label => 'Layout XML',     link_field      => 0}},
55
                                        #{layout_xml      => {label => 'Layout XML',     link_field      => 0}},
55
                                        {select          => {label => 'Select',         value           => 'layout_id'}},
56
                                        {select          => {label => 'Select',         value           => 'layout_id'}},
56
                                    ],
57
                                    ],
57
                        template => [   {template_id     => {label => 'Template ID',    link_field      => 0}},
58
                        template => [   {template_id     => {label => 'Template ID',    link_field      => 0}},
58
                                        {template_code   => {label => 'Template Name',  link_field      => 0}},
59
                                        {template_code   => {label => 'Template Name',  link_field      => 0}},
59
                                        {template_desc   => {label => 'Description',    link_field      => 0}},
60
                                        {template_desc   => {label => 'Description',    link_field      => 0}},
61
                                        {_action         => {label => 'Action',         link_field      => 0}},
60
                                        {select          => {label => 'Select',         value           => 'template_id'}},
62
                                        {select          => {label => 'Select',         value           => 'template_id'}},
61
                                    ],
63
                                    ],
62
                        profile =>  [   {profile_id      => {label => 'Profile ID',     link_field      => 0}},
64
                        profile =>  [   {profile_id      => {label => 'Profile ID',     link_field      => 0}},
63
                                        {printer_name    => {label => 'Printer Name',   link_field      => 0}},
65
                                        {printer_name    => {label => 'Printer Name',   link_field      => 0}},
64
                                        {paper_bin       => {label => 'Paper Bin',      link_field      => 0}},
66
                                        {paper_bin       => {label => 'Paper Bin',      link_field      => 0}},
65
                                        {_template_code  => {label => 'Template Name',  link_field      => 0}},     # this display column does not have a corrisponding db column in the profile table, hence the underscore
67
                                        {_template_code  => {label => 'Template Name',  link_field      => 0}},     # this display column does not have a corrisponding db column in the profile table, hence the underscore
68
                                        {_action         => {label => 'Action',         link_field      => 0}},
66
                                        {select          => {label => 'Select',         value           => 'profile_id'}},
69
                                        {select          => {label => 'Select',         value           => 'profile_id'}},
67
                                    ],
70
                                    ],
68
                        batch =>    [   {batch_id        => {label => 'Batch ID',       link_field      => 0}},
71
                        batch =>    [   {batch_id        => {label => 'Batch ID',       link_field      => 0}},
69
                                        {_item_count     => {label => 'Item Count',     link_field      => 0}},
72
                                        {_item_count     => {label => 'Item Count',     link_field      => 0}},
73
                                        {_action         => {label => 'Actions',        link_field      => 0}},
70
                                        {select          => {label => 'Select',         value           => 'batch_id'}},
74
                                        {select          => {label => 'Select',         value           => 'batch_id'}},
71
                                    ],
75
                                    ],
72
};
76
};
73
- 

Return to bug 14676