From eb8c3f432bc8626a590e282f207b65401421cf2e Mon Sep 17 00:00:00 2001 From: hdl Date: Mon, 16 Jul 2007 15:39:43 +0000 Subject: [PATCH] - two periodicities 2/day and 3/week - two other non critic periodicity unknown and without regularity. Adding popup facility for create Biblio and subscription-renew --- .../prog/en/serials/serials-collection.tmpl | 8 +- .../prog/en/serials/serials-edit.tmpl | 9 ++- .../prog/en/serials/subscription-add.tmpl | 75 ++++++++++++++++- .../prog/en/serials/subscription-detail.tmpl | 81 ++++++------------- .../prog/en/serials/subscription-renew.tmpl | 24 +++--- 5 files changed, 121 insertions(+), 76 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl index 82d3458ba5..2afc0cf5b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-collection.tmpl @@ -53,8 +53,8 @@ function addsubscriptionid() 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'); } @@ -143,9 +143,9 @@ function popup(link) {
Subscription Expired - ')">Renew + )">Renew - ')">Renew + )">Renew   diff --git a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-edit.tmpl b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-edit.tmpl index 9f681e0422..57189600bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/serials/serials-edit.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/serials/serials-edit.tmpl @@ -13,8 +13,11 @@ " title="serial Collection for ">Serial collection " title="detail of the subscription">Subscription # - - " class="button" title="all subscriptions on ">Search All Subscriptions --> + &mode=popup')">Renew + + &mode=popup')">Renew + + " title="go to ">Show Biblio @@ -57,7 +60,7 @@ Error : Barcode Not Unique For serialseq " size=10 maxlength=15> - + " OnChange="javascript:if (this.value==2){unHideItems('items'++,'label')}" > diff --git a/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl b/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl index e4a676eb9e..379962a438 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/serials/subscription-add.tmpl @@ -137,6 +137,28 @@ var patternchoice = document.getElementById("numberpattern").value; 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=''; @@ -352,6 +374,13 @@ function irregularity_check(){ var expected; var errortext = _("Warning irregularity detected<\/b>
"); 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) { @@ -359,6 +388,13 @@ function irregularity_check(){ 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){ @@ -426,7 +462,7 @@ function irregularity_check(){ 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 DO NOT<\/b> expect to receive issues.
"); for(var j=0;j" size="8"> (" disabled readonly>) Search for Biblio | - Create Biblio + Create Biblio @@ -759,13 +795,37 @@ function check_input(e){