Lines 1-5
Link Here
|
|
|
1 |
[% USE Koha %] |
2 |
[% USE KohaDates %] |
3 |
[% SET PRIVATE = 1 %] |
4 |
[% SET PUBLIC = 2 %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › [% IF ( viewshelf ) %]Lists › Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list [% shelfname | html %][% END %]</title> |
6 |
<title>Koha › [% IF op == 'view' %]Lists › Contents of [% shelf.shelfname | html %][% ELSE %]Lists[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list [% shelf.shelfname | html %][% END %]</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
8 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
5 |
[% INCLUDE 'datatables.inc' %] |
9 |
[% INCLUDE 'datatables.inc' %] |
Lines 14-20
Link Here
|
14 |
</script> |
18 |
</script> |
15 |
[% END %] |
19 |
[% END %] |
16 |
|
20 |
|
17 |
[% IF ( viewshelf ) %] |
21 |
[% IF op == 'view' %] |
18 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
22 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
19 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
23 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
20 |
[% END %] |
24 |
[% END %] |
Lines 27-33
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
Link Here
|
27 |
|
31 |
|
28 |
[% IF op == 'list' %] |
32 |
[% IF op == 'list' %] |
29 |
$(document).ready(function(){ |
33 |
$(document).ready(function(){ |
30 |
var type = 1; |
34 |
[% IF category == PUBLIC %] |
|
|
35 |
var type = [% PUBLIC %]; |
36 |
[% ELSE %] |
37 |
var type = [% PRIVATE %]; |
38 |
[% END %] |
31 |
var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, { |
39 |
var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, { |
32 |
'bServerSide': true, |
40 |
'bServerSide': true, |
33 |
'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search", |
41 |
'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search", |
Lines 81-93
$(document).ready(function(){
Link Here
|
81 |
dtListResults.fnAddFilters("filter", 750); |
89 |
dtListResults.fnAddFilters("filter", 750); |
82 |
|
90 |
|
83 |
var tabs = $("#tabs").tabs({ |
91 |
var tabs = $("#tabs").tabs({ |
|
|
92 |
[% IF category == PUBLIC %] |
93 |
active: 1, |
94 |
[% ELSE %] |
95 |
active: 0, |
96 |
[% END %] |
84 |
activate: function(e, ui) { |
97 |
activate: function(e, ui) { |
85 |
var active = tabs.tabs("option", "active" ); |
98 |
var active = tabs.tabs("option", "active" ); |
86 |
if ( active == 0 ) { |
99 |
if ( active == 0 ) { |
87 |
type = 1; // private |
100 |
type = [% PRIVATE %]; |
88 |
dtListResults.fnDraw(); |
101 |
dtListResults.fnDraw(); |
89 |
} else if ( active == 1 ) { |
102 |
} else if ( active == 1 ) { |
90 |
type = 2; // public |
103 |
type = [% PUBLIC %]; |
91 |
dtListResults.fnDraw(); |
104 |
dtListResults.fnDraw(); |
92 |
} |
105 |
} |
93 |
} |
106 |
} |
Lines 95-101
$(document).ready(function(){
Link Here
|
95 |
}); |
108 |
}); |
96 |
[% END %] |
109 |
[% END %] |
97 |
|
110 |
|
98 |
[% IF ( viewshelf ) %] |
111 |
[% IF op == 'view' %] |
99 |
$(document).ready(function(){ |
112 |
$(document).ready(function(){ |
100 |
[% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %] |
113 |
[% IF ( itemsloop ) %]$('#searchheader').fixFloat();[% END %] |
101 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>"); |
114 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>"); |
Lines 173-186
$(document).ready(function(){
Link Here
|
173 |
}); |
186 |
}); |
174 |
[% END %] |
187 |
[% END %] |
175 |
|
188 |
|
176 |
function confirmDelete(message){ |
|
|
177 |
if (window.confirm(message)) { |
178 |
location.href="/cgi-bin/koha/virtualshelves/shelves.pl?[% IF ( showprivateshelves ) %]display=privateshelves&[% END %]shelves=1&DEL-[% shelfnumber %]=1&shelfoff=[% shelfoff %]"; |
179 |
} else { |
180 |
return false; |
181 |
} |
182 |
} |
183 |
|
184 |
/** |
189 |
/** |
185 |
* This function checks if the adequate number of records are checked for merging |
190 |
* This function checks if the adequate number of records are checked for merging |
186 |
*/ |
191 |
*/ |
Lines 272-306
function placeHold () {
Link Here
|
272 |
[% INCLUDE 'header.inc' %] |
277 |
[% INCLUDE 'header.inc' %] |
273 |
[% INCLUDE 'cat-search.inc' %] |
278 |
[% INCLUDE 'cat-search.inc' %] |
274 |
|
279 |
|
275 |
[% BLOCK list_permissions %] |
280 |
<div id="breadcrumbs"> |
276 |
<li> |
281 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
277 |
<label for="permissions">Permissions: </label> |
282 |
[% IF op != 'list' %] |
278 |
<select name="allow_add" id="allow_add"> |
283 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> |
279 |
[% IF allow_add %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
284 |
[% ELSE %] |
280 |
[% IF allow_add %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
285 |
Lists |
281 |
</select> |
286 |
[% END %] |
282 |
<span>anyone else to add entries.</span> |
287 |
[% IF shelf AND shelf.category == PRIVATE %] › |
283 |
</li> |
288 |
[% IF op == 'view' OR op == 'edit_form' %] |
284 |
<li> |
289 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]">Your lists</a> |
285 |
<label> </label> |
290 |
[% ELSE %] |
286 |
<select name="allow_delete_own" id="allow_delete_own"> |
291 |
Your lists |
287 |
[% IF allow_delete_own %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
292 |
[% END %] |
288 |
[% IF allow_delete_own %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
293 |
[% ELSIF shelf AND shelf.category == PUBLIC %] › |
289 |
</select> |
294 |
[% IF op == 'view' %] |
290 |
<span>anyone to remove his own contributed entries.</span> |
295 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]">Public lists</a> |
291 |
</li> |
296 |
[% ELSE %] |
292 |
<li> |
297 |
Public lists |
293 |
<label> </label> |
298 |
[% END %] |
294 |
<select name="allow_delete_other" id="allow_delete_other"> |
299 |
[% END %] |
295 |
[% IF allow_delete_other %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
|
|
296 |
[% IF allow_delete_other %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
297 |
</select> |
298 |
<span>anyone to remove other contributed entries.</span> |
299 |
</li> |
300 |
[% END %] |
301 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> [% IF ( category1 ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( category2 ) %] › [% IF ( viewshelf ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% ELSIF ( showprivateshelves ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your lists</a> [% ELSE %] Your lists [% END %] [% ELSIF ( showpublicshelves ) %] › [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public lists</a> [% ELSE %] Public lists [% END %] [% END %] |
302 |
|
300 |
|
303 |
[% IF ( viewshelf ) %]› Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] › Create new list[% END %][% IF ( edit ) %] › Edit list <i>[% shelfname | html %]</i>[% END %]</div> |
301 |
[% IF op == 'view' %]› Contents of <i>[% shelf.shelfname | html %]</i>[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list <i>[% shelf.shelfname | html %]</i>[% END %]</div> |
304 |
|
302 |
|
305 |
<div id="doc2" class="yui-t7"> |
303 |
<div id="doc2" class="yui-t7"> |
306 |
<div id="bd"> |
304 |
<div id="bd"> |
Lines 323-330
function placeHold () {
Link Here
|
323 |
List inserted with success. |
321 |
List inserted with success. |
324 |
[% CASE 'success_on_delete' %] |
322 |
[% CASE 'success_on_delete' %] |
325 |
List deleted with success. |
323 |
List deleted with success. |
326 |
[% CASE 'Koha::Exception::DuplicateObject' %] |
324 |
[% CASE 'does_not_exist' %] |
|
|
325 |
This list does not exist. |
326 |
[% CASE 'unauthorized_on_update' %] |
327 |
You do not have permission to update this list. |
328 |
[% CASE 'unauthorized_on_delete' %] |
329 |
You do not have permission to delete this list. |
330 |
[% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %] |
327 |
An error occurred when inserting this list. The name already [% shelfname %] exists. |
331 |
An error occurred when inserting this list. The name already [% shelfname %] exists. |
|
|
332 |
[% CASE 'DBIx::Class::Exception' %] |
333 |
[% m.msg %] |
328 |
[% CASE %] |
334 |
[% CASE %] |
329 |
[% m.code %] |
335 |
[% m.code %] |
330 |
[% END %] |
336 |
[% END %] |
Lines 371-384
function placeHold () {
Link Here
|
371 |
[% END %] |
377 |
[% END %] |
372 |
[% END %] |
378 |
[% END %] |
373 |
|
379 |
|
374 |
[% IF ( viewshelf ) %] |
380 |
[% IF op == 'view' %] |
375 |
<div class="yui-g"> |
381 |
<div class="yui-g"> |
376 |
[% IF ( itemsloop ) %] |
382 |
[% IF itemsloop %] |
377 |
|
383 |
|
378 |
<h3>Contents of <i>[% shelfname | html %]</i></h3> |
384 |
<h3>Contents of <i>[% shelf.shelfname | html %]</i></h3> |
379 |
<div class="pages">[% pagination_bar %]</div> |
385 |
<div class="pages">[% pagination_bar %]</div> |
380 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed"> |
386 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed"> |
381 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
387 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" /> |
382 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
388 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
383 |
|
389 |
|
384 |
[% IF direction == 'asc' %] |
390 |
[% IF direction == 'asc' %] |
Lines 389-404
function placeHold () {
Link Here
|
389 |
[% END %] |
395 |
[% END %] |
390 |
|
396 |
|
391 |
<div id="searchheader" class="noprint"> |
397 |
<div id="searchheader" class="noprint"> |
392 |
[% IF ( itemsloop ) %] |
398 |
[% IF itemsloop %] |
393 |
<div id="selection_ops"><span class="checkall"></span> | |
399 |
<div id="selection_ops"><span class="checkall"></span> | |
394 |
<span class="clearall"></span> |
400 |
<span class="clearall"></span> |
395 |
|
401 |
|
396 |
<span class="addto">| </span> |
402 |
<span class="addto">| </span> |
397 |
|
403 |
|
398 |
[% IF ( CAN_user_reserveforothers && DisplayMultiPlaceHold ) %] |
404 |
[% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %] |
399 |
<div class="btn-group"><button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button></div> |
405 |
<div class="btn-group"><button class="btn btn-mini placehold"><i class="icon-hold"></i> Place hold</button></div> |
400 |
[% END %] |
406 |
[% END %] |
401 |
[% IF ( allowremovingitems ) %] |
407 |
[% IF can_delete_biblios %] |
402 |
<div class="btn-group"><button type="submit" class="btn btn-mini list-remove"><i class="icon-remove-sign"></i> Remove selected</button></div> |
408 |
<div class="btn-group"><button type="submit" class="btn btn-mini list-remove"><i class="icon-remove-sign"></i> Remove selected</button></div> |
403 |
[% END %] |
409 |
[% END %] |
404 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-mini merge-items"><i class="icon-merge"></i> Merge selected</button></div>[% END %] |
410 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-mini merge-items"><i class="icon-merge"></i> Merge selected</button></div>[% END %] |
Lines 412-418
function placeHold () {
Link Here
|
412 |
|
418 |
|
413 |
[% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %] |
419 |
[% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %] |
414 |
<th> |
420 |
<th> |
415 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a> |
421 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelfnumber %]&sort=title&direction=[% IF sort != 'title' %]asc[% ELSE %][% new_direction %][% END %]">Title</a> |
416 |
[% IF sort == 'title' %] |
422 |
[% IF sort == 'title' %] |
417 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
423 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
418 |
[% ELSE %] |
424 |
[% ELSE %] |
Lines 420-426
function placeHold () {
Link Here
|
420 |
[% END %] |
426 |
[% END %] |
421 |
</th> |
427 |
</th> |
422 |
<th> |
428 |
<th> |
423 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a> |
429 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelfnumber %]&sort=author&direction=[% IF sort != 'author' %]asc[% ELSE %][% new_direction %][% END %]">Author</a> |
424 |
[% IF sort == 'author' %] |
430 |
[% IF sort == 'author' %] |
425 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
431 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
426 |
[% ELSE %] |
432 |
[% ELSE %] |
Lines 429-435
function placeHold () {
Link Here
|
429 |
</th> |
435 |
</th> |
430 |
<th>Date added</th> |
436 |
<th>Date added</th> |
431 |
<th> |
437 |
<th> |
432 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a> |
438 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelfnumber %]&sort=itemcallnumber&direction=[% IF sort != 'itemcallnumber' %]asc[% ELSE %][% new_direction %][% END %]">Call number</a> |
433 |
[% IF sort == 'itemcallnumber' %] |
439 |
[% IF sort == 'itemcallnumber' %] |
434 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
440 |
<img src="[% interface %]/[% theme %]/img/[% direction %].gif" alt="[% direction %] sort" /> |
435 |
[% ELSE %] |
441 |
[% ELSE %] |
Lines 481-490
function placeHold () {
Link Here
|
481 |
| <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a> |
487 |
| <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber %]">Edit items</a> |
482 |
[% END %] |
488 |
[% END %] |
483 |
</p> |
489 |
</p> |
484 |
</td> |
490 |
</td> |
485 |
<td>[% itemsloo.author %]</td> |
491 |
<td>[% itemsloo.author %]</td> |
486 |
<td>[% itemsloo.dateadded %]</td> |
492 |
<td>[% itemsloo.dateadded | $KohaDates%]</td> |
487 |
<td> |
493 |
<td> |
488 |
<ul> |
494 |
<ul> |
489 |
[% FOREACH result IN itemsloo.ITEM_RESULTS %] |
495 |
[% FOREACH result IN itemsloo.ITEM_RESULTS %] |
490 |
<li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %] |
496 |
<li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %] |
Lines 503-511
function placeHold () {
Link Here
|
503 |
|
509 |
|
504 |
[% END %] |
510 |
[% END %] |
505 |
</div> |
511 |
</div> |
506 |
[% END %]<!-- /viewshelf --> |
512 |
[% END %] |
507 |
|
513 |
|
508 |
[% IF ( allowaddingitem ) %] |
514 |
[% IF can_add_biblios %] |
509 |
<div class="yui-g"> |
515 |
<div class="yui-g"> |
510 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post"> |
516 |
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post"> |
511 |
<fieldset class="brief noprint"> |
517 |
<fieldset class="brief noprint"> |
Lines 514-520
function placeHold () {
Link Here
|
514 |
<li> |
520 |
<li> |
515 |
<label for="addbarcode">Barcode:</label> |
521 |
<label for="addbarcode">Barcode:</label> |
516 |
<input name="addbarcode" type="text" id="addbarcode" size="14" /> |
522 |
<input name="addbarcode" type="text" id="addbarcode" size="14" /> |
517 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
523 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> |
518 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
524 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
519 |
<input type="submit" value="Add" /> |
525 |
<input type="submit" value="Add" /> |
520 |
</li> |
526 |
</li> |
Lines 522-609
function placeHold () {
Link Here
|
522 |
</fieldset> |
528 |
</fieldset> |
523 |
</form> |
529 |
</form> |
524 |
</div> |
530 |
</div> |
525 |
[% END %]<!-- /allowaddingitem --> |
|
|
526 |
|
527 |
[% IF ( debug ) %] |
528 |
[% IF ( edit ) %]<div>Edit is on ([% shelfname | html %])</div>[% END %] |
529 |
[% IF ( seflag ) %]<div>seflag is on ([% seflag %])</div>[% END %] |
530 |
[% END %] |
531 |
[% END %] |
531 |
|
532 |
|
532 |
[% IF ( seflag ) %] |
533 |
[% IF op == 'add_form' OR op == 'edit_form' %] |
533 |
<div class="yui-ge"> |
534 |
<div class="yui-ge"> |
534 |
<div class="yui-u first"> |
535 |
<div class="yui-u first"> |
535 |
<form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated"> |
536 |
<form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated"> |
536 |
<fieldset class="rows"> |
537 |
<fieldset class="rows"> |
537 |
|
538 |
|
538 |
[% IF ( shelves ) %] |
539 |
[% IF op == 'add_form' %] |
539 |
<legend>Create a new list</legend> |
540 |
<legend>Create a new list</legend> |
540 |
<input type="hidden" name="shelves" value="1" /> |
541 |
<input type="hidden" name="op" value="add" /> |
|
|
542 |
[% ELSE %] |
543 |
<legend>Edit list <i>[% shelf.shelfname | html %]</i></legend> |
544 |
<input type="hidden" name="op" value="edit" /> |
545 |
[% END %] |
546 |
<input type="hidden" name="referer" value="[% referer %]" /> |
547 |
<input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber %]" /> |
541 |
<ol> |
548 |
<ol> |
542 |
<li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" required="required" class="required" /> |
549 |
<li> |
543 |
<span class="required">Required</span> |
550 |
<label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname |html %]" required="required" class="required" /> |
544 |
</li> |
|
|
545 |
<li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li> |
546 |
<li><label for="sortfield" >Sort this list by: </label> |
547 |
<select name="sortfield" id="sortfield"> |
548 |
<option value="title">Title</option> |
549 |
<option value="author">Author</option> |
550 |
<option value="copyrightdate">Copyrightdate</option> |
551 |
<option value="itemcallnumber">Call number</option> |
552 |
</select></li> |
553 |
<li><label for="category">Category: </label> |
554 |
<select name="category" id="category"> |
555 |
<option value="1">Private</option> |
556 |
<option value="2">Public</option> |
557 |
</select></li> |
558 |
[% INCLUDE list_permissions %] |
559 |
</ol> |
560 |
[% END %] |
561 |
|
562 |
[% IF ( edit ) %] |
563 |
<legend>Edit list <i>[% shelfname | html %]</i></legend> |
564 |
<input type="hidden" name="display" value="[% display %]" /> |
565 |
<input type="hidden" name="op" value="modifsave" /> |
566 |
[% IF ( showprivateshelves ) %]<input type="hidden" name="display" value="privateshelves" />[% END %] |
567 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> |
568 |
<ol> |
569 |
<li><label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelfname |html %]" required="required" class="required" /> |
570 |
<span class="required">Required</span> |
551 |
<span class="required">Required</span> |
571 |
</li> |
552 |
</li> |
572 |
<li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]" />[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]</li> |
553 |
<li> |
573 |
<li><label for="sortfield" >Sort this list by: </label> |
554 |
<span class="label">Owner: </span> |
574 |
<select name="sortfield"> |
555 |
[% IF op == 'add_form' %] |
575 |
[% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] |
556 |
<input type="hidden" name="owner" id="owner" value="[% loggedinusernumber %]" />[% loggedinusername %]</li> |
576 |
[% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] |
557 |
[% ELSE %] |
577 |
[% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] |
558 |
[% IF owner %] |
578 |
[% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] |
559 |
<input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber %]" />[% owner.firstname _ ' ' _ owner.surname %] |
579 |
</select></li> |
560 |
[% ELSE %] |
580 |
<li><label for="category">Category: </label> |
561 |
<input type="hidden" id="owner" name="owner" value="[% loggedinusernumber %]" />[% loggedinusername %] |
581 |
<select id="category" name="category"> |
562 |
[% END %] |
582 |
[% IF ( category1 ) %] |
563 |
[% END %] |
583 |
<option value="1" selected="selected">Private</option> |
564 |
</li> |
584 |
[% ELSE %] |
565 |
<li><label for="sortfield" >Sort this list by: </label> |
585 |
<option value="1">Private</option> |
566 |
<select name="sortfield"> |
586 |
[% END %] |
567 |
[% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] |
587 |
[% IF ( category2 ) %] |
568 |
[% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] |
588 |
<option value="2" selected="selected">Public</option> |
569 |
[% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] |
589 |
[% ELSE %] |
570 |
[% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] |
590 |
<option value="2">Public</option> |
571 |
</select></li> |
591 |
[% END %] |
572 |
<li><label for="category">Category: </label> |
592 |
</select></li> |
573 |
<select id="category" name="category"> |
593 |
[% INCLUDE list_permissions %] |
574 |
[% IF shelf.category == PRIVATE %] |
594 |
</ol> |
575 |
<option value="1" selected="selected">Private</option> |
595 |
[% END %] |
576 |
[% ELSE %] |
|
|
577 |
<option value="1">Private</option> |
578 |
[% END %] |
579 |
[% IF shelf.category == PUBLIC %] |
580 |
<option value="2" selected="selected">Public</option> |
581 |
[% ELSE %] |
582 |
<option value="2">Public</option> |
583 |
[% END %] |
584 |
</select></li> |
596 |
|
585 |
|
597 |
</fieldset> |
586 |
[% FOR permission IN ['allow_add', 'allow_delete_own', 'allow_delete_other'] %] |
|
|
587 |
<li> |
588 |
[% IF loop.first %] |
589 |
<label for="permissions">Permissions: </label> |
590 |
[% ELSE %] |
591 |
<label> </label> |
592 |
[% END %] |
593 |
<select name="[% permission %]" id="[% permission %]"> |
594 |
[% IF shelf.$permission %]<option value="0">Do not allow</option>[% ELSE %]<option value="0" selected="selected">Do not allow</option>[% END %] |
595 |
[% IF shelf.$permission %]<option value="1" selected="selected">Allow</option>[% ELSE %]<option value="1">Allow</option>[% END %] |
596 |
</select> |
597 |
[% SWITCH permission %] |
598 |
[% CASE 'allow_add' %] <span>anyone else to add entries.</span> |
599 |
[% CASE 'allow_delete_own' %] <span>anyone to remove his own contributed entries.</span> |
600 |
[% CASE 'allow_delete_other' %] <span>anyone to remove other contributed entries.</span> |
601 |
[% END %] |
602 |
</li> |
603 |
[% END %] |
604 |
</ol> |
605 |
</fieldset> |
598 |
|
606 |
|
599 |
<fieldset class="action"><input type="submit" value="Save" class="submit" /> |
607 |
<fieldset class="action"> |
600 |
[% IF ( showprivateshelves ) %] |
608 |
<input type="submit" value="Save" class="submit" /> |
601 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves" class="cancel">Cancel</a> |
609 |
[% IF referer == 'view' %] |
602 |
[% ELSE %] |
610 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a> |
603 |
[% IF ( display == "viewshelf" ) %] |
611 |
[% ELSE %] |
604 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]" class="cancel">Cancel</a> |
612 |
[% IF category == PUBLIC %] |
|
|
613 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC %]" class="cancel">Cancel</a> |
605 |
[% ELSE %] |
614 |
[% ELSE %] |
606 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl" class="cancel">Cancel</a> |
615 |
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE %]" class="cancel">Cancel</a> |
607 |
[% END %] |
616 |
[% END %] |
608 |
[% END %] |
617 |
[% END %] |
609 |
</fieldset> |
618 |
</fieldset> |
Lines 618-624
function placeHold () {
Link Here
|
618 |
</div> |
627 |
</div> |
619 |
</div> |
628 |
</div> |
620 |
</div> |
629 |
</div> |
621 |
[% END %]<!-- /seflag --> |
630 |
[% END %] |
622 |
|
631 |
|
623 |
[% IF op == 'list' %] |
632 |
[% IF op == 'list' %] |
624 |
<h2>Lists</h2> |
633 |
<h2>Lists</h2> |