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 10-16 Link Here
10
<script type="text/javascript">
10
<script type="text/javascript">
11
//<![CDATA[
11
//<![CDATA[
12
 $(document).ready(function() {
12
 $(document).ready(function() {
13
    var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
13
    var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
14
        "sPaginationType": "four_button",
14
        "sPaginationType": "four_button",
15
        "aoColumnDefs": [
15
        "aoColumnDefs": [
16
            { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
16
            { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
Lines 19-25 Link Here
19
        ]
19
        ]
20
    } ) );
20
    } ) );
21
21
22
    var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
22
    var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, {
23
        // FIXME sort function of additional_fields!
23
        // FIXME sort function of additional_fields!
24
        "sPaginationType": "four_button",
24
        "sPaginationType": "four_button",
25
        "aoColumnDefs": [
25
        "aoColumnDefs": [
Lines 46-51 Link Here
46
46
47
<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>
47
<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>
48
48
49
50
[% BLOCK subscriptions_table %]
51
    <table id="osrlt">
52
      <thead>
53
        <tr>
54
            <th>ISSN</th>
55
            <th class="anti-the">Title</th>
56
            <th>Notes</th>
57
            <th>Library</th>
58
            <th>Location</th>
59
            <th>Call number</th>
60
            [% UNLESS closed %]
61
                <th class="title-string">Expiration date</th>
62
            [% END %]
63
            [% FOR field IN additional_fields_for_subscription %]
64
              <th>[% field.name %]</th>
65
            [% END %]
66
            <th class="NoSort">Actions</th>
67
        </tr>
68
      </thead>
69
      <tfoot>
70
        <tr>
71
          <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
72
          <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
73
          <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
74
          <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
75
          <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
76
          <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
77
          [% UNLESS closed %]
78
              <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search expiration date" /></td>
79
          [% END %]
80
          [% FOR field IN additional_fields_for_subscription %]
81
            <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
82
          [% END %]
83
          <td></td>
84
        </tr>
85
      </tfoot>
86
      <tbody>
87
        [% FOREACH subscription IN subscriptions %]
88
        [% UNLESS subscription.cannotdisplay %]
89
          <tr>
90
            <td>
91
            [% IF ( subscription.issn ) %][% subscription.issn %]
92
            [% END %]
93
            </td>
94
            <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
95
            </td>
96
            <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
97
            [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
98
            </td>
99
            <td>
100
              [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
101
            </td>
102
            <td>
103
              [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
104
            </td>
105
            <td>
106
              [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
107
            </td>
108
            [% UNLESS closed %]
109
                <td>
110
                    [% IF ( subscription.enddate ) %]
111
                        <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span>
112
                    [% ELSE %]
113
                        <span title="0000-00-00"></span>
114
                    [% END %]
115
                </td>
116
            [% END %]
117
118
            [% FOR field IN additional_fields_for_subscription %]
119
              [% IF field.authorised_value_category %]
120
                <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
121
              [% ELSE %]
122
                <td>[% subscription.additional_fields.${field.name} %]</td>
123
              [% END %]
124
            [% END %]
125
126
            <td>
127
                <div class="dropdown">
128
                    [% IF closed %]
129
                        <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">
130
                           Actions <b class="caret"></b>
131
                        </a>
132
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid %]">
133
134
                            [% IF ( routing && CAN_user_serials_routing ) %]
135
                                [% UNLESS ( subscription.cannotedit ) %]
136
                                    <li>
137
                                        <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>
138
                                    </li>
139
                                [% END %]
140
                            [% END # IF ( routing && CAN_user_serials_routing ) %]
141
142
                            <li>
143
                                <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
144
                            </li>
145
146
                        </ul>
147
                    [% ELSE %]
148
                        <div class="btn-group">
149
                            [% IF ( CAN_user_serials_receive_serials ) %]
150
                                [%# There should be no space between these two buttons, it would render badly %]
151
                                <a class="btn btn-default btn-xs" role="button"
152
                                   href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7"><i
153
                                   class="fa fa-inbox"></i> Serial receive</a><a
154
                                   class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button"
155
                                   data-toggle="dropdown" href="#"><b class="caret"></b></a>
156
                            [% ELSE %]
157
                                <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>
158
                            [% END %]
159
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid %]">
160
161
                            [% IF ( routing && CAN_user_serials_routing ) %]
162
                                [% IF ( subscription.cannotedit ) %]
163
                                [% ELSE %]
164
                                    [% IF ( subscription.routingedit ) %]
165
                                        <li>
166
                                            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit %])</a>
167
                                        </li>
168
                                    [% ELSE %]
169
                                        <li>
170
                                            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
171
                                        </li>
172
                                    [% END %]
173
                                [% END %]
174
                            [% END # IF ( routing && CAN_user_serials_routing ) %]
175
176
                            <li>
177
                                <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
178
                            </li>
179
                        </ul>
180
                        </div>
181
                    [% END %]
182
                </div>
183
            </td>
184
185
          </tr>
186
          [% END %]
187
        [% END %]
188
      </tbody>
189
    </table>
190
[% END %]
191
49
<div id="doc3" class="yui-t2">
192
<div id="doc3" class="yui-t2">
50
  <div id="bd">
193
  <div id="bd">
51
    <div id="yui-main">
194
    <div id="yui-main">
Lines 139-256 Link Here
139
            </ul>
282
            </ul>
140
            <div id="opened">
283
            <div id="opened">
141
              [% IF openedsubscriptions %]
284
              [% IF openedsubscriptions %]
142
                <table id="osrlt">
285
                  [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
143
                  <thead>
144
                    <tr>
145
                        <th>ISSN</th>
146
                        <th class="anti-the">Title</th>
147
                        <th>Notes</th>
148
                        <th>Library</th>
149
                        <th>Location</th>
150
                        <th>Call number</th>
151
                        <th class="title-string">Expiration date</th>
152
                        [% FOR field IN additional_fields_for_subscription %]
153
                          <th>[% field.name %]</th>
154
                        [% END %]
155
                        <th class="NoSort">Actions</th>
156
                    </tr>
157
                  </thead>
158
                  <tfoot>
159
                    <tr>
160
                      <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
161
                      <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
162
                      <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
163
                      <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
164
                      <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
165
                      <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
166
                      <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search expiration date" /></td>
167
                      [% FOR field IN additional_fields_for_subscription %]
168
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
169
                      [% END %]
170
                      <td></td>
171
                    </tr>
172
                  </tfoot>
173
                  <tbody>
174
                    [% FOREACH subscription IN openedsubscriptions %]
175
                    [% UNLESS subscription.cannotdisplay %]
176
                      <tr>
177
                        <td>
178
                        [% IF ( subscription.issn ) %][% subscription.issn %]
179
                        [% END %]
180
                        </td>
181
                        <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
182
                        </td>
183
                        <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
184
                        [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
185
                        </td>
186
                        <td>
187
                          [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
188
                        </td>
189
                        <td>
190
                          [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
191
                        </td>
192
                        <td>
193
                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
194
                        </td>
195
                        <td>
196
                            [% IF ( subscription.enddate ) %]
197
                                <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span>
198
                            [% ELSE %]
199
                                <span title="0000-00-00"></span>
200
                            [% END %]
201
                        </td>
202
203
                        [% FOR field IN additional_fields_for_subscription %]
204
                          [% IF field.authorised_value_category %]
205
                            <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
206
                          [% ELSE %]
207
                            <td>[% subscription.additional_fields.${field.name} %]</td>
208
                          [% END %]
209
                        [% END %]
210
211
                        <td>
212
                            <div class="dropdown">
213
                                <div class="btn-group">
214
                                    [% IF ( CAN_user_serials_receive_serials ) %]
215
                                        [%# There should be no space between these two buttons, it would render badly %]
216
                                        <a class="btn btn-default btn-xs" role="button"
217
                                           href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7"><i
218
                                           class="fa fa-inbox"></i> Serial receive</a><a
219
                                           class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button"
220
                                           data-toggle="dropdown" href="#"><b class="caret"></b></a>
221
                                    [% ELSE %]
222
                                        <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>
223
                                    [% END %]
224
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid %]">
225
226
                                    [% IF ( routing && CAN_user_serials_routing ) %]
227
                                        [% IF ( subscription.cannotedit ) %]
228
                                        [% ELSE %]
229
                                            [% IF ( subscription.routingedit ) %]
230
                                                <li>
231
                                                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit %])</a>
232
                                                </li>
233
                                            [% ELSE %]
234
                                                <li>
235
                                                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
236
                                                </li>
237
                                            [% END %]
238
                                        [% END %]
239
                                    [% END # IF ( routing && CAN_user_serials_routing ) %]
240
241
                                    <li>
242
                                        <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
243
                                    </li>
244
                                </ul>
245
                                </div>
246
                            </div>
247
                        </td>
248
249
                      </tr>
250
                      [% END %]
251
                    [% END %]
252
                  </tbody>
253
                </table>
254
              [% ELSE %]
286
              [% ELSE %]
255
                <div class="dialog message">
287
                <div class="dialog message">
256
                  <p>Your search returned no open subscriptions.</p>
288
                  <p>Your search returned no open subscriptions.</p>
Lines 259-353 Link Here
259
            </div>
291
            </div>
260
            <div id="closed">
292
            <div id="closed">
261
              [% IF closedsubscriptions %]
293
              [% IF closedsubscriptions %]
262
                <table id="csrlt">
294
                [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
263
                <!-- FIXME add additional_fields for closed subs -->
264
                  <thead>
265
                    <tr>
266
                        <th>ISSN</th>
267
                        <th class="anti-the">Title</th>
268
                        <th>Notes</th>
269
                        <th>Library</th>
270
                        <th>Location</th>
271
                        <th>Call number</th>
272
                        [% FOR field IN additional_fields_for_subscription %]
273
                          <th>[% field.name %]</th>
274
                        [% END %]
275
                        <th class="NoSort">Actions</th>
276
                    </tr>
277
                  </thead>
278
                  <tfoot>
279
                    <tr>
280
                      <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
281
                      <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
282
                      <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
283
                      <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
284
                      <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
285
                      <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
286
                      [% FOR field IN additional_fields_for_subscription %]
287
                        <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 5 %]" placeholder="Search [% field.name %]" /></td>
288
                      [% END %]
289
                      <td></td>
290
                    </tr>
291
                  </tfoot>
292
                  <tbody>
293
                    [% FOREACH subscription IN closedsubscriptions %]
294
                    [% UNLESS subscription.cannotdisplay %]
295
                      <tr>
296
                        <td>
297
                          [% IF ( subscription.issn ) %]
298
                            [% subscription.issn %]
299
                          [% END %]
300
                        </td>
301
                        <td>
302
                          <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
303
                        </td>
304
                        <td>
305
                          [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
306
                          [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
307
                        </td>
308
                        <td>
309
                          [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
310
                        </td>
311
                        <td>
312
                          [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
313
                        </td>
314
                        <td>
315
                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
316
                        </td>
317
                        [% FOR field IN additional_fields_for_subscription %]
318
                          [% IF field.authorised_value_category %]
319
                            <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
320
                          [% ELSE %]
321
                            <td>[% subscription.additional_fields.${field.name} %]</td>
322
                          [% END %]
323
                        [% END %]
324
                        <td>
325
                            <div class="dropdown">
326
                                <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">
327
                                   Actions <b class="caret"></b>
328
                                </a>
329
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid %]">
330
331
                                    [% IF ( routing && CAN_user_serials_routing ) %]
332
                                        [% UNLESS ( subscription.cannotedit ) %]
333
                                            <li>
334
                                                <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>
335
                                            </li>
336
                                        [% END %]
337
                                    [% END # IF ( routing && CAN_user_serials_routing ) %]
338
339
                                    <li>
340
                                        <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
341
                                    </li>
342
343
                                </ul>
344
                            </div>
345
                        </td>
346
                      </tr>
347
                    [% END %]
348
                    [% END %]
349
                  </tbody>
350
                </table>
351
              [% ELSE %]
295
              [% ELSE %]
352
                <div class="dialog message">
296
                <div class="dialog message">
353
                  <p>Your search returned no closed subscriptions.</p>
297
                  <p>Your search returned no closed subscriptions.</p>
354
- 

Return to bug 18426