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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-373 / +425 lines)
Lines 25-31 Link Here
25
        <label for="allow_changes_from">Allow changes to contents from: </label>
25
        <label for="allow_changes_from">Allow changes to contents from: </label>
26
        <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
26
        <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
27
27
28
            [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
28
            [% IF shelf.allow_change_from_owner %]
29
                <option value="0">Nobody</option>
30
            [% ELSE %]
31
                <option value="0" selected="selected">Nobody</option>
32
            [% END %]
29
33
30
            [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
34
            [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
31
                <option value="1" selected="selected">Owner only</option>
35
                <option value="1" selected="selected">Owner only</option>
Lines 33-42 Link Here
33
                <option value="1">Owner only</option>
37
                <option value="1">Owner only</option>
34
            [% END %]
38
            [% END %]
35
39
36
            [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
40
            [% IF shelf.allow_change_from_others %]
37
41
                <option value="2" selected="selected">Anyone seeing this list</option>
38
            [% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %]
42
            [% ELSE %]
43
                <option value="2">Anyone seeing this list</option>
44
            [% END %]
39
45
46
            [% IF shelf.allow_change_from_staff %]
47
                <option value="3" selected="selected">Staff only</option>
48
            [% ELSE %]
49
                <option value="3">Staff only</option>
50
                [% END %]
40
        </select>
51
        </select>
41
        &emsp; <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
52
        &emsp; <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
42
        &emsp; <span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span>
53
        &emsp; <span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span>
Lines 96-102 Link Here
96
        [% IF op == 'view' %]
107
        [% IF op == 'view' %]
97
            <li>
108
            <li>
98
                <a href="#" aria-current="page">
109
                <a href="#" aria-current="page">
99
            Contents of <em>[% shelf.shelfname | html %]</em>
110
                    Contents of <em>[% shelf.shelfname | html %]</em>
100
                </a>
111
                </a>
101
            </li>
112
            </li>
102
        [% END %]
113
        [% END %]
Lines 118-495 Link Here
118
        [% END %]
129
        [% END %]
119
130
120
        [% IF op == 'transfer' %]
131
        [% IF op == 'transfer' %]
121
            <li><a href="#" aria-current="page">Transfer list <em>[% shelf.shelfname | html %]</em></a></li>
132
            <li>
133
                <a href="#" aria-current="page">Transfer list <em>[% shelf.shelfname | html %]</em></a>
134
            </li>
122
        [% END %]
135
        [% END %]
123
    </ol>
136
    </ol>
124
</nav>
137
</nav>
125
138
126
    <div class="main container-fluid">
139
<div class="main container-fluid">
127
        <div class="row">
140
    <div class="row">
128
            <div class="col-sm-10 col-sm-push-1">
141
        <div class="col-sm-10 col-sm-push-1">
129
                <main>
142
            <main>
130
143
131
                [% IF op != 'transfer' %][% INCLUDE 'virtualshelves-toolbar.inc' %][% END %]
144
            [% IF op != 'transfer' %][% INCLUDE 'virtualshelves-toolbar.inc' %][% END %]
132
145
133
[% FOR m IN messages %]
146
            [% FOR m IN messages %]
134
    <div class="dialog [% m.type | html %]">
147
                <div class="dialog [% m.type | html %]">
135
        [% SWITCH m.code %]
148
                    [% SWITCH m.code %]
136
        [% CASE 'error_on_update' %]
149
                        [% CASE 'error_on_update' %]
137
            <span>An error occurred when updating this list.</span>
150
                            <span>An error occurred when updating this list.</span>
138
        [% CASE 'error_on_insert' %]
151
                        [% CASE 'error_on_insert' %]
139
            <span>An error occurred when creating this list.</span>
152
                            <span>An error occurred when creating this list.</span>
140
        [% CASE 'error_on_delete' %]
153
                        [% CASE 'error_on_delete' %]
141
            <span>An error occurred when deleting this list.</span>
154
                            <span>An error occurred when deleting this list.</span>
142
        [% CASE 'error_on_add_biblio' %]
155
                        [% CASE 'error_on_add_biblio' %]
143
            [% IF m.item_barcode %]
156
                            [% IF m.item_barcode %]
144
               <span>The item ([% m.item_barcode | html %]) has not been added to the list. Please verify it is not already in the list.</span>
157
                                <span>The item ([% m.item_barcode | html %]) has not been added to the list. Please verify it is not already in the list.</span>
145
            [% ELSE %]
158
                            [% ELSE %]
146
                <span>The record ([% m.bibnum | html %]) has not been added to the list. Please verify it is not already in the list.</span>
159
                                <span>The record ([% m.bibnum | html %]) has not been added to the list. Please verify it is not already in the list.</span>
147
            [% END %]
160
                            [% END %]
148
        [% CASE 'success_on_update' %]
161
                        [% CASE 'success_on_update' %]
149
            <span>List updated.</span>
162
                            <span>List updated.</span>
150
        [% CASE 'success_on_insert' %]
163
                        [% CASE 'success_on_insert' %]
151
            <span>List created.</span>
164
                            <span>List created.</span>
152
        [% CASE 'success_on_delete' %]
165
                        [% CASE 'success_on_delete' %]
153
            <span>List deleted.</span>
166
                            <span>List deleted.</span>
154
        [% CASE 'success_on_add_biblio' %]
167
                        [% CASE 'success_on_add_biblio' %]
155
            [% IF m.item_barcode %]
168
                            [% IF m.item_barcode %]
156
                <span>The item ([% m.item_barcode | html %]) has been added to the list.</span>
169
                                <span>The item ([% m.item_barcode | html %]) has been added to the list.</span>
157
            [% ELSE %]
170
                            [% ELSE %]
158
                <span>The record ([% m.bibnum | html %]) has been added to the list.</span>
171
                                <span>The record ([% m.bibnum | html %]) has been added to the list.</span>
159
            [% END %]
172
                            [% END %]
160
        [% CASE 'success_on_remove_biblios' %]
173
                        [% CASE 'success_on_remove_biblios' %]
161
            <span>The item has been removed from the list.</span>
174
                            <span>The item has been removed from the list.</span>
162
        [% CASE 'does_not_exist' %]
175
                        [% CASE 'does_not_exist' %]
163
            <span>This list does not exist.</span>
176
                            <span>This list does not exist.</span>
164
        [% CASE 'item_does_not_exist' %]
177
                        [% CASE 'item_does_not_exist' %]
165
            [% IF m.item_barcode %]
178
                            [% IF m.item_barcode %]
166
                <span>The item ([% m.item_barcode | html %]) does not exist.</span>
179
                                <span>The item ([% m.item_barcode | html %]) does not exist.</span>
167
            [% ELSE %]
180
                            [% ELSE %]
168
                <span>The record ([% m.bibnum | html %]) does not exist.</span>
181
                                <span>The record ([% m.bibnum | html %]) does not exist.</span>
182
                            [% END %]
183
                        [% CASE 'unauthorized_on_view' %]
184
                            <span>You do not have permission to view this list.</span>
185
                        [% CASE 'unauthorized_on_update' %]
186
                            <span>You do not have permission to update this list.</span>
187
                        [% CASE 'unauthorized_on_delete' %]
188
                            <span>You do not have permission to delete this list.</span>
189
                        [% CASE 'unauthorized_on_add_biblio' %]
190
                            <span>You do not have permission to add a record to this list.</span>
191
                        [% CASE 'unauthorized_transfer' %]
192
                            <span>You do not have permission to transfer ownership of this list.</span>
193
                        [% CASE 'new_owner_not_found' %]
194
                            <span>The new owner could not be found anymore.</span>
195
                        [% CASE 'no_biblio_removed' %]
196
                            <span>No record was removed.</span>
197
198
                        [% CASE 'Koha::Exceptions::Virtualshelf::DuplicateObject' %]
199
                            <span>An error occurred when creating this list. The name [% shelfname | html %] already exists.</span>
200
                        [% CASE 'Koha::Exceptions::Virtualshelf::UseDbAdminAccount' %]
201
                            <span>List could not be created. (Do not use the database administrator account.)</span>
202
                        [% CASE 'DBIx::Class::Exception' %]
203
                            [% m.msg | html %]
204
205
                        [% CASE %]
206
                            [% m.code | html %] [% m.msg | html %]
207
                    [% END %]
208
                </div>
169
            [% END %]
209
            [% END %]
170
        [% CASE 'unauthorized_on_view' %]
171
            <span>You do not have permission to view this list.</span>
172
        [% CASE 'unauthorized_on_update' %]
173
            <span>You do not have permission to update this list.</span>
174
        [% CASE 'unauthorized_on_delete' %]
175
           <span>You do not have permission to delete this list.</span>
176
        [% CASE 'unauthorized_on_add_biblio' %]
177
            <span>You do not have permission to add a record to this list.</span>
178
        [% CASE 'unauthorized_transfer' %]
179
            <span>You do not have permission to transfer ownership of this list.</span>
180
        [% CASE 'new_owner_not_found' %]
181
            <span>The new owner could not be found anymore.</span>
182
        [% CASE 'no_biblio_removed' %]
183
            <span>No record was removed.</span>
184
185
        [% CASE 'Koha::Exceptions::Virtualshelf::DuplicateObject' %]
186
            <span>An error occurred when creating this list. The name [% shelfname | html %] already exists.</span>
187
        [% CASE 'Koha::Exceptions::Virtualshelf::UseDbAdminAccount' %]
188
            <span>List could not be created. (Do not use the database administrator account.)</span>
189
        [% CASE 'DBIx::Class::Exception' %]
190
            [% m.msg | html %]
191
192
        [% CASE %]
193
            [% m.code | html %] [% m.msg | html %]
194
        [% END %]
195
    </div>
196
[% END %]
197
198
[% IF op == 'transfer' %]
199
    <h1>Transfer ownership of public list [% shelf.shelfname | html %]</h1>
200
201
    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="transferform" method="post">
202
    <fieldset>
203
        <input type="hidden" name="op" value="transfer" />
204
        <input type="hidden" name="public" value="1" />
205
        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
206
207
        <div>
208
            <label for="find_patron">Search for new owner: </label>
209
            <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
210
        </div>
211
210
212
        <br/>
211
            [% IF op == 'transfer' %]
213
        <div>
212
                <h1>Transfer ownership of public list [% shelf.shelfname | html %]</h1>
214
            <label for="find_patron">New owner: </label>
213
215
            <span id="new_owner_name"></span>
214
                <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="transferform" method="post">
216
            <input type="hidden" id="new_owner" name="new_owner" value="" />
215
                    <fieldset>
217
        </div>
216
                        <input type="hidden" name="op" value="transfer" />
217
                        <input type="hidden" name="public" value="1" />
218
                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
219
220
                        <div>
221
                            <label for="find_patron">Search for new owner: </label>
222
                            <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
223
                        </div>
224
225
                        <br/>
226
                        <div>
227
                            <label for="find_patron">New owner: </label>
228
                            <span id="new_owner_name"></span>
229
                            <input type="hidden" id="new_owner" name="new_owner" value="" />
230
                        </div>
231
232
                        <br/>
233
                        <fieldset class="action">
234
                            <input type="submit" value="Transfer" class="submit" />
235
                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=1" class="cancel">Cancel</a>
236
                        </fieldset>
218
237
219
        <br/>
238
                    </fieldset>
220
        <fieldset class="action">
239
                </form>
221
            <input type="submit" value="Transfer" class="submit" />
240
            [% END %]
222
            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=1" class="cancel">Cancel</a>
223
        </fieldset>
224
241
225
    </fieldset>
242
            [% IF op == 'view' %]
226
    </form>
243
                <h1>Contents of <em>[% shelf.shelfname | html %]</em></h1>
227
[% END %]
244
                [% IF itemsloop %]
245
                    <div class="pages">[% pagination_bar | $raw %]</div>
246
                    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post">
247
                        <input type="hidden" name="op" value="remove_biblios" />
248
                        <input type="hidden" name="referer" value="view" />
249
                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
250
251
                        [% IF direction == 'asc' %]
252
                            [% SET new_direction = 'desc' %]
253
                        [% ELSE %]
254
                            [% SET direction = 'desc' %]
255
                            [% SET new_direction = 'asc' %]
256
                        [% END %]
228
257
229
[% IF op == 'view' %]
258
                        [% IF itemsloop %]
230
    <h1>Contents of <em>[% shelf.shelfname | html %]</em></h1>
259
                            <div id="searchheader" class="searchheader noprint">
231
    [% IF itemsloop %]
260
                                <div id="selection_ops">
232
    <div class="pages">[% pagination_bar | $raw %]</div>
261
                                    <span class="checkall"></span> |
233
    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post">
262
                                    <span class="clearall"></span>
234
        <input type="hidden" name="op" value="remove_biblios" />
263
235
        <input type="hidden" name="referer" value="view" />
264
                                    <span class="addto">| </span>
236
        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
265
                                    &nbsp;
237
266
                                    [% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %]
238
[% IF direction == 'asc' %]
267
                                        <div class="btn-group"><button class="btn btn-default btn-xs placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button></div>
239
    [% SET new_direction = 'desc' %]
268
                                    [% END %]
240
[% ELSE %]
269
                                    [% IF can_remove_biblios %]
241
    [% SET direction = 'desc' %]
270
                                        <div class="btn-group"><button type="submit" class="btn btn-default btn-xs list-remove"><i class="fa fa-trash"></i> Remove selected</button></div>
242
    [% SET new_direction = 'asc' %]
271
                                    [% END %]
243
[% END %]
272
                                    [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
273
                                        <div class="btn-group"><button type="submit" class="btn btn-default btn-xs merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>
274
                                    [% END %]
275
                                </div>
276
                            </div>
277
                        [% END %]
244
278
245
[% IF itemsloop %]
279
                        <table id="searchresults" class="dataTable">
246
    <div id="searchheader" class="searchheader noprint">
280
                            <thead>
247
        <div id="selection_ops"><span class="checkall"></span> |
281
                                <tr>
248
        <span class="clearall"></span>
282
                                    [% IF ( itemsloop ) %]
283
                                        <th class="checkall">&nbsp;</th>
284
                                    [% END %]
285
                                    [% UNLESS ( item_level_itypes ) %]
286
                                        <th>Item type</th>
287
                                    [% END %]
288
                                    [% IF sortfield == 'title' %]
289
                                        <th class="sorting_[% direction | html %]">
290
                                    [% ELSE %]
291
                                        <th class="sorting">
292
                                    [% END %]
293
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=title&amp;direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction | uri %][% END %]">Title</a>
294
                                    </th>
295
                                    [% IF sortfield == 'author' %]
296
                                        <th class="sorting_[% direction | html %]">
297
                                    [% ELSE %]
298
                                        <th class="sorting">
299
                                    [% END %]
300
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=author&amp;direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction | uri %][% END %]">Author</a>
301
                                    </th>
302
                                    [% IF sortfield == 'dateadded' %]
303
                                        <th class="sorting_[% direction | html %]">
304
                                    [% ELSE %]
305
                                        <th class="sorting">
306
                                    [% END %]
307
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=dateadded&amp;direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction | uri %][% END %]">Date added</a>
308
                                    </th>
309
                                    [% IF sortfield == 'itemcallnumber' %]
310
                                        <th class="sorting_[% direction | html %]">
311
                                    [% ELSE %]
312
                                        <th class="sorting">
313
                                    [% END %]
314
                                        <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction | uri %][% END %]">Call number</a>
315
                                    </th>
316
                                </tr>
317
                            </thead>
318
                            [% FOREACH itemsloo IN itemsloop %]
319
                                <tr>
320
                                    [% IF itemsloop %]
321
                                        <td>
322
                                            <input type="checkbox" class="selection" value="[% itemsloo.biblionumber | html %]" name="biblionumber" />
323
                                        </td>
324
                                    [% END %]
325
                                    [% UNLESS ( item_level_itypes ) %]
326
                                        <td>
327
                                            [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]
328
                                                <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
329
                                            [% END %]
330
                                            [% itemsloo.description | html %]
331
                                        </td>
332
                                    [% END %]
333
                                    <td>
334
                                        [% IF ( itemsloo.XSLTBloc ) %]
335
                                            [% itemsloo.XSLTBloc | $raw %]
336
                                        [% ELSE %]
337
                                            [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %]
338
                                            </a>
339
                                        [% END %]
340
                                        <p class="hold">
341
                                            [% IF ( itemsloo.notforloan ) %]
342
                                                <span class="noholdstext">No holds allowed</span>
343
                                            [% ELSE %]
344
                                                [% IF ( itemsloo.ITEM_RESULTS.count ) %]
345
                                                    <a id="reserve_[% itemsloo.biblionumber | html %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | html %]">Holds</a>
346
                                                    [% IF ( holdfor ) %]
347
                                                        <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | uri %]&amp;findborrower=[% holdfor_patron.cardnumber | uri %]">Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %]</a></span>
