Merge remote-tracking branch 'origin/new/bug_6199'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / virtualshelves / addbybiblionumber.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Add to List</title>
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="lists_addbybiblionumber" class="lists">
9
10 [% UNLESS (authorized) %]
11     <p align="center">
12         [% IF (errcode==1) %]Could not make new shelf. Please check the name.<br/>[% END %]
13         [% IF (errcode==2) %]Sorry, you do not have permission to add items to this list.<br/>[% END %]
14         <a href="javascript:self.close();">Close this window.</a>
15     </p>
16 [% ELSE %]
17 <div id="custom-doc" class="yui-t7">
18    <div id="bd">
19                 [% IF ( multiple ) %]
20                     <h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>: [% ELSE %]a list:[% END %]</h1>
21                 [% ELSE %]
22                         <h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>[% ELSE %]a list:[% END %]</h1>
23                 [% END %]
24                 <ul>
25                     [% FOREACH biblio IN biblios %]
26                         <li> <span class="title">[% biblio.title |html %]</span>
27                             [% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %]
28                         </li>
29                     [% END %]
30                 </ul>
31
32                 <form name="f1" action="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl" method="post">
33                         [% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
34                         <input type="hidden" name="confirmed" value="1" />
35                         [% IF ( shelfnumber ) %]<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />[% END %]
36
37 [% UNLESS ( shelfnumber ) %]
38
39 [% UNLESS ( newshelf ) %]
40      <fieldset class="rows">
41         <legend>Select an existing list</legend>
42         <ol>
43             <li>
44                 <label>Choose list</label>
45                 <select name="shelfnumber" id="shelfnumber">
46                 [% IF ( privatevirtualshelves ) %]
47                 <optgroup label="Private Lists">
48                 [% FOREACH privatevirtualshelve IN privatevirtualshelves %]
49                 <option value="[% privatevirtualshelve.shelfnumber %]">[% privatevirtualshelve.shelfname %]</option>
50                 [% END %]
51                 </optgroup>
52                 [% END %]
53                 [% IF ( publicvirtualshelves ) %]
54                 <optgroup label="Public Lists">
55                 [% FOREACH publicvirtualshelve IN publicvirtualshelves %]
56                 <option value="[% publicvirtualshelve.shelfnumber %]">[% publicvirtualshelve.shelfname %]</option>
57                 [% END %]
58                 </optgroup>
59                 [% END %]
60                 </select>
61             </li>
62         </ol>
63         [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
64         [% UNLESS ( biblionumbers ) %]
65           <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
66         [% ELSE %]
67           <input type="hidden" name="biblionumbers" value="[% biblionumbers %]" />
68         [% END %]
69         </fieldset>
70
71         <p>... or...</p>
72 [% END %]
73
74     <fieldset class="rows"><legend>Add to a new list:</legend>
75         <ol><li>
76             <label for="newvirtualshelf">
77                 List name:
78             </label>
79             [% FOREACH biblio IN biblios %]<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
80             [% UNLESS ( biblionumbers ) %]
81                           <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" />
82             [% ELSE %]
83                           <input type="hidden" name="biblionumbers" id="biblionumbers" value="[% biblionumbers %]" />
84             [% END %]
85             <input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
86             <input type="hidden" name="confirmed" value="1" />
87         </li>
88         <li>
89             <label for="category">Category:</label>
90             <select name="category" id="category">
91                 <option value="1">Private</option>
92                 <option value="2">Public</option>
93             </select>
94         </li></ol>
95     </fieldset>
96
97
98 [% END %]
99
100
101 <!-- SAVE -->
102                     <fieldset class="action">
103                         <input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a>
104                     </fieldset>
105                 </form>
106 <!-- /SAVE -->
107
108 </div>
109
110 [% INCLUDE 'intranet-bottom.inc' %]
111 [% END %]