- two other non critic periodicity unknown and without regularity.
Adding popup facility for create Biblio and subscription-renew
string=string.substring(0,string.length -1);
document.edition.subscriptionid.value=string;
}
-function popup(link) {
- newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
+function popup(subscriptionid) {
+ newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
}
</script>
<td> <!-- TMPL_VAR name="notes" --> <!--TMPL_IF name="subscriptionexpired"--><br /><span class="problem"> Subscription Expired</span>
<!--/TMPL_IF-->
</td>
- <!--TMPL_IF name="abouttoexpire"--><td class="problem"> <a onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->')">Renew</a></td>
+ <!--TMPL_IF name="abouttoexpire"--><td class="problem"> <a onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew</a></td>
<!--TMPL_ELSE-->
- <!--TMPL_IF name="subscriptionexpired"--><td class="problem"> <a onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->')">Renew</a></td>
+ <!--TMPL_IF name="subscriptionexpired"--><td class="problem"> <a onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew</a></td>
<!--TMPL_ELSE-->
<td> </td>
<!--/TMPL_IF-->
<a href="serials-collection.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="serial Collection for <!--TMPL_VAR Name="bibliotitle"-->">Serial collection</a>
<!--TMPL_LOOP Name="subscriptions"-->
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" title="detail of the subscription">Subscription #<!-- TMPL_VAR name="subscriptionid" --></a>
- <!--/TMPL_LOOP-->
- <!-- <a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button" title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->">Search All Subscriptions</a> -->
+ <!--TMPL_IF name="abouttoexpire"--><a href="#" onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->&mode=popup')">Renew <!--TMPL_VAR Name="subscriptionid"--></a>
+ <!--/TMPL_IF-->
+ <!--TMPL_IF name="subscriptionexpired"--><a href="#" onclick="javascript:popup('subscription-renew.pl?subscriptionid=<!--TMPL_VAR Name="subscriptionid"-->&mode=popup')">Renew <!--TMPL_VAR Name="subscriptionid"--></a>
+ <!--/TMPL_IF-->
+ <!--/TMPL_LOOP-->
<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Show Biblio</a>
</div>
<!--TMPL_IF Name="barcode_not_unique" -->
<input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
</td>
<td>
- <!--TMPL_IF EXPR="subscriptionexpired and status1"-->
+ <!--TMPL_IF name="editdisable"-->
<select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" disabled >
<!--TMPL_ELSE-->
<select name="status" size="1" id="status<!-- TMPL_VAR NAME="num" -->" OnChange="javascript:if (this.value==2){unHideItems('items'+<!-- TMPL_VAR NAME="subscriptionid" -->+<!-- TMPL_VAR NAME="serialid" -->,'label<!-- TMPL_VAR NAME="subscriptionid" --><!--TMPL_VAR Name="serialid"-->')}" >
document.getElementById("more_options").innerHTML = '';
document.f.irreg_check.value=1;
break;
+ case "8":
+ var d = new Date();
+ var sYear = d.getFullYear();
+ document.f.add1.value=1;
+ document.f.add2.value=1;
+ document.f.add3.value='';
+ document.f.every1.value=12;
+ document.f.every2.value=1;
+ document.f.every3.value='';
+ document.f.whenmorethan1.value=9999999;
+ document.f.whenmorethan2.value=12;
+ document.f.whenmorethan3.value='';
+ document.f.setto1.value=0;
+ document.f.setto2.value=1;
+ document.f.setto3.value='';
+ document.f.lastvalue1.value=sYear;
+ document.f.lastvalue2.value='1';
+ document.f.lastvalue3.value='';
+ document.f.periodicity.value=1;
+ document.f.numberingmethod.value=_('{X}/{Y}');
+ display_table(0);
+ break;
default:
document.f.add1.value=1;
document.f.add2.value='';
var expected;
var errortext = _("<b>Warning irregularity detected<\/b><br \/>");
switch(periodicity){
+ case "12":
+ if(rollover < 730) expected =730;
+ if(rollover > 730) {
+ expectedover=730;
+ toobig=1;
+ }
+ break;
case "1":
if(rollover < 365) expected =365;
if(rollover > 365) {
toobig=1;
}
break;
+ case "13":
+ if(rollover < 156) expected =156;
+ if(rollover > 156) {
+ expectedover=156;
+ toobig=1;
+ }
+ break;
case "2":
if(rollover < 52) expected =52;
if(rollover > 52){
break;
}
if(expected){
- if(expected == 365){
+ if(expected == 365 || expected==730){
var daynames = new Array(_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday'),_('Sunday'));
errortext += _("Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>");
for(var j=0;j<daynames.length;j++){
<input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="8">
(<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled readonly>)
<a href="#" onClick="Plugin(f)">Search for Biblio</a> <!--TMPL_UNLESS Name="mod"--> |
- <a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Create Biblio</a><!--/TMPL_UNLESS-->
+ <a href="#" onClick="Create_biblio(f)">Create Biblio</a><!--/TMPL_UNLESS-->
</td>
</tr>
<tr>
<td>
<select name="periodicity" size="1" onchange="javascript:document.getElementsByName('manualhist')[0].checked=(this.value==1);num_pattern;">
<option value="" selected>-- please choose --</option>
- <option value="">Unknown</option>
+ <!-- TMPL_IF name="periodicity16" -->
+ <option value="16" selected>Without Periodicity</option>
+ <!-- TMPL_ELSE -->
+ <option value="16">Without Periodicity</option>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="periodicity48" -->
+ <option value="48" selected>Unknown</option>
+ <!-- TMPL_ELSE -->
+ <option value="48">Unknown</option>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="periodicity32" -->
+ <option value="32" selected>Irregular</option>
+ <!-- TMPL_ELSE -->
+ <option value="32">Irregular</option>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="periodicity12" -->
+ <option value="12" selected>2/day</option>
+ <!-- TMPL_ELSE -->
+ <option value="12">2/day</option>
+ <!-- /TMPL_IF -->
<!-- TMPL_IF name="periodicity1" -->
<option value="1" selected>1/day</option>
<!-- TMPL_ELSE -->
<option value="1">1/day</option>
<!-- /TMPL_IF -->
+ <!-- TMPL_IF name="periodicity13" -->
+ <option value="13" selected>3/week</option>
+ <!-- TMPL_ELSE -->
+ <option value="13">3/week</option>
+ <!-- /TMPL_IF -->
<!-- TMPL_IF name="periodicity2" -->
<option value="2" selected>1/week</option>
<!-- TMPL_ELSE -->
<!-- TMPL_ELSE -->
<option value="6">Seasonal only</option>
<!-- /TMPL_IF -->
+ <!-- TMPL_IF name="numberpattern8" -->
+ <option value="8" selected>Year/Number</option>
+ <!-- TMPL_ELSE -->
+ <option value="8">Year/Number</option>
+ <!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern7" -->
<option value="7" selected>None of the above</option>
<!-- TMPL_ELSE -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
<script language="JavaScript" type="text/javascript">
+function Create_biblio(f)
+{
+ window.open('/cgi-bin/koha/cataloguing/addbiblio.pl?mode=popup','FindABibIndex','width=1024,height=768,toolbar=no,scrollbars=yes');
+}
function Plugin(f)
{
var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
'Autumn','Winter','Spring','Summer','Fall','Season','Year');
-// common pre defined number patterns
-// function num_pattern() {
-// var patternchoice = '<!--TMPL_VAR NAME='numberpattern'-->';
-// switch(patternchoice){
-// case "2":
-// options(text[1],text[0],text[2]);
-// irregularity();
-// display_table(0);
-// break;
-// case "3":
-// options(text[1],text[0]);
-// irregularity();
-// display_table(0);
-// break;
-// case "4":
-// options(text[1],text[2]);
-// irregularity();
-// display_table(0);
-// break;
-// case "5":
-// options(text[0],text[2]);
-// irregularity();
-// display_table(0);
-// break;
-// case "6":
-// var d = new Date();
-// var sYear = d.getFullYear();
-// // options_seasons(text[15],sYear);
-// irregularity();
-// is_season = 1;
-// display_table(0);
-// break;
-// case "7":
-// display_table(1);
-// irregularity();
-// break;
-// default:
-// options(text[0]);
-// irregularity();
-// display_table(0);
-// break;
-// }
-// }
-//
-// function display_table(n) {
-// if(n==1){
-// document.getElementById("basetable").style.display = 'block';
-// } else {
-// document.getElementById("basetable").style.display = 'none';
-// }
-// }
-// to dispaly the options section
+// to display the options section
function options(x,y,z){
var textbox = '';
// alert("X: "+x+"Y: "+y+"Z: "+z);
<div class="edit">
<a href="subscription-add.pl?op=mod&subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Edit</a>
<a href="subscription-add.pl?op=dup&subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Duplicate </a>
- <a href="subscription-renew.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Renew </a>
+ <a href="#" onclick="javascript:popup(<!--TMPL_VAR Name="subscriptionid"-->)">Renew </a>
<a href="serials-edit.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&serstatus=1,3">Receive</a>
<a href="javascript:confirm_deletion()">
Delete
<p><label>Beginnning date:</label> <!-- TMPL_VAR name="startdate" -->
</p>
<p><label>Frequency (*):</label>
+ <!--TMPL_IF name="periodicity16" -->
+ Without regularity
+ <!-- /TMPL_IF -->
+ <!--TMPL_IF name="periodicity32" -->
+ Irregular
+ <!-- /TMPL_IF -->
+ <!--TMPL_IF name="periodicity" -->
+ Unknown
+ <!-- /TMPL_IF -->
+ <!--TMPL_IF name="periodicity12" -->
+ 2/day
+ <!-- /TMPL_IF -->
<!--TMPL_IF name="periodicity1" -->
1/day
<!-- /TMPL_IF -->
+ <!--TMPL_IF name="periodicity13" -->
+ 3/week
+ <!-- /TMPL_IF -->
<!--TMPL_IF name="periodicity2" -->
1/week
<!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern5" -->
Number, Issue
<!-- /TMPL_IF -->
+ <!-- TMPL_IF name="numberpattern8" -->
+ Year/Number
+ <!-- /TMPL_IF -->
<!-- TMPL_IF name="numberpattern6" -->
Seasonal only
<!-- /TMPL_IF -->
<tr>
<th>Issue number</th>
<th>Planned date</th>
+ <th>Published date</th>
<th>Status</th>
</tr>
<!-- TMPL_LOOP name="serialslist" -->
<!-- TMPL_VAR name="planneddate" -->
</td>
<td>
+ <!-- TMPL_VAR name="publisheddate" -->
+ </td>
+ <td>
<!--TMPL_IF name="status1" -->
Waited
<!-- /TMPL_IF -->
window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&op=del";
}
}
-function popup(link) {
- newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
+function popup(subscriptionid) {
+ newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
}
// window.onload = num_pattern();
<title>Koha › Serials Subscription renew#<!-- TMPL_VAR name="subscriptionid" --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!--TMPL_INCLUDE NAME="menu-serials.inc" -->
+<!--TMPL_IF Name="renew"-->
+ <div id="mainbloc">
+ Subscription renewed.
+
+ <script type="text/javascript">
+ <!--
+ opener.document.location.reload();
+ self.close();
+ //-->
+ </script>
+</div>
+<!--TMPL_ELSE-->
<div id="mainbloc">
<h1 class="serial">subscription renewal for <!-- TMPL_VAR name="bibliotitle" --></h1>
</div>
</form>
</div>
-
- <!-- TMPL_IF NAME="done" -->
- <script type="text/javascript">
- <!--
- opener.document.location.reload();
- self.close();
- //-->
- </script>
- <!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->