348
                                                    [% END %]
349
                                                [% ELSE %]
350
                                                    <span class="noholdstext">No holds allowed</span>
351
                                                [% END %]
352
                                            [% END %]
353
                                            [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
354
                                                | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit record</a>
355
                                            [% END %]
356
                                            [% IF ( CAN_user_editcatalogue_edit_items ) %]
357
                                                | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit items</a>
358
                                            [% END %]
359
                                        </p>
360
                                    </td>
361
                                    <td>
362
                                        [% itemsloo.author | html %]
363
                                    </td>
364
                                    <td>
365
                                        [% itemsloo.dateadded | $KohaDates%]
366
                                    </td>
367
                                    <td>
368
                                        <ul>
369
                                            [% FOREACH item IN itemsloo.ITEM_RESULTS %]
370
                                                <li>
371
                                                    [% Branches.GetName(item.holdingbranch) | html %]
372
                                                    [% IF ( item.location ) %]
373
                                                        <span class="shelvingloc">
374
                                                            [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
375
                                                        </span>
376
                                                    [% END %]
377
                                                    [% IF ( item.itemcallnumber ) %]
378
                                                        [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% item.itemcallnumber | uri %]%22">[% item.itemcallnumber | html %]</a>]
379
                                                    [% END %]
380
                                                </li>
381
                                            [% END %]
382
                                        </ul>
383
                                    </td>
384
                                </tr>
385
                            [% END %]<!-- /itemsloop -->
386
                        </table>
387
                        <div class="pages">[% pagination_bar | $raw %]</div>
388
                    </form>
389
                [% END %]
390
            [% END %]
249
391
250
        <span class="addto">| </span>
392
            [% IF op == 'add_form' OR op == 'edit_form' %]
251
        &nbsp;
252
        [% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %]
253
            <div class="btn-group"><button class="btn btn-default btn-xs placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button></div>
254
        [% END %]
255
        [% IF can_remove_biblios %]
256
            <div class="btn-group"><button type="submit" class="btn btn-default btn-xs list-remove"><i class="fa fa-trash"></i> Remove selected</button></div>
257
        [% END %]
258
        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-default btn-xs merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>[% END %]
259
        </div>
260
    </div>
261
[% END %]
262
393
263
    <table id="searchresults" class="dataTable">
394
                <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
264
        <thead>
395
                    <fieldset class="rows">
265
            <tr>
396
                        [% IF op == 'add_form' %]
266
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
397
                            <legend><h1>Create a new list</h1></legend>
398
                            <input type="hidden" name="op" value="add" />
399
                        [% ELSE %]
400
                            <legend><h1>Edit list <em>[% shelf.shelfname | html %]</em></h1></legend>
401
                            <input type="hidden" name="op" value="edit" />
402
                        [% END %]
403
                        <input type="hidden" name="referer" value="[% referer | html %]" />
404
                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
405
                        <ol>
406
                            <li>
407
                                <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" />
408
                                <span class="required">Required</span>
409
                            </li>
410
                            <li>
411
                                <span class="label">Owner: </span>
412
                                [% IF op == 'add_form' %]
413
                                    <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
414
                                [% ELSE %]
415
                                    [% IF owner %]
416
                                        <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber | html %]" />[% owner.firstname _ ' ' _ owner.surname | html %]
417
                                    [% ELSE %]
418
                                        <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
419
                                    [% END %]
420
                                [% END %]
421
                            </li>
422
                            <li>
423
                                <label for="sortfield" >Sort this list by: </label>
424
                                <select name="sortfield">
425
                                    [% IF shelf.sortfield == "title" %]
426
                                        <option value="title" selected="selected">Title</option>
427
                                    [% ELSE %]
428
                                        <option value="title">Title</option>
429
                                    [% END %]
430
                                    [% IF shelf.sortfield == "author" %]
431
                                        <option value="author" selected="selected">Author</option>
432
                                    [% ELSE %]
433
                                        <option value="author">Author</option>
434
                                    [% END %]
435
                                    [% IF shelf.sortfield == "copyrightdate" %]
436
                                        <option value="copyrightdate" selected="selected">Copyrightdate</option>
437
                                    [% ELSE %]
438
                                        <option value="copyrightdate">Copyrightdate</option>
439
                                    [% END %]
440
                                    [% IF shelf.sortfield == "itemcallnumber" %]
441
                                        <option value="itemcallnumber" selected="selected">Call number</option>
442
                                    [% ELSE %]
443
                                        <option value="itemcallnumber">Call number</option>
444
                                    [% END %]
445
                                    [% IF shelf.sortfield == "dateadded" %]
446
                                        <option value="dateadded" selected="selected">Date added</option>
447
                                    [% ELSE %]
448
                                        <option value="dateadded">Date added</option>
449
                                    [% END %]
450
                                </select>
451
                            </li>
452
                            <li>
453
                                <label for="public">Public: </label>
454
                                <select id="public" name="public" onchange="AdjustRemark()">
455
                                    [% IF shelf.is_private %]
456
                                        <option value="0" selected="selected">Private</option>
457
                                    [% ELSE %]
458
                                        <option value="0">Private</option>
459
                                    [% END %]
460
                                    [% IF shelf.is_public %]
461
                                        <option value="1" selected="selected">Public</option>
462
                                    [% ELSE %]
463
                                        <option value="1">Public</option>
464
                                    [% END %]
465
                                </select>
466
                            </li>
467
                            [% INCLUDE list_permissions %]
468
                        </ol>
469
                    </fieldset>
267
470
268
                [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
471
                    <fieldset class="action">
269
                [% IF sortfield == 'title' %]
472
                        <input type="submit" value="Save" class="submit" />
270
                    <th class="sorting_[% direction | html %]">
473
                        [% IF referer == 'view' %]
271
                [% ELSE %]
474
                            <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
272
                    <th class="sorting">
273
                [% END %]
274
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=title&amp;direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction | uri %][% END %]">Title</a>
275
                </th>
276
                [% IF sortfield == 'author' %]
277
                    <th class="sorting_[% direction | html %]">
278
                [% ELSE %]
279
                    <th class="sorting">
280
                [% END %]
281
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=author&amp;direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction | uri %][% END %]">Author</a>
282
                </th>
