From dc26832dcfd8fb56a45b1060e1b76bdf7078b2f7 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 2 Aug 2005 15:00:36 +0000 Subject: [PATCH] introducing history list as in OPAC + adding some links & renaming some link not clear enough. --- bull/serial-issues.pl | 87 +++++++++++-------- bull/subscription-detail.pl | 1 + .../default/en/bull/bull-home.tmpl | 30 +++++-- .../default/en/bull/full-serial-issues.tmpl | 68 +++++++++++++++ .../default/en/bull/serial-issues.tmpl | 77 +++++++++------- .../default/en/bull/statecollection.tmpl | 4 +- .../default/en/bull/subscription-detail.tmpl | 8 +- 7 files changed, 195 insertions(+), 80 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl diff --git a/bull/serial-issues.pl b/bull/serial-issues.pl index 75ebf97f16..59eec456f6 100755 --- a/bull/serial-issues.pl +++ b/bull/serial-issues.pl @@ -14,45 +14,60 @@ use HTML::Template; my $query = new CGI; my $op = $query->param('op'); my $dbh = C4::Context->dbh; +my $selectview = $query->param('selectview'); +$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview; + my $sth; # my $id; my ($template, $loggedinuser, $cookie); -my ($subscriptionid); +my $biblionumber = $query->param('biblionumber'); +if ($selectview eq "full"){ + my $subscriptions = get_full_subscription_list_from_biblionumber($biblionumber); + + my $title = $subscriptions->[0]{bibliotitle}; + my $yearmin=$subscriptions->[0]{year}; + my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year}; -$subscriptionid = $query->param('subscriptionid'); -my $subscription = &getsubscription($subscriptionid); - -($template, $loggedinuser, $cookie) -= get_template_and_user({template_name => "bull/serial-issues.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {catalogue => 1}, - debug => 1, - }); - -# replace CR by
in librarian note -$subscription->{librariannote} =~ s/\n/\/g; - -$template->param( - startdate => format_date($subscription->{startdate}), - periodicity => $subscription->{periodicity}, - dow => $subscription->{dow}, - numberlength => $subscription->{numberlength}, - weeklength => $subscription->{weeklength}, - monthlength => $subscription->{monthlength}, - librariannote => $subscription->{librariannote}, - numberingmethod => $subscription->{numberingmethod}, - arrivalplanified => $subscription->{arrivalplanified}, - status => $subscription->{status}, - biblionumber => $subscription->{biblionumber}, - bibliotitle => $subscription->{bibliotitle}, - notes => $subscription->{notes}, - subscriptionid => $subscription->{subscriptionid} - ); -$template->param( - "periodicity$subscription->{periodicity}" => 1, - "arrival$subscription->{dow}" => 1, - ); + ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "bull/full-serial-issues.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + }); + + # replace CR by
in librarian note + # $subscription->{opacnote} =~ s/\n/\/g; + + $template->param( + biblionumber => $query->param('biblionumber'), + years => $subscriptions, + yearmin => $yearmin, + yearmax =>$yearmax, + bibliotitle => $title, + suggestion => C4::Context->preference("suggestion"), + virtualshelves => C4::Context->preference("virtualshelves"), + ); +} else { + my $subscriptions = get_subscription_list_from_biblionumber($biblionumber); + + ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "bull/serial-issues.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + }); + + # replace CR by
in librarian note + # $subscription->{opacnote} =~ s/\n/\/g; + + $template->param( + biblionumber => $query->param('biblionumber'), + subscription_LOOP => $subscriptions, + suggestion => C4::Context->preference("suggestion"), + virtualshelves => C4::Context->preference("virtualshelves"), + ); +} output_html_with_http_headers $query, $cookie, $template->output; diff --git a/bull/subscription-detail.pl b/bull/subscription-detail.pl index c9bed507e3..1eece43104 100755 --- a/bull/subscription-detail.pl +++ b/bull/subscription-detail.pl @@ -77,6 +77,7 @@ if ($op eq 'del') { } my $subs = &getsubscription($subscriptionid); my ($totalissues,@serialslist) = getserials($subscriptionid); +warn " => $totalissues"; $totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue) # the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...) diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/bull-home.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/bull-home.tmpl index 0f68fad5f3..b9f0594c9a 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/bull-home.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/bull-home.tmpl @@ -4,33 +4,45 @@

Serials subscriptions

- + + - + + diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl new file mode 100644 index 0000000000..68d4cd9695 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/default/en/bull/full-serial-issues.tmpl @@ -0,0 +1,68 @@ + + + + +

Subscription information for biblio # with title :

+

+ " class="button bull">Back to biblio + + + + )"> + + + &selectview=small">Compact view +

+ +
" id="" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;" style="visibility:visible"> +
Title ISSNTitle + Note +  
- "> + " title="type ISSN here to filter subscription"> - "> + " title="type a title -complete or partial- to filter subscription"> - + +   + +
- () + + " class="button bull" title="Issues history"> + + - + - " class="button bull">Detail - " class="button bull">Recieve + () + + " class="button bull" title="subscription detail">Detail + " class="button bull" title="receive issues for this subscription">Receive
+ + + + + + + + + + + + + + +
Information + Date + Number + Status +
+ + + + + + + Arrived + Waited + Late + Missing +
+ + + + + diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/serial-issues.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/serial-issues.tmpl index 7135381e3d..ca1116726c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/serial-issues.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/serial-issues.tmpl @@ -1,12 +1,15 @@ - +
-

Issues for a subscription

-" class="button catalogue">Biblio - -
-

Subscription information

-

For that began on and is issued every +

Issues for a subscription

+ " class="button bull">Back to subscriptions + " class="button bull">Back to biblio + &selectview=full">Complete view + + +
+

Subscription information for

+

It began on and is issued every day @@ -24,10 +27,10 @@ month - 2 monthes + 2 months - 3 Monthes + 3 months quarter @@ -42,46 +45,58 @@ 2 years - on - - Monday + on monday - Tuesday + on tuesday - Wednesday + on wednesday - Thursday + on thursday - Friday + on friday - Saturday + on saturday - Sunday + on sunday - -

-

(subscription for + for issues weeks months - ) +

+

Last renewal of subscription was

+

This subscription is now ended. The last issue was recieved on

+

-
-
-

Issues summary

-

- -

+ +

Issues summary

+

+ +

+ + +

Recieved issues

+

+ +

+ + +

Missing issues

+

+ +

+ +
+ +
-
- - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl index 126af24dc5..147713566a 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl @@ -3,7 +3,9 @@

Subscription for

-" class="button bull">Subscription +" class="button bull" title="detail of the subscription">Subscription +" class="button bull" title="all subscriptions on ">Subscriptions +" class="button bull" title="go to ">Back to biblio

waited or late numbers

diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl index a2b9299a81..474da4ad35 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl @@ -2,9 +2,11 @@