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