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