Adding redirection to serials-collection.pl if no serials selected for edition.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / serials / serials-collection.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <!--TMPL_INCLUDE NAME="menus.inc" -->
6 <!--TMPL_INCLUDE NAME="menu-serials.inc" -->
7
8
9 <script language="JavaScript" type="text/javascript">
10 showlayer(<!-- TMPL_VAR NAME="yearmax"-->);
11
12 function showlayer(numlayer)
13 {
14         var yeardata=document.getElementsByName("yeardata");
15     for (i=0; i<yeardata.length; i++ ) {
16                 ong=yeardata[i].getAttribute('id');
17         if (numlayer==ong) {
18                         yeardata[i].setAttribute("class","content_visible");
19             var tabactive=document.getElementById('link'+numlayer);
20             tabactive.removeAttribute("class");
21             tabactive.setAttribute("class","tab_active");
22                 } else {
23                         yeardata[i].removeAttribute("class");
24             yeardata[i].setAttribute("class","content_hidden");
25             try {
26                 var tabactive=document.getElementById('link'+ong);
27                 tabactive.removeAttribute("class");
28                 tabactive.setAttribute("class","tab_inactive");
29             }
30             catch(e){};
31                 }
32         }
33 }
34 function addsubscriptionid()
35 {
36         var tab=new Array();
37     var serialids = document.edition.serialid;
38     for (i=0; i<serialids.length; i++){
39       if (serialids[i].checked == true){
40         var found=false;
41         for (var val in tab){
42           if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
43         }
44         if (found == false){
45           tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
46         }
47       }
48     }
49     var string="";
50     for (var val in tab){
51       string = string + tab[val] + ",";
52     }
53     string=string.substring(0,string.length -1);
54     document.edition.subscriptionid.value=string;
55 }
56 function popup(link) {
57     newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
58 }
59 </script>
60
61 <!-- TMPL_UNLESS name="popup" -->
62
63         <h1>Serial Collection information for<br/> <em><!-- TMPL_VAR name="bibliotitle" --></em></h1>
64 <!-- /TMPL_UNLESS -->
65
66 <!--TMPL_IF Name="subscriptions"-->
67 <font size ="-2">
68 <table>
69 <!--TMPL_IF Name="onesubscription"-->
70 <caption> Subscription Summary</caption>
71 <!--TMPL_ELSE-->
72 <caption> Subscription Summaries</caption>
73 <!--/TMPL_IF-->
74 <tr>
75   <th>Subs </th>
76   <th>Freq</th>
77   <th>Num pattern</th>
78   <th>Branch</th>
79   <th>Call Number</th>
80   <th>Notes</th>
81   <th>Renew</th>
82 </tr>
83 <!--TMPL_LOOP Name="subscriptions"-->
84         <tr>
85       <td><a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">#<!-- TMPL_VAR name="subscriptionid" --></a> </td>
86       <td>         <!--TMPL_IF name="periodicity1" -->
87                         1/day
88                 <!-- /TMPL_IF -->
89                 <!--TMPL_IF name="periodicity2" -->
90                         1/week
91                 <!-- /TMPL_IF -->
92                 <!--TMPL_IF name="periodicity3" -->
93                         1/2 weeks
94                 <!-- /TMPL_IF -->
95                 <!--TMPL_IF name="periodicity4" -->
96                         1/3 weeks
97                 <!-- /TMPL_IF -->
98                 <!--TMPL_IF name="periodicity5" -->
99                         1/Month
100                 <!-- /TMPL_IF -->
101                 <!--TMPL_IF name="periodicity6" -->
102                         1/2 Months (6/year)
103                 <!-- /TMPL_IF -->
104                 <!--TMPL_IF name="periodicity7" -->
105                         1/quarter
106                 <!-- /TMPL_IF -->
107                 <!--TMPL_IF name="periodicity8" -->
108                         1/quarter
109                 <!-- /TMPL_IF -->
110                 <!--TMPL_IF name="periodicity9" -->
111                         2/year
112                 <!-- /TMPL_IF -->
113                 <!--TMPL_IF name="periodicity10" -->
114                         1/year
115                 <!-- /TMPL_IF -->
116                 <!--TMPL_IF name="periodicity11" -->
117                         1/2 years
118                 <!-- /TMPL_IF --></td>
119            <td>
120                 <!-- TMPL_IF name="numberpattern1" -->
121                     Number
122                 <!-- /TMPL_IF -->
123                 <!-- TMPL_IF name="numberpattern2" -->
124                     Volume, Number, Issue
125                 <!-- /TMPL_IF -->
126                 <!-- TMPL_IF name="numberpattern3" -->
127                     Volume, Number
128                 <!-- /TMPL_IF -->
129                 <!-- TMPL_IF name="numberpattern4" -->
130                     Volume, Issue
131                 <!-- /TMPL_IF -->
132                 <!-- TMPL_IF name="numberpattern5" -->
133                     Number, Issue
134                 <!-- /TMPL_IF -->
135                 <!-- TMPL_IF name="numberpattern6" -->
136                     Seasonal only
137                 <!-- /TMPL_IF -->
138                 <!-- TMPL_IF name="numberpattern7" -->
139                     None of the above
140                 <!-- /TMPL_IF --></td>
141             <td> <!-- TMPL_VAR name="branchcode" --></td>
142             <td> <!-- TMPL_VAR name="callnumber" --></td>
143         <td> <!-- TMPL_VAR name="notes" -->        <!--TMPL_IF name="subscriptionexpired"--><br /><span class="problem"> Subscription Expired</span>
144         <!--/TMPL_IF-->
145         </td>
146         <!--TMPL_IF name="abouttoexpire"--><td class="problem"> <a onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->')">Renew</a></td>
147         <!--TMPL_ELSE-->
148         <!--TMPL_IF name="subscriptionexpired"--><td class="problem"> <a onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->')">Renew</a></td>
149         <!--TMPL_ELSE-->
150         <td> &nbsp;</td>
151         <!--/TMPL_IF-->
152         <!--/TMPL_IF-->
153
154       </tr>
155 <!--/TMPL_LOOP -->
156 <!--TMPL_IF Name="subscr"-->
157 <tr ><td colspan="7">  <a href="serials-collection.pl?biblionumber=<!--TMPL_VAR Name="biblionumber" -->">See any subscription attached to this biblio</a></td>
158 </tr>
159 <!--/TMPL_IF-->
160 </table>
161 </font>
162 <!--/TMPL_IF -->
163     <div class="tabsubs">
164     <!-- TMPL_LOOP NAME="years" -->
165         <!-- TMPL_IF NAME="year" -->
166         <!-- TMPL_IF NAME="first" -->
167             <a  id="link<!-- TMPL_VAR NAME="year" -->" class="tab_active" href="javascript:showlayer(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
168         <!-- TMPL_ELSE -->
169             <a  id="link<!-- TMPL_VAR NAME="year" -->" class="tab_inactive" href="javascript:showlayer(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
170         <!-- /TMPL_IF -->
171         <!-- /TMPL_IF -->
172     <!-- /TMPL_LOOP -->
173     </div>
174
175 <form name="edition" action="serials-edit.pl">
176  <!-- TMPL_LOOP NAME="years" -->
177  <!--TMPL_IF Name="first" -->
178     <div name="yeardata" id="<!-- TMPL_VAR NAME="year" -->" class="content_visible" >
179  <!--TMPL_ELSE -->
180     <div name="yeardata" id="<!-- TMPL_VAR NAME="year" -->" class="content_hidden">
181  <!--/TMPL_IF -->
182         <table width="400px">
183             <tr>
184 <!--TMPL_UNLESS Name="onesubscription"-->
185                 <th> # Subs.
186                 </th>
187 <!--/TMPL_UNLESS-->
188                 <th>Date published
189                 </th>
190                 <th>Date received
191                 </th>
192                 <th> Number
193                 </th>
194                 <th> Status
195                 </th>
196                 <th> Notes
197                 </th>
198                 <th>branch
199                 </th>
200                 <th>Edit
201                 </th>
202             </tr>
203       <!-- TMPL_LOOP Name="serials" -->
204             <tr name="branch <!--TMPL_VAR Name=branchcode"-->">
205 <!--TMPL_UNLESS Name="onesubscription"-->
206                  <td><a href="serials-collection.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->"><!--TMPL_VAR Name="subscriptionid"--></a></td>
207 <!--/TMPL_UNLESS-->
208                 <td>
209                     <!-- TMPL_VAR Name="publisheddate" -->
210                 </td>
211                 <td>
212                     <!-- TMPL_VAR Name="planneddate" -->
213                 </td>
214                 <td>
215                     <!-- TMPL_VAR Name="serialseq" -->
216                 </td>
217                 <td>
218                     <!-- TMPL_IF Name="status1" -->Waited<!-- /TMPL_IF -->
219                     <!-- TMPL_IF Name="status2" -->Arrived<!-- /TMPL_IF -->
220                     <!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
221                     <!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
222                     <!-- TMPL_IF Name="status7" -->Claimed<!-- /TMPL_IF -->
223                 </td>
224                 <td>
225                     <!-- TMPL_VAR Name="notes" -->
226                 </td>
227                 <td>
228                     <!-- TMPL_VAR Name="branchcode" -->
229                 </td>
230                 <td>
231                   <div visibility="hidden" name="subs" val="<!--TMPL_VAR Name="subscriptionid"-->"></div>
232                   <!--TMPL_IF Name="subscriptionexpired"-->
233                   <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" disabled />
234                   <!--TMPL_ELSE-->
235                     <!--TMPL_IF Name="status1"-->
236                     <input type="checkbox" name="serialid" checked value="<!--TMPL_VAR Name="serialid"-->"/>
237                     <!--TMPL_ELSE -->
238                     <!--TMPL_IF Name="status3"-->
239                     <input type="checkbox" name="serialid" checked value="<!--TMPL_VAR Name="serialid"-->" />
240                     <!--TMPL_ELSE -->
241                       <!--TMPL_IF Name="status4"-->
242                       <input type="checkbox" name="serialid" checked value="<!--TMPL_VAR Name="serialid"-->" />
243                       <!--TMPL_ELSE -->
244                       <input type="checkbox" name="serialid" value="<!--TMPL_VAR Name="serialid"-->" />
245                       <!--/TMPL_IF-->           
246                     <!--/TMPL_IF-->           
247                     <!--/TMPL_IF-->           
248                   <!--/TMPL_IF -->
249                 </td>
250             </tr>
251       <!-- /TMPL_LOOP -->
252         </table>
253       <p><input type="submit" value="Edit serials"></p>
254     </div>
255     <!--/TMPL_LOOP -->
256   <input type="hidden" name="subscriptionid" value="<!--TMPL_VAR Name="subscriptionidlist"-->">
257
258 </form>
259
260 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->