More efforts with toolbars, nothing solved. Also corrections, and modifications to...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / virtualshelves / shelves.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; <!-- TMPL_IF NAME="viewshelf" -->Virtual Shelves &rsaquo; Contents of <!-- TMPL_VAR NAME="shelfname" --><!-- TMPL_ELSE -->Virtual Shelves<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript">
6 //<![CDATA[     function confirmDelete(s){
7                 if (window.confirm(s))
8                         return true;
9                 return false;
10         }
11         /**
12          * this function checks all checkbox 
13          * or uncheck all if there are already checked.
14          */
15         function CheckAll(){
16                 var checkboxes = document.getElementsByTagName('input');
17                 var nbCheckbox = checkboxes.length;
18                 var check = areAllChecked();
19                 check = !check;
20                 for(var i=0;i<nbCheckbox;i++){
21                         if(checkboxes[i].getAttribute('type') == "checkbox" ){
22                                 checkboxes[i].checked = check;
23                         }
24                 }
25         }
26         /**
27          * this function return true if all checkbox are checked
28          */
29         function areAllChecked(){
30                 var checkboxes = document.getElementsByTagName('input');
31                 var nbCheckbox = checkboxes.length;
32                 for(var i=0;i<nbCheckbox;i++){
33                         if(checkboxes[i].getAttribute('type') == "checkbox" ){
34                                 if(checkboxes[i].checked == 0){
35                                         return false;
36                                 }
37                         }
38                 }
39                 return true;
40         }
41         //]]>
42 </script>
43 </head>
44 <body>
45 <!-- TMPL_INCLUDE NAME="header.inc" -->
46 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
47
48 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalogue</a>  &rsaquo; <!-- TMPL_IF NAME="viewshelf" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Virtual Shelves</a> &rsaquo; Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i><!-- TMPL_ELSE -->Virtual Shelves<!-- /TMPL_IF --></div>
49
50 <div id="doc3" class="yui-t2">
51    
52    <div id="bd">
53         <div id="yui-main">
54         <div class="yui-b">
55
56 <!-- TMPL_IF NAME="viewshelf" -->
57 <div id="action">
58 <ul>    <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Back to virtual Shelves</a></li>
59     <!-- TMPL_IF name="manageshelf" -->
60     <li><a  href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelfnumber" -->">Edit this shelf</a></li>
61     <!-- /TMPL_IF --></ul>
62 </div>
63
64 <h3>Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i></h3>
65
66 <form class="inline" action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" name="mainform">
67         <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
68         <input type="hidden" name="modifyshelfcontents" value="1" />
69     <!-- TMPL_IF NAME="itemsloop" -->
70     <table>
71             <tr>
72                 <th>
73                     <a href="javascript:CheckAll();">
74                         <small>(Un)Check All</small>
75                     </a>
76                 </th>
77                 <th>&nbsp;</th>
78                 <th>Title</th>
79                 <th>Author</th>
80                 <th>Call No.</th>
81             </tr>
82         <!-- TMPL_LOOP NAME="itemsloop" -->
83             <tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->>
84                     <td>
85                         <input type="checkbox" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->" />
86                     </td>
87                     <td>
88                         <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
89                     </td>
90                     <td>
91                 <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
92                             <a class="title" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
93                                 <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
94                             </a>
95                         <!-- TMPL_ELSE -->
96                             <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
97                                 <a class="title" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
98                                     <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
99                                 </a>
100                             <!-- TMPL_ELSE -->
101                                 <a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
102                                     <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
103                                 </a>
104                             <!-- /TMPL_IF -->
105                         <!-- /TMPL_IF -->
106                     </td>
107                     <td><!-- TMPL_VAR NAME="author" --></td>
108                     <td><!-- TMPL_VAR NAME="classification" --></td>
109         </tr>
110         <!-- /TMPL_LOOP -->
111     </table>
112     <!-- TMPL_ELSE -->
113
114     <p><b>This shelf is empty.</b></p>
115     <!-- TMPL_UNLESS NAME="itemsloop" -->
116         <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->" />
117         <input type="hidden" name="shelves" value="1" />
118         <input type="submit" value="Delete this shelf" onclick="return confirmDelete('Are you sure you want to delete this shelf?')" />
119         <!-- /TMPL_UNLESS -->
120         <!-- /TMPL_IF -->
121     <!-- TMPL_IF name="manageshelf" -->
122         <!-- TMPL_IF NAME="itemsloop" -->
123             <b>With selected items :</b>
124             <input type="submit" value="Remove" onclick="return confirmDelete('Are you sure you want to remove these items from the shelf?')" style="display:inline;" />
125         <!-- /TMPL_IF -->
126         <!-- /TMPL_IF -->
127 </form>
128     <!-- TMPL_IF name="manageshelf" -->
129     
130 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
131     <table>
132         <tr><th colspan="2">Add an item to this shelf by barcode</th></tr>
133         <tr>
134             <td>
135                 <label for="addbarcode">Barcode:</label>
136             </td>
137             <td>
138                 <input name="addbarcode" type="text" id="addbarcode" size="14" maxlength="14" />
139                 <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
140                 <input type="hidden" name="modifyshelfcontents" value="1" />
141                 <input type="submit" value="Save" />
142             </td>
143         </tr>
144     </table>
145 </form>
146 <!-- /TMPL_IF -->
147 <!-- TMPL_ELSE -->
148     <!-- TMPL_IF NAME="shelves" -->
149         <!-- TMPL_IF NAME="status1" -->
150             <p class="error"><!-- TMPL_VAR NAME="string1" --></p>
151         <!-- /TMPL_IF -->
152         <!-- TMPL_LOOP NAME="paramsloop" -->
153             <!-- TMPL_IF NAME="status" -->
154                 <p class="error"><!-- TMPL_VAR NAME="string" --></p>
155             <!-- /TMPL_IF -->
156         <!-- /TMPL_LOOP -->
157     <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
158         <input type="hidden" name="shelves" value="1">
159         <h3>Create a new virtual shelf</h3>
160         <table>
161         <tr><th scope="row"><label for="addshelf">Shelf name:</label> </th><td> <input id="addshelf" type="text" name="addshelf" size="25"></td></tr>
162         <tr><th scope="row"><label for="owner">Owner:</label> </th><td><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->"><!-- TMPL_VAR name="loggedinusername" --></td></tr>
163         <tr><th scope="row"><label for="category">Category:</label> </th><td><select name="category" id="category">
164                                     <option value="1">Private</option>
165                                     <option value="2">Public</option>
166                                                                         <option value="3">Free</option>
167                                     </select></td></tr></table>
168         <ul>
169             <li>A <b>private</b> virtual shelf is managed by you and can be seen only by you.</li>
170             <li> A <b>public</b> virtual shelf can be seen by everybody, but managed only by you.</li>
171                         <li> An <b>open</b> virtual shelf can be seen and managed by everybody.</li>
172         </ul>
173                                 <p><input type="submit" value="Add a new shelf"></p>
174                     </form>
175         
176         <!-- TMPL_IF NAME="numberCanManage" -->
177         <!-- TMPL_IF NAME="shelvesloop" -->
178         <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" name="mainform">
179                     <input type="hidden" name="shelves" value="1" />
180                     <h3>Delete virtual shelves</h3>
181                     <table>
182                         <tr><th>&nbsp;</th><th>Shelf name</th><th>Contents</th></tr>
183                         <!-- TMPL_LOOP NAME="shelvesloop" -->
184                         <!-- TMPL_IF name="canmanage" -->
185                         <tr>
186                             <td>
187                                 <input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" />
188                             </td>
189                             <td>
190                                 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a>
191                             </td>
192                             <td>
193                                 <!-- TMPL_VAR NAME="shelfvirtualcount" --> item(s)
194                             </td>
195                         </tr>
196                         <!-- /TMPL_IF -->
197                         <!-- /TMPL_LOOP -->
198                     </table>
199         <input type="submit" value="Delete shelves" /></form>
200         <!-- /TMPL_IF -->
201         <!-- /TMPL_IF -->
202
203         <p><form class="inline" action="/cgi-bin/koha/virtualshelves/shelves.pl" method="get"><input type="submit" value="Back to virtual shelves" /></form></p>
204
205     <!-- TMPL_ELSE -->
206     <!-- TMPL_IF name="edit" -->
207         <form method="post">
208             <input type="hidden" name="op" value="modifsave">
209             <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
210 <h3>Edit virtual shelf '<!-- TMPL_VAR name="shelfname"-->'</h3>
211             <table>
212             <tr><td><label for="shelfname">Shelf name: </label></td><td><input type="text" id="shelfname" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></td></tr>
213             <tr><td><label for="owner">Owner: </label></td><td><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></td></tr>
214             <tr><td><label for="category">Category: </label></td><td><select id="category" name="category">
215                     <!-- TMPL_IF name="category1" -->
216                         <option value="1" selected="selected">Private</option>
217                     <!-- TMPL_ELSE -->
218                         <option value="1">Private</option>
219                     <!-- /TMPL_IF -->
220                     <!-- TMPL_IF name="category2" -->
221                         <option value="2" selected="selected">Public</option>
222                     <!-- TMPL_ELSE -->
223                         <option value="2">Public</option>
224                                         <!-- TMPL_IF NAME="category3" -->
225                                                 <option value="3" selected="selected">Free</option>
226                                         <!-- TMPL_ELSE -->
227                                                 <option value="3">Free</option>
228                     <!-- /TMPL_IF -->
229                 </select></td></tr>
230             </table>
231             <ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen <strong>only</strong> by you.</li>
232                 <li> A <strong>public</strong> virtual shelf can be seen by <strong>everybody</strong>, but managed only by you.</li>
233                                  <li> A <b>free</b> virtual shelf can be seen and managed by everybody.</li>
234             </ul>
235             <p><input type="submit" value="Save changes"></p>
236
237         </form>
238 <!-- /TMPL_IF -->
239 <!-- /TMPL_IF -->
240 <h3>Virtual shelves</h3>
241
242 <table>
243 <tr><th>Shelf name</th><th>Category</th><th>Items</th><th>&nbsp;</th></tr>
244
245 <!-- TMPL_LOOP NAME="shelvesloop" -->
246 <tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->>
247 <td><a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a></td>
248 <td>
249 <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
250 <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
251 <!-- TMPL_IF NAME="viewcategory3" -->Free<!-- /TMPL_IF -->
252 </td>
253 <td><!-- TMPL_VAR NAME="shelfvirtualcount" --> </td>
254 <td><!-- TMPL_IF name="mine" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Edit</a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
255
256 <!-- /TMPL_LOOP -->
257 </table>
258         <p><form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or remove virtual shelves" /></form></p>
259     <!-- /TMPL_IF -->
260
261 </div>
262 </div>
263 <div class="yui-b">
264 <!-- TMPL_INCLUDE NAME="cat-menu.inc" -->
265 </div>
266 </div>
267 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->