introducing history list as in OPAC
+ adding some links & renaming some link not clear enough.
This commit is contained in:
parent
5d9c18643e
commit
dc26832dcf
|
|
@ -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 <br> in librarian note
|
||||
$subscription->{librariannote} =~ s/\n/\<br\/\>/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 <br> in librarian note
|
||||
# $subscription->{opacnote} =~ s/\n/\<br\/\>/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 <br> in librarian note
|
||||
# $subscription->{opacnote} =~ s/\n/\<br\/\>/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;
|
||||
|
|
|
|||
|
|
@ -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...)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,33 +4,45 @@
|
|||
<h1 class="bull">Serials subscriptions</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="bull">Title</th>
|
||||
<th class="bull">ISSN</th>
|
||||
<th class="bull">Title</th>
|
||||
<th class="bull">
|
||||
Note
|
||||
</td>
|
||||
<th class="bull" colspan=2> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<form action="bull-home.pl" method="post">
|
||||
<td>
|
||||
<input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->">
|
||||
<input type="text" size=10 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size=11 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->">
|
||||
<input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->" title="type a title -complete or partial- to filter subscription">
|
||||
</td>
|
||||
<td colspan=3>
|
||||
<input type="submit" value="filter" class="button bull">
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td colspan=2>
|
||||
<input type="submit" value="filter" class="button bull" title="set a filter on ISSN / title">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="subscriptions" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="title" --> <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="ISSN" -->
|
||||
<a href="bull/serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="Issues history"><!-- TMPL_VAR name="ISSN" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="ISSN" -->
|
||||
<!-- TMPL_VAR name="title" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Detail</a>
|
||||
<a href="bull/statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Recieve</a>
|
||||
<!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="bull/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="subscription detail">Detail</a>
|
||||
<a href="bull/statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="receive issues for this subscription">Receive</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
|
||||
|
||||
<!-- TMPL_UNLESS name="popup" -->
|
||||
<h1 class="bull">Subscription information for biblio #<!-- TMPL_VAR NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
|
||||
<p>
|
||||
<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull">Back to biblio</a>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- TMPL_LOOP NAME="years" -->
|
||||
<!-- TMPL_IF NAME="year" -->
|
||||
<a class="button bull" href="javascript:active(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<a class=" button bull" href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
|
||||
</p>
|
||||
<!-- TMPL_LOOP NAME="years" -->
|
||||
<div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year" -->" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;" <!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="bull">Information
|
||||
</th>
|
||||
<th class="bull">Date
|
||||
</th>
|
||||
<th class="bull">Number
|
||||
</th>
|
||||
<th class="bull">Status
|
||||
</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP Name="serials" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="notes" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR Name="planneddate" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR Name="serialseq" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF Name="status1" -->Arrived<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status2" -->Waited<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</div>
|
||||
<!--/TMPL_LOOP -->
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
active(<!-- TMPL_VAR name="yearmin" -->);
|
||||
function active(numlayer)
|
||||
{
|
||||
for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR Name="yearmax"-->; i++ ) {
|
||||
ong = i;
|
||||
link = "link"+i;
|
||||
if (numlayer==i) {
|
||||
document.getElementById(ong).style.visibility="visible";
|
||||
} else {
|
||||
document.getElementById(ong).style.visibility="hidden";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1 class="catalogue">Issues for a subscription</h1>
|
||||
<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button catalogue">Biblio</a>
|
||||
<form method="post" name="f">
|
||||
<div id="bloc25">
|
||||
<h2 class="catalogue">Subscription information</h2>
|
||||
<p>For <b><!-- TMPL_VAR name="bibliotitle" --></b> that began on <b><!-- TMPL_VAR name="startdate" --></b> and is issued every
|
||||
<h1 class="bull">Issues for a subscription</h1>
|
||||
<a href="/cgi-bin/koha/bull-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull">Back to subscriptions</a>
|
||||
<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull">Back to biblio</a>
|
||||
<a class="button bull" href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=full">Complete view</a>
|
||||
|
||||
<!-- TMPL_LOOP name="subscription_LOOP" -->
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
|
||||
<p>It began on <b><!-- TMPL_VAR name="histstartdate" --></b> and is issued every
|
||||
<b>
|
||||
<!--TMPL_IF name="periodicity1" -->
|
||||
day
|
||||
|
|
@ -24,10 +27,10 @@
|
|||
month
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity6" -->
|
||||
2 monthes
|
||||
2 months
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity7" -->
|
||||
3 Monthes
|
||||
3 months
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity8" -->
|
||||
quarter
|
||||
|
|
@ -42,46 +45,58 @@
|
|||
2 years
|
||||
<!-- /TMPL_IF -->
|
||||
</b>
|
||||
on
|
||||
<b>
|
||||
<!--TMPL_IF name="arrival1" -->
|
||||
Monday
|
||||
on <b>monday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival2" -->
|
||||
Tuesday
|
||||
on <b>tuesday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival3" -->
|
||||
Wednesday
|
||||
on <b>wednesday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival4" -->
|
||||
Thursday
|
||||
on <b>thursday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival5" -->
|
||||
Friday
|
||||
on <b>friday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival6" -->
|
||||
Saturday
|
||||
on <b>saturday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival7" -->
|
||||
Sunday
|
||||
on <b>sunday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
</b>
|
||||
</p>
|
||||
<p>(subscription for
|
||||
for <b>
|
||||
<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> issues<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> weeks<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> months<!-- /TMPL_IF -->
|
||||
)
|
||||
</b>
|
||||
</p>
|
||||
<p>Last renewal of subscription was <b><!-- TMPl_VAR name="startdate" --></b></p>
|
||||
<!-- TMPL_IF name="enddate" --><p><b>This subscription is now ended. The last issue was recieved on <!-- TMPL_VAR name="enddate" --></b></p><!-- /TMPL_IF name="enddate" -->
|
||||
<!--TMPL_UNLESS Name=fullinfo -->
|
||||
<p><!-- TMPL_VAR name="notes" --></p>
|
||||
</div>
|
||||
<div id="bloc25">
|
||||
<h2 class="catalogue">Issues summary</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="librariannote" -->
|
||||
</p>
|
||||
<!-- TMPL_IF name="opacnote" -->
|
||||
<h3 class="bull">Issues summary</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="opacnote" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="recievedlist" -->
|
||||
<h3 class="bull">Recieved issues</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="recievedlist" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="missinglist" -->
|
||||
<h3 class="bull">Missing issues</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="missinglist" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1 class="bull">Subscription for <!-- TMPL_VAR name="bibliotitle" --></h1>
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Subscription</a>
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="detail of the subscription">Subscription</a>
|
||||
<a href="/cgi-bin/koha/bull-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->">Subscriptions</a>
|
||||
<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Back to biblio</a>
|
||||
|
||||
<div id="bloc25">
|
||||
<h2 class="bull">waited or late numbers</h2>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<div id="mainbloc">
|
||||
<h1 class="bull">Subscription</h1>
|
||||
<a href="subscription-add.pl?op=mod&subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Edit</a>
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull">Issues</a>
|
||||
<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull">Biblio</a>
|
||||
<a href="subscription-add.pl?op=mod&subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="Modify subscription">Edit</a>
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="Recieve issues">Receive</a>
|
||||
<a href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="All issues on this title">Issue history</a>
|
||||
<a href="/cgi-bin/koha/bull-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->">Subscriptions</a>
|
||||
<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="go to <!-- TMPL_VAR name="bibliotitle" -->">Back to biblio</a>
|
||||
<!-- TMPL_UNLESS name="totalissues" -->
|
||||
<a href="javascript:confirm_deletion()" class="button bull">
|
||||
delete
|
||||
|
|
|
|||
Loading…
Reference in New Issue