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