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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-204 / +147 lines)
Lines 16-21 Link Here
16
16
17
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
17
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
18
18
19
20
[% BLOCK subscriptions_table %]
21
    <table id="osrlt">
22
      <thead>
23
        <tr>
24
            <th>ISSN</th>
25
            <th class="anti-the">Title</th>
26
            <th>Notes</th>
27
            <th>Library</th>
28
            <th>Location</th>
29
            <th>Call number</th>
30
            [% UNLESS closed %]
31
                <th class="title-string">Expiration date</th>
32
            [% END %]
33
            [% FOR field IN additional_fields_for_subscription %]
34
              <th>[% field.name %]</th>
35
            [% END %]
36
            <th class="NoSort">Actions</th>
37
        </tr>
38
      </thead>
39
      <tfoot>
40
        <tr>
41
          <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
42
          <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
43
          <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
44
          <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
45
          <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
46
          <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
47
          [% UNLESS closed %]
48
              <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search expiration date" /></td>
49
          [% END %]
50
          [% FOR field IN additional_fields_for_subscription %]
51
            <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
52
          [% END %]
53
          <td></td>
54
        </tr>
55
      </tfoot>
56
      <tbody>
57
        [% FOREACH subscription IN subscriptions %]
58
        [% UNLESS subscription.cannotdisplay %]
59
          <tr>
60
            <td>
61
            [% IF ( subscription.issn ) %][% subscription.issn %]
62
            [% END %]
63
            </td>
64
            <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
65
            </td>
66
            <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
