View | Details | Raw Unified | Return to bug 8694
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-1 / +7 lines)
Lines 56-62 $(document).ready(function() { Link Here
56
	[% INCLUDE 'serials-toolbar.inc' %]
56
	[% INCLUDE 'serials-toolbar.inc' %]
57
57
58
    <h1>Subscription for [% bibliotitle %] </h1>
58
    <h1>Subscription for [% bibliotitle %] </h1>
59
    [% IF ( abouttoexpire ) %]<div class="dialog message">Subscription will expire [% enddate %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>[% END %]
59
    [% IF ( abouttoexpire ) %]
60
        [% IF ( expired ) %]
61
        <div class="dialog alert">Subscription expired on [% enddate %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
62
        [% ELSE %]
63
        <div class="dialog message">Subscription will expire [% enddate %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
64
        [% END %]
65
    [% END %]
60
    [% IF ( NEEDSCONFIRMATION ) %]
66
    [% IF ( NEEDSCONFIRMATION ) %]
61
    <div id="circ_needsconfirmation" class="dialog alert">
67
    <div id="circ_needsconfirmation" class="dialog alert">
62
			<h3>Please Confirm Subscription deletion</h3>
68
			<h3>Please Confirm Subscription deletion</h3>
(-)a/serials/subscription-detail.pl (-2 / +6 lines)
Lines 25-31 use C4::Serials; Link Here
25
use C4::Output;
25
use C4::Output;
26
use C4::Context;
26
use C4::Context;
27
use C4::Search qw/enabled_staff_search_views/;
27
use C4::Search qw/enabled_staff_search_views/;
28
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/;
28
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days Delta_Days/;
29
use Carp;
29
use Carp;
30
30
31
my $query = new CGI;
31
my $query = new CGI;
Lines 99-108 my $hasRouting = check_routing($subscriptionid); Link Here
99
    = checkauth($query, 0, {catalogue => 1}, "intranet");
99
    = checkauth($query, 0, {catalogue => 1}, "intranet");
100
100
101
# COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ?
101
# COMMENT hdl : IMHO, we should think about passing more and more data hash to template->param rather than duplicating code a new coding Guideline ?
102
my $today = C4::Dates->today("iso");
103
my $expirationdiff = Delta_Days(split(/-/,"$subs->{enddate}"),split (/-/,$today)) ;
104
105
if($expirationdiff >= 0){ $subs->{expired} = 1; }
102
106
103
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){
107
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){
104
    $$subs{$date}      = format_date($$subs{$date}) if $date && $$subs{$date};
108
    $$subs{$date}      = format_date($$subs{$date}) if $date && $$subs{$date};
105
}
109
}
110
106
$subs->{location} = GetKohaAuthorisedValueLib("LOC",$subs->{location});
111
$subs->{location} = GetKohaAuthorisedValueLib("LOC",$subs->{location});
107
$subs->{abouttoexpire}  = abouttoexpire($subs->{subscriptionid});
112
$subs->{abouttoexpire}  = abouttoexpire($subs->{subscriptionid});
108
$template->param(%{ $subs });
113
$template->param(%{ $subs });
109
- 

Return to bug 8694