283
                [% IF sortfield == 'dateadded' %]
284
                    <th class="sorting_[% direction | html %]">
285
                [% ELSE %]
286
                    <th class="sorting">
287
                [% END %]
288
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=dateadded&amp;direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction | uri %][% END %]">Date added</a>
289
                </th>
290
                [% IF sortfield == 'itemcallnumber' %]
291
                     <th class="sorting_[% direction | html %]">
292
                [% ELSE %]
293
                    <th class="sorting">
294
                [% END %]
295
                    <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;sortfield=itemcallnumber&amp;direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction | uri %][% END %]">Call number</a>
296
                 </th>
297
            </tr>
298
        </thead>
299
        [% FOREACH itemsloo IN itemsloop %]
300
                <tr>
301
            [% IF itemsloop %]
302
                <td>
303
                    <input type="checkbox" class="selection" value="[% itemsloo.biblionumber | html %]" name="biblionumber" />
304
                </td>
305
            [% END %]
306
			[% UNLESS ( item_level_itypes ) %]<td>
307
                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />[% END %][% itemsloo.description | html %]
308
			</td>[% END %]
309
			<td>
310
                [% IF ( itemsloo.XSLTBloc ) %]
311
                    [% itemsloo.XSLTBloc | $raw %]
312
                [% ELSE %]