67
            [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
68
            </td>
69
            <td>
70
              [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
71
            </td>
72
            <td>
73
              [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
74
            </td>
75
            <td>
76
              [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
77
            </td>
78
            [% UNLESS closed %]
79
                <td>
80
                    [% IF ( subscription.enddate ) %]
81
                        <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span>
82
                    [% ELSE %]
83
                        <span title="0000-00-00"></span>
84
                    [% END %]
85
                </td>
86
            [% END %]
87
88
            [% FOR field IN additional_fields_for_subscription %]
89
              [% IF field.authorised_value_category %]
90
                <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
91
              [% ELSE %]
92
                <td>[% subscription.additional_fields.${field.name} %]</td>
93
              [% END %]
94
            [% END %]
95
96
            <td>
97
                <div class="dropdown">
98
                    [% IF closed %]
99
                        <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">
100
                           Actions <b class="caret"></b>
101
                        </a>
102
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid %]">
103
104
                            [% IF ( routing && CAN_user_serials_routing ) %]
105
                                [% UNLESS ( subscription.cannotedit ) %]
106
                                    <li>
107
                                        <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&amp;routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter | uri %]&amp;ISSN_filter=[% ISSN_filter | uri %]&amp;EAN_filter=[% EAN_filter | uri %]&amp;published_filter=[% publisher_filter | uri %]&amp;bookseller_filter=[% bookseller_filter | uri %]&amp;branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a>
108
                                    </li>
109
                                [% END %]
110
                            [% END # IF ( routing && CAN_user_serials_routing ) %]
111
112
                            <li>
113
                                <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
114
                            </li>
115
116
                        </ul>
117
                    [% ELSE %]
118
                        <div class="btn-group">
119
                            [% IF ( CAN_user_serials_receive_serials ) %]
120
                                [%# There should be no space between these two buttons, it would render badly %]
121
                                <a class="btn btn-default btn-xs" role="button"
122
                                   href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7"><i
123
                                   class="fa fa-inbox"></i> Serial receive</a><a
124
                                   class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button"
125
                                   data-toggle="dropdown" href="#"><b class="caret"></b></a>
126
                            [% ELSE %]
127
                                <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
128
                            [% END %]
129
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid %]">
130
131
                            [% IF ( routing && CAN_user_serials_routing ) %]
132
                                [% IF ( subscription.cannotedit ) %]
133
                                [% ELSE %]
134
                                    [% IF ( subscription.routingedit ) %]
135
                                        <li>
136
                                            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit %])</a>
137
                                        </li>
138
                                    [% ELSE %]
139
                                        <li>
140
                                            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
141
                                        </li>
142
                                    [% END %]
143
                                [% END %]
144
                            [% END # IF ( routing && CAN_user_serials_routing ) %]
145
146
                            <li>
147
                                <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
148
                            </li>
149
                        </ul>
150
                        </div>
151
                    [% END %]
152
                </div>
153
            </td>
154
155
          </tr>
156
          [% END %]
157
        [% END %]
158
      </tbody>
159
    </table>
160
[% END %]
161
19
<div id="doc3" class="yui-t2">
162
<div id="doc3" class="yui-t2">
20
  <div id="bd">
163
  <div id="bd">
21
    <div id="yui-main">
164
    <div id="yui-main">
Lines 109-226 Link Here
109
            </ul>
252
            </ul>
110
            <div id="opened">
253
            <div id="opened">
111
              [% IF openedsubscriptions %]
254
              [% IF openedsubscriptions %]
112
                <table id="osrlt">
255
                  [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
113
                  <thead>
114
                    <tr>
115
                        <th>ISSN</th>
116
                        <th class="anti-the">Title</th>
117
                        <th>Notes</th>
118
                        <th>Library</th>
119
                        <th>Location</th>
120
                        <th>Call number</th>
121
                        <th class="title-string">Expiration date</th>
122
                        [% FOR field IN additional_fields_for_subscription %]
123
                          <th>[% field.name %]</th>
124
                        [% END %]
125
                        <th class="NoSort">Actions</th>
126
                    </tr>
127
                  </thead>
128
                  <tfoot>
129
                    <tr>
130
                      <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
131
                      <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
132
                      <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
133
                      <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
134
                      <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
135
                      <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
136
                      <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search expiration date" /></td>
137
                      [% FOR field IN additional_fields_for_subscription %]
138
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
139
                      [% END %]
140
                      <td></td>
141
                    </tr>
142
                  </tfoot>
143
                  <tbody>
144
                    [% FOREACH subscription IN openedsubscriptions %]
145
                    [% UNLESS subscription.cannotdisplay %]
146
                      <tr>
147
                        <td>
148
                        [% IF ( subscription.issn ) %][% subscription.issn %]
149
                        [% END %]
150
                        </td>
151
                        <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
152
                        </td>
153
                        <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
154
                        [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
155
                        </td>
156
                        <td>
157
                          [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
158
                        </td>
159
                        <td>
160
                          [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
161
                        </td>
162
                        <td>
163
                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
164
                        </td>
165
                        <td>
166
                            [% IF ( subscription.enddate ) %]
167
                                <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span>
168
                            [% ELSE %]
169
                                <span title="0000-00-00"></span>
170
                            [% END %]
171
                        </td>
172
173
                        [% FOR field IN additional_fields_for_subscription %]
174
                          [% IF field.authorised_value_category %]
175
                            <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
176
                          [% ELSE %]
177
                            <td>[% subscription.additional_fields.${field.name} %]</td>
178
                          [% END %]
179
                        [% END %]
180
181
                        <td>
182
                            <div class="dropdown">
183
                                <div class="btn-group">
184
                                    [% IF ( CAN_user_serials_receive_serials ) %]
185
                                        [%# There should be no space between these two buttons, it would render badly %]
186
                                        <a class="btn btn-default btn-xs" role="button"
187
                                           href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7"><i
188
                                           class="fa fa-inbox"></i> Serial receive</a><a
189
                                           class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button"
190
                                           data-toggle="dropdown" href="#"><b class="caret"></b></a>
191
                                    [% ELSE %]
192
                                        <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
193
                                    [% END %]
194
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid %]">
195
196
                                    [% IF ( routing && CAN_user_serials_routing ) %]
197
                                        [% IF ( subscription.cannotedit ) %]
198
                                        [% ELSE %]
199
                                            [% IF ( subscription.routingedit ) %]
200
                                                <li>
201
                                                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit %])</a>
202
                                                </li>
203
                                            [% ELSE %]
204
                                                <li>
205
                                                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
206
                                                </li>
207
                                            [% END %]
208
                                        [% END %]
209
                                    [% END # IF ( routing && CAN_user_serials_routing ) %]
210
211
                                    <li>
212
                                        <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
213
                                    </li>
214
                                </ul>
215
                                </div>
216
                            </div>
217
                        </td>
218
219
                      </tr>
220
                      [% END %]
221
                    [% END %]
222
                  </tbody>
223
                </table>
224
              [% ELSE %]
256
              [% ELSE %]
225
                <div class="dialog message">
257
                <div class="dialog message">
226
                  <p>Your search returned no open subscriptions.</p>
258
                  <p>Your search returned no open subscriptions.</p>
Lines 229-323 Link Here
229
            </div>
261
            </div>
230
            <div id="closed">
262
            <div id="closed">
231
              [% IF closedsubscriptions %]
263
              [% IF closedsubscriptions %]
232
                <table id="csrlt">
264
                [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
233
                <!-- FIXME add additional_fields for closed subs -->
234
                  <thead>
235
                    <tr>
236
                        <th>ISSN</th>
237
                        <th class="anti-the">Title</th>
238
                        <th>Notes</th>
239
                        <th>Library</th>
240
                        <th>Location</th>
241
                        <th>Call number</th>
242
                        [% FOR field IN additional_fields_for_subscription %]
243
                          <th>[% field.name %]</th>
244
                        [% END %]
245
                        <th class="NoSort">Actions</th>
246
                    </tr>
247
                  </thead>
248
                  <tfoot>
249
                    <tr>
250
                      <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
251
                      <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
252
                      <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
253
                      <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
254
                      <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
255
                      <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
256
                      [% FOR field IN additional_fields_for_subscription %]
257
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 5 %]" placeholder="Search [% field.name %]" /></td>
258
                      [% END %]
259
                      <td></td>
260
                    </tr>
261
                  </tfoot>
262
                  <tbody>
263
                    [% FOREACH subscription IN closedsubscriptions %]
264
                    [% UNLESS subscription.cannotdisplay %]
265
                      <tr>
266
                        <td>
267
                          [% IF ( subscription.issn ) %]
268
                            [% subscription.issn %]
269
                          [% END %]
270
                        </td>
271
                        <td>
272
                          <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
273
                        </td>
274
                        <td>
275
                          [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
276
                          [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
277
                        </td>
278
                        <td>
279
                          [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
280
                        </td>
281
                        <td>
282
                          [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
283
                        </td>
284
                        <td>
285
                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
286
                        </td>
287
                        [% FOR field IN additional_fields_for_subscription %]
288
                          [% IF field.authorised_value_category %]
289
                            <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
290
                          [% ELSE %]
291
                            <td>[% subscription.additional_fields.${field.name} %]</td>
292
                          [% END %]
293
                        [% END %]
294
                        <td>
295
                            <div class="dropdown">
296
                                <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">
297
                                   Actions <b class="caret"></b>
298
                                </a>
299
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid %]">
300
301
                                    [% IF ( routing && CAN_user_serials_routing ) %]
302
                                        [% UNLESS ( subscription.cannotedit ) %]
303
                                            <li>
304
                                                <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&amp;routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter | uri %]&amp;ISSN_filter=[% ISSN_filter | uri %]&amp;EAN_filter=[% EAN_filter | uri %]&amp;published_filter=[% publisher_filter | uri %]&amp;bookseller_filter=[% bookseller_filter | uri %]&amp;branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a>
305
                                            </li>
306
                                        [% END %]
307
                                    [% END # IF ( routing && CAN_user_serials_routing ) %]
308
309
                                    <li>
310
                                        <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
311
                                    </li>
312
313
                                </ul>
314
                            </div>
315
                        </td>
316
                      </tr>
317
                    [% END %]
318
                    [% END %]
319
                  </tbody>
320
                </table>
321
              [% ELSE %]
265
              [% ELSE %]
322
                <div class="dialog message">
266
                <div class="dialog message">
323
                  <p>Your search returned no closed subscriptions.</p>
267
                  <p>Your search returned no closed subscriptions.</p>
Lines 428-434 Link Here
428
    [% Asset.js("js/serials-toolbar.js") %]
372
    [% Asset.js("js/serials-toolbar.js") %]
429
    <script type="text/javascript">
373
    <script type="text/javascript">
430
        $(document).ready(function() {
374
        $(document).ready(function() {
431
            var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
375
            var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
432
                "sPaginationType": "four_button",
376
                "sPaginationType": "four_button",
433
                "aoColumnDefs": [
377
                "aoColumnDefs": [
434
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
378
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
Lines 437-443 Link Here
437
                ]
381
                ]
438
            }));
382
            }));
439
383
440
            var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
384
            var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, {
441
                // FIXME sort function of additional_fields!
385
                // FIXME sort function of additional_fields!
442
                "sPaginationType": "four_button",
386
                "sPaginationType": "four_button",
443
                "aoColumnDefs": [
387
                "aoColumnDefs": [
444
- 

Return to bug 18426