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