313
                        [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %]
314
                    </a>
315
                [% END %]
316
                    <p class="hold">
317
                        [% IF ( itemsloo.notforloan ) %]
318
                            <span class="noholdstext">No holds allowed</span>
319
                        [% ELSE %]
475
                        [% ELSE %]
320
                            [% IF ( itemsloo.ITEM_RESULTS.count ) %]
476
                            [% IF public %]
321
                                <a id="reserve_[% itemsloo.biblionumber | html %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | html %]">Holds</a>
477
                                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=1" class="cancel">Cancel</a>
322
                                [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | uri %]&amp;findborrower=[% holdfor_patron.cardnumber | uri %]">Place hold for [% INCLUDE 'patron-title.inc' patron => holdfor_patron no_title => 1 %]</a></span>[% END %]
323
                            [% ELSE %]
478
                            [% ELSE %]
324
                                <span class="noholdstext">No holds allowed</span>
479
                                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=0" class="cancel">Cancel</a>
325
                            [% END %]
480
                            [% END %]
326
                        [% END %]
481
                        [% END %]
327
                        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
482
                    </fieldset>
328
                            | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit record</a>
483
                </form>
329
                        [% END %]
330
                        [% IF ( CAN_user_editcatalogue_edit_items ) %]
331
                            | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit items</a>
