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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-4 / +23 lines)
Lines 24-29 Link Here
24
    <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; [% PROCESS translate_card_element element=card_element_title %]</title>
24
    <title>Koha &rsaquo; Tools &rsaquo; Patron card creator &rsaquo; [% PROCESS translate_card_element element=card_element_title %]</title>
25
    [% INCLUDE 'doc-head-close.inc' %]
25
    [% INCLUDE 'doc-head-close.inc' %]
26
    [% INCLUDE 'greybox.inc' %]
26
    [% INCLUDE 'greybox.inc' %]
27
    <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
28
    [% INCLUDE 'datatables.inc' %]
27
    <script type="text/javascript">
29
    <script type="text/javascript">
28
        //<![CDATA[
30
        //<![CDATA[
29
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
31
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
Lines 157-162 Link Here
157
                XportPatronlist();
159
                XportPatronlist();
158
                return false;
160
                return false;
159
            });
161
            });
162
163
            $("#patroncardbatches").dataTable($.extend(true, {}, dataTablesDefaults, {
164
                "aoColumnDefs": [
165
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
166
                ],
167
                "iDisplayLength": 10,
168
                "sPaginationType": "four_button"
169
            }));
160
         });
170
         });
161
//]]>
171
//]]>
162
</script>
172
</script>
Lines 182-188 Link Here
182
                            [% IF ( table_loop ) %]
192
                            [% IF ( table_loop ) %]
183
                            <form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element %]">
193
                            <form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element %]">
184
                            <h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2>
194
                            <h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2>
185
                            <table>
195
                            <table id="patroncardbatches">
196
                              <thead>
186
                                [% FOREACH table_loo IN table_loop %]
197
                                [% FOREACH table_loo IN table_loop %]
187
                                [% IF ( table_loo.header_fields ) %]
198
                                [% IF ( table_loo.header_fields ) %]
188
                                <tr>
199
                                <tr>
Lines 195-208 Link Here
195
                                        [% END -%]
206
                                        [% END -%]
196
                                [% END %]
207
                                [% END %]
197
                                </tr>
208
                                </tr>
209
                              </thead>
210
                              <tbody>
198
                                [% ELSE %]
211
                                [% ELSE %]
199
                                <tr>
212
                                <tr>
200
                                [% FOREACH text_field IN table_loo.text_fields %]
213
                                [% FOREACH text_field IN table_loo.text_fields %]
201
                                [% IF ( text_field.select_field ) %]
214
                                [% IF ( text_field.select_field ) %]
202
                                    <td>
215
                                    <td>
203
                                      <a class="btn btn-mini" href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><icon class="fa fa-edit"></icon> Edit</a>
216
                                      <div class="dropdown">
204
                                      [% 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 %]', 400, 800)"><icon class="fa fa-share-square-o"></icon> Export</a>[% END %]
217
                                        <a class="btn btn-mini dropdown-toggle" id="patroncardbatchactions[% text_field.field_value %]" role="button" data-toggle="dropdown" href="#">
205
                                      <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="fa fa-trash"></icon> Delete</a>
218
                                          Actions <b class="caret"></b></a>
219
                                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="patroncardbatchactions[% text_field.field_value %]">
220
                                          <li><a href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><i class="fa fa-edit"></i> Edit</a></li>
221
                                          [% IF ( print ) %]<li><a href="#" onclick="GB_showCenter('Export single batch','/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]', 400, 800)"><i class="fa fa-upload"></i> Export</a></li>[% END %]
222
                                          <li><a 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 %]"><i class="fa fa-trash"></i> Delete</a></li>
223
                                        </ul>
224
                                      </div>
206
                                    </td>
225
                                    </td>
207
                                    [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
226
                                    [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
208
                                [% ELSIF ( text_field.field_value ) %]
227
                                [% ELSIF ( text_field.field_value ) %]
(-)a/patroncards/manage.pl (-2 / +1 lines)
Lines 71-77 my $display_columns = { layout => [ # db column => {col label Link Here
71
                                    ],
71
                                    ],
72
                        batch =>    [   {batch_id        => {label => 'Batch ID',       link_field      => 0}},
72
                        batch =>    [   {batch_id        => {label => 'Batch ID',       link_field      => 0}},
73
                                        {_item_count     => {label => 'Patron Count',   link_field      => 0}},
73
                                        {_item_count     => {label => 'Patron Count',   link_field      => 0}},
74
                                        {_action         => {label => 'Actions',        link_field      => 0}},
74
                                        {_action         => {label => '&nbsp;',         link_field      => 0}},
75
                                        {select          => {label => 'Select',         value           => 'batch_id'}},
75
                                        {select          => {label => 'Select',         value           => 'batch_id'}},
76
                                    ],
76
                                    ],
77
};
77
};
78
- 

Return to bug 16049