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