332
                        [% END %]
333
                    </p>
334
            </td>
335
            <td>[% itemsloo.author | html %]</td>
336
            <td>[% itemsloo.dateadded | $KohaDates%]</td>
337
            <td>
338
                <ul>
339
                [% FOREACH item IN itemsloo.ITEM_RESULTS %]
340
                    <li>
341
                        [% Branches.GetName(item.holdingbranch) | html %]
342
                        [% IF ( item.location ) %]
343
                            <span class="shelvingloc">
344
                                [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
345
                            </span>
346
                        [% END %]
347
                        [% IF ( item.itemcallnumber ) %]
348
                            [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% item.itemcallnumber | uri %]%22">[% item.itemcallnumber | html %]</a>]
349
                        [% END %]
350
                    </li>
351
                [% END %]
352
                </ul>
353
            </td>
354
			</tr>
355
		[% END %]<!-- /itemsloop -->
356
    </table>
357
    <div class="pages">[% pagination_bar | $raw %]</div>
358
</form>
359
360
	[% END %]
361
[% END %]
362
363
[% IF op == 'add_form' OR op == 'edit_form' %]
364
365
    <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
366
        <fieldset class="rows">
367
368
        [% IF op == 'add_form' %]
369
        <legend><h1>Create a new list</h1></legend>
370
            <input type="hidden" name="op" value="add" />
371
        [% ELSE %]
372
        <legend><h1>Edit list <em>[% shelf.shelfname | html %]</em></h1></legend>
373
            <input type="hidden" name="op" value="edit" />
374
        [% END %]
375
        <input type="hidden" name="referer" value="[% referer | html %]" />
376
        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
377
        <ol>
378
            <li>
379
                <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" />
380
            <span class="required">Required</span>
381
            </li>
382
            <li>
383
                <span class="label">Owner: </span>
384
                [% IF op == 'add_form' %]
385
                    <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
386
                [% ELSE %]
387
                    [% IF owner %]
388
                        <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber | html %]" />[% owner.firstname _ ' ' _ owner.surname | html %]
