Bug 7310: Code changes for Improving list permissions
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-addbybiblionumber.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Add to Your List
3 [% INCLUDE 'doc-head-close.inc' %]
4 <style type="text/css">
5    #custom-doc { width:34.62em;*width:33.78em;min-width:450px; margin:auto; margin-top: .4em;text-align:left; }
6    </style>
7 </head>
8 <body id="addtolist">
9 <div id="custom-doc" class="yui-t7">
10 <div id="useraddbybiblionumber" class="container">
11 [% IF ( authorized ) %]
12         [% UNLESS ( newshelf ) %]
13                 [% IF ( multiple ) %]
14                 <h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>: [% ELSE %]a list:[% END %]</h1>
15                 [% ELSE %]
16                         <h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>[% ELSE %]a list:[% END %]</h1>
17                 [% END %]
18         <ul>
19                 [% FOREACH biblio IN biblios %]
20                 <li> <span class="title">[% biblio.title |html %]</span>
21                 [% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %]
22                 </li>
23         [% END %]
24                 </ul>
25                 [% IF ( existingshelves ) %]
26                         <form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
27                 <fieldset class="rows"><legend>Select a List</legend>
28                         <ol><li>    <label for="shelfnumber">Add to list:</label> <select name="shelfnumber" id="shelfnumber">
29                                 [% IF ( privatevirtualshelves ) %]<optgroup label="Private Lists">
30                                         [% FOREACH privatevirtualshelve IN privatevirtualshelves %]
31                                         <option value="[% privatevirtualshelve.shelfnumber %]">[% privatevirtualshelve.shelfname %]</option>
32                                         [% END %]
33                                 </optgroup>[% END %]
34                                 [% IF ( publicvirtualshelves ) %]<optgroup label="Public Lists">
35                                         [% FOREACH publicvirtualshelve IN publicvirtualshelves %]
36                                         <option value="[% publicvirtualshelve.shelfnumber %]">[% publicvirtualshelve.shelfname %]</option>
37                                         [% END %]
38                                 </optgroup>[% END %]
39                         </select></li></ol>
40                         [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
41                 <input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
42                 <fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
43                         </form>
44                         <p>...or...</p>
45                 [% ELSE %]
46                         [% IF ( singleshelf ) %]
47                                 <form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
48                                 [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]">[% END %]
49                                 <input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
50                                 <input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
51                                 <fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
52                                 </form>
53                         [% END %]
54                 [% END %]
55         [% END %]
56         [% UNLESS ( singleshelf ) %]<form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
57                 <fieldset class="rows">    <legend>Add to a New List:</legend>
58                 <ol><li>
59                 <label for="newvirtualshelf">
60                 List Name:
61                 </label>
62                 <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
63                 </li>
64                 <li><label for="category">Category:</label>
65                 <select name="category" id="category">
66                 <option value="1">Private</option>
67                 [% IF (OpacAllowPublicListCreation) %]
68                         <option value="2">Public</option>
69                 [% END %]
70                 </select></li></ol></fieldset>
71                 [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html%]" />[% END %]
72                 <fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
73                 </form>
74         [% END %]
75 [% ELSE %]
76         <p align="center">
77         [% IF (errcode==1) %]
78         Could not create new list. Please check if the name is unique.
79         [% ELSE %]
80         Sorry, you cannot add items to this list.
81         [% END %]
82         </p>
83 [% END %]
84 <p align="center">
85     <a href="#" class="close">Close this window.</a>
86 </p>
87 </div></div>
88 </body>
89 </html>