389
                    [% ELSE %]
390
                        <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
391
                    [% END %]
392
                [% END %]
393
            </li>
394
            <li><label for="sortfield" >Sort this list by: </label>
395
            <select name="sortfield">
396
            [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
397
            [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
398
            [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
399
            [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
400
            [% IF shelf.sortfield == "dateadded" %]<option value="dateadded" selected="selected">Date added</option>[% ELSE %]<option value="dateadded">Date added</option>[% END %]
401
            </select></li>
402
            <li><label for="public">Public: </label>
403
                <select id="public" name="public" onchange="AdjustRemark()">
404
                [% IF shelf.is_private %]
405
                    <option value="0" selected="selected">Private</option>
406
                [% ELSE %]
407
                    <option value="0">Private</option>
408
                [% END %]
409
                [% IF shelf.is_public %]
410
                    <option value="1" selected="selected">Public</option>
411
                [% ELSE %]
412
                    <option value="1">Public</option>
413
                [% END %]
414
                           </select></li>
415
416
            [% INCLUDE list_permissions %]
417
418
        </ol>
419
    </fieldset>
420
421
    <fieldset class="action">
422
        <input type="submit" value="Save" class="submit" />
423
        [% IF referer == 'view' %]
424
           <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&amp;shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
425
       [% ELSE %]
426
            [% IF public %]
427
                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=1" class="cancel">Cancel</a>
428
            [% ELSE %]
429
                <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&amp;public=0" class="cancel">Cancel</a>
430
            [% END %]
484
            [% END %]
431
        [% END %]
432
    </fieldset>
433
    </form>
434
435
[% END %]
436
485
437
[% IF op == 'list' %]
486
            [% IF op == 'list' %]
438
    <h1>Lists</h1>
487
                <h1>Lists</h1>
439
    <div id="tabs" class="toptabs">
488
                <div id="tabs" class="toptabs">
440
        <ul>
489
                    <ul>
441
            <li id="privateshelves_tab" class="active"><a href="#tab_content">Your lists</a></li>
490
                        <li id="privateshelves_tab" class="active">
442
            <li id="publicshelves_tab" class="active"><a href="#tab_content">Public lists</a></li>
491
                            <a href="#tab_content">Your lists</a>
443
        </ul>
492
                        </li>
444
493
                        <li id="publicshelves_tab" class="active">
445
        <div id="tab_content">
494
                            <a href="#tab_content">Public lists</a>
446
            <table id="listresultst">
495
                        </li>
447
                <thead>
496
                    </ul>
448
                    <tr>
497
449
                        <th class="NoVisible">Type</th>
498
                    <div id="tab_content">
450
                        <th>List name</th>
499
                        <table id="listresultst">
451
                        <th>Contents</th>
500
                            <thead>
452
                        <th>Type</th>
501
                                <tr>
453
                        <th>Owner</th>
502
                                    <th class="NoVisible">Type</th>
454
                        <th>Sort by</th>
503
                                    <th>List name</th>
455
                        <th>Creation date</th>
504
                                    <th>Contents</th>
456
                        <th>Modification date</th>
505
                                    <th>Type</th>
457
                        <th class="noExport">Actions</th>
506
                                    <th>Owner</th>
458
                    </tr>
507
                                    <th>Sort by</th>
459
                    <tr class="filters_row">
508
                                    <th>Creation date</th>
460
                        <th></th>
509
                                    <th>Modification date</th>
461
                        <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
510
                                    <th class="noExport">Actions</th>
462
                        <th></th>
511
                                </tr>
463
                        <th></th>
512
                                <tr class="filters_row">
464
                        <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
513
                                    <th></th>
465
                        <th>
514
                                    <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
466
                            <select class="filter text_filter" id="searchsortby_filter">
515
                                    <th></th>
467
                                <option value=""></option>
516
                                    <th></th>
468
                                <option value="title">Title</option>
517
                                    <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
469
                                <option value="author">Author</option>
518
                                    <th>
470
                                <option value="copyrightdate">Copyrightdate</option>
519
                                        <select class="filter text_filter" id="searchsortby_filter">
471
                                <option value="itemcallnumber">Call number</option>
520
                                            <option value=""></option>
472
                                <option value="dateadded">Date added</option>
521
                                            <option value="title">Title</option>
473
                            </select>
522
                                            <option value="author">Author</option>
474
                        </th>
523
                                            <option value="copyrightdate">Copyrightdate</option>
475
                        <th></th>
524
                                            <option value="itemcallnumber">Call number</option>
476
                        <th></th>
525
                                            <option value="dateadded">Date added</option>
477
                        <th></th>
526
                                        </select>
478
                    </tr>
527
                                    </th>
479
                </thead>
528
                                    <th></th>
480
                <tbody></tbody>
529
                                    <th></th>
481
            </table>
530
                                    <th></th>
482
        </div>
531
                                </tr>
483
    </div>
532
                            </thead>
484
[% END %]
533
                            <tbody></tbody>
534
                        </table>
535
                    </div>
536
                </div>
537
            [% END %]
485
538
486
<form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
539
            <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
487
    <!-- Values will be set here by placeHold() -->
540
                <!-- Values will be set here by placeHold() -->
488
</form>
541
            </form>
489
542
490
            </main>
543
        </main>
491
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
544
    </div> <!-- /.col-sm-10.col-sm-push-2 -->
492
    </div> <!-- /.row -->
545
</div> <!-- /.row -->
493
546
494
[% IF ( can_add_biblios ) %]
547
[% IF ( can_add_biblios ) %]
495
    <!-- Modal -->
548
    <!-- Modal -->
Lines 503-524 Link Here
503
                    </div>
556
                    </div>
504
                    <div class="modal-body">
557
                    <div class="modal-body">
505
                        <fieldset class="brief">
558
                        <fieldset class="brief">
506
                        <ol>
559
                            <ol>
507
                            <li>
560
                                <li>
508
                                <label for="barcodes">Barcodes:</label>
561
                                    <label for="barcodes">Barcodes:</label>
509
                                <textarea name="barcodes" id="barcodes" rows="5"></textarea>
562
                                    <textarea name="barcodes" id="barcodes" rows="5"></textarea>
510
                                <input type="hidden" name="op" value="add_biblio" />
563
                                    <input type="hidden" name="op" value="add_biblio" />
511
                                <input type="hidden" name="referer" value="view" />
564
                                    <input type="hidden" name="referer" value="view" />
512
                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
565
                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
513
                            </li>
566
                                </li>
514
                            <li>
567
                                <li>
515
                                <label for="biblionumbers">Biblio numbers:</label>
568
                                    <label for="biblionumbers">Biblio numbers:</label>
516
                                <textarea name="biblionumbers" id="biblionumbers" rows="5"></textarea>
569
                                    <textarea name="biblionumbers" id="biblionumbers" rows="5"></textarea>
517
                                <input type="hidden" name="op" value="add_biblio" />
570
                                    <input type="hidden" name="op" value="add_biblio" />
518
                                <input type="hidden" name="referer" value="view" />
571
                                    <input type="hidden" name="referer" value="view" />
519
                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
572
                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
520
                            </li>
573
                                </li>
521
                        </ol>
574
                            </ol>
522
                        </fieldset>
575
                        </fieldset>
523
                    </div>
576
                    </div>
524
                    <div class="modal-footer">
577
                    <div class="modal-footer">
525
- 

Return to bug 30304