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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt (-97 lines)
Lines 1-97 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Serials &rsaquo; Subscription information for biblio #[% biblionumber %] with title : [% bibliotitle %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript">
5
//<![CDATA[
6
active([% yearmin %]);
7
function active(numlayer)
8
{
9
	for (i=[% yearmin %]; i<=[% yearmax %]; i++ ) {
10
		ong = i;
11
		link = "link"+i;
12
		if (numlayer==i) {
13
			document.getElementById(ong).style.visibility="visible";
14
		} else {
15
			document.getElementById(ong).style.visibility="hidden";
16
		}
17
	}
18
}
19
//]]>
20
</script>
21
</head>
22
<body id="ser_serial-issues-full" class="ser">
23
24
[% UNLESS ( popup ) %]
25
[% INCLUDE 'header.inc' %]
26
[% INCLUDE 'serials-search.inc' %]
27
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Serials </div>
28
29
<div id="doc3" class="yui-t2">
30
   
31
   <div id="bd">
32
	<div id="yui-main">
33
	<div class="yui-b">
34
	<h1>Subscription information for biblio #[% biblionumber %] with title : [% bibliotitle %]</h1>
35
	<p>
36
	<a href="opac-detail.pl?biblionumber=[% biblionumber %]" class="button">Back to biblio</a>
37
[% END %]
38
	[% FOREACH year IN years %]
39
		[% IF ( year.year ) %]
40
			<a  class="button" href="javascript:active([% year.year %])">[% year.year %]</a>
41
		[% END %]
42
	[% END %]
43
	<a class=" button serial" href="serial-issues.pl?biblionumber=[% biblionumber %]&amp;selectview=small">Compact view</a>
44
	</p>
45
	[% FOREACH year IN years %]
46
    [% IF ( year.first ) %]<div name="[% year.year %]" id="[% year.year %]" style="position:absolute; visibility:visible margin-top:0px; border:4px;" >
47
    [% ELSE %]<div name="[% year.year %]" id="[% year.year %]" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;">[% END %]
48
		<table>
49
			<tr>
50
				<th>Information
51
				</th>
52
				<th>Date
53
				</th>
54
				<th>Number
55
				</th>
56
				<th>Status
57
				</th>
58
			</tr>
59
			[% FOREACH serial IN year.serials %]
60
			<tr>
61
				<td>
62
					[% serial.notes %]
63
				</td>
64
				<td>
65
					[% serial.planneddate %]
66
				</td>
67
				<td>
68
					[% serial.serialseq %]
69
				</td>
70
				<td>
71
                    [% IF ( serial.status1 ) %]Expected[% END %]
72
                    [% IF ( serial.status2 ) %]Arrived[% END %]
73
                    [% IF ( serial.status3 ) %]Late[% END %]
74
                    [% IF ( serial.status4 ) %]Missing[% END %]
75
                    [% IF ( serial.status41 ) %]Missing (never received)[% END %]
76
                    [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
77
                    [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
78
                    [% IF ( serial.status44 ) %]Missing (lost)[% END %]
79
                    [% IF ( serial.status5 ) %]Not issued[% END %]
80
                    [% IF ( serial.status6 ) %]Delete[% END %]
81
                    [% IF ( serial.status7 ) %]Claimed[% END %]
82
                    [% IF ( serial.status8 ) %]Stopped[% END %]
83
				</td>
84
			</tr>
85
			[% END %]
86
		</table>
87
	</div>
88
	[% END %]
89
90
</div>
91
</div>
92
93
<div class="yui-b">
94
[% INCLUDE 'serials-menu.inc' %]
95
</div>
96
</div>
97
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues.tt (-122 lines)
Lines 1-122 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Serials &rsaquo; Subscription information for [% bibliotitle %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body id="ser_serial-issues" class="ser">
6
[% INCLUDE 'header.inc' %]
7
[% INCLUDE 'serials-search.inc' %]
8
9
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Subscription information for <i>[% bibliotitle %]</i></div>
10
11
<div id="doc3" class="yui-t2">
12
   
13
   <div id="bd">
14
	<div id="yui-main">
15
	<div class="yui-b">
16
17
<h1>Subscription information for <i>[% bibliotitle %]</i></h1>
18
<div id="action">
19
    <a href="/cgi-bin/koha/serials/serials-search.pl?biblionumber=[% biblionumber %]">Subscriptions</a>
20
    <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblionumber %]">Back to biblio</a>
21
    <a href="/cgi-bin/koha/serials/serial-issues.pl?biblionumber=[% biblionumber %]&amp;selectview=full">Complete view</a>
22
</div>
23
[% FOREACH subscription_LOO IN subscription_LOOP %]
24
    <div id="serials_serial_issue_[% subscription_LOO.subscriptionid %]">
25
    <h2>Subscription summary</h2>
26
        <p>It began on <b>[% subscription_LOO.histstartdate %]</b> and is issued every
27
        <b>
28
        [% IF ( subscription_LOO.periodicity1 ) %]
29
                day
30
        [% END %]
31
        [% IF ( subscription_LOO.periodicity2 ) %]
32
                week
33
        [% END %]
34
        [% IF ( subscription_LOO.periodicity3 ) %]
35
                2 weeks
36
        [% END %]
37
        [% IF ( subscription_LOO.periodicity4 ) %]
38
                3 weeks
39
        [% END %]
40
        [% IF ( subscription_LOO.periodicity5 ) %]
41
                month
42
        [% END %]
43
        [% IF ( subscription_LOO.periodicity6 ) %]
44
                2 months
45
        [% END %]
46
        [% IF ( subscription_LOO.periodicity7 ) %]
47
                3 months
48
        [% END %]
49
        [% IF ( subscription_LOO.periodicity8 ) %]
50
                quarter
51
        [% END %]
52
        [% IF ( subscription_LOO.periodicity9 ) %]
53
                2 quarters
54
        [% END %]
55
        [% IF ( subscription_LOO.periodicity10 ) %]
56
                year
57
        [% END %]
58
        [% IF ( subscription_LOO.periodicity11 ) %]
59
                2 years
60
        [% END %]
61
        </b>
62
        [% IF ( subscription_LOO.arrival1 ) %]
63
            on <b>Monday</b>
64
        [% END %]
65
        [% IF ( subscription_LOO.arrival2 ) %]
66
            on <b>Tuesday</b>
67
        [% END %]
68
        [% IF ( subscription_LOO.arrival3 ) %]
69
            on <b>Wednesday</b>
70
        [% END %]
71
        [% IF ( subscription_LOO.arrival4 ) %]
72
            on <b>Thursday</b>
73
        [% END %]
74
        [% IF ( subscription_LOO.arrival5 ) %]
75
            on <b>Friday</b>
76
        [% END %]
77
        [% IF ( subscription_LOO.arrival6 ) %]
78
            on <b>Saturday</b>
79
        [% END %]
80
        [% IF ( subscription_LOO.arrival7 ) %]
81
            on <b>Sunday</b>
82
        [% END %]
83
        for <b>
84
            [% IF ( subscription_LOO.numberlength ) %][% subscription_LOO.numberlength %] issues[% END %]
85
            [% IF ( subscription_LOO.weeklength ) %][% subscription_LOO.weeklength %] weeks[% END %]
86
            [% IF ( subscription_LOO.monthlength ) %][% subscription_LOO.monthlength %] months[% END %]
87
            </b>
88
        </p>
89
        <p>Last renewal of subscription was <b>[% subscription_LOO.startdate %]</b></p>
90
        [% IF ( subscription_LOO.enddate ) %]<p><b>This subscription is now ended. The last issue was received on [% subscription_LOO.enddate %]</b></p>[% END %]
91
    [% UNLESS ( subscription_LOO.fullinfo ) %]
92
        <p>[% subscription_LOO.notes %]</p>
93
        [% IF ( subscription_LOO.opacnote ) %]
94
            <h2>Issues summary</h2>
95
            <p>
96
                [% subscription_LOO.opacnote %]
97
            </p>
98
        [% END %]
99
        [% IF ( subscription_LOO.recievedlist ) %]
100
            <h2>Received issues</h2>
101
            <p>
102
                [% subscription_LOO.recievedlist %]
103
            </p>
104
        [% END %]
105
        [% IF ( subscription_LOO.missinglist ) %]
106
            <h2>Missing issues</h2>
107
            <p>
108
                [% subscription_LOO.missinglist %]
109
            </p>
110
        [% END %]
111
    </div>
112
    [% END %]
113
[% END %]
114
115
</div>
116
</div>
117
118
<div class="yui-b">
119
[% INCLUDE 'serials-menu.inc' %]
120
</div>
121
</div>
122
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/serials/serial-issues.pl (-109 lines)
Lines 1-108 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2000-2002 Katipo Communications
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
21
=head1 NAME
22
23
serial-issue.pl
24
25
=head1 DESCRIPTION
26
27
this script give more information about a susbcription given on input arg.
28
29
=head1 PARAMETERS
30
31
=over 4
32
33
=item selectview
34
can be equal to "full" or not.
35
36
=item biblionumber
37
the biblionumber this script has to give more infos.
38
39
=back
40
41
42
=cut
43
44
use strict;
45
use warnings;
46
use CGI qw ( -utf8 );
47
use C4::Auth;
48
use C4::Koha;
49
use C4::Serials;
50
use C4::Output;
51
use C4::Context;
52
53
54
my $query = new CGI;
55
my $dbh = C4::Context->dbh;
56
my $selectview = $query->param('selectview');
57
$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview;
58
59
my ($template, $loggedinuser, $cookie);
60
my $biblionumber = $query->param('biblionumber');
61
if ($selectview eq "full"){
62
    my $subscriptions = GetFullSubscriptionsFromBiblionumber($biblionumber);
63
64
    my $title = $subscriptions->[0]{bibliotitle};
65
    my $yearmin=$subscriptions->[0]{year};
66
    my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year};
67
68
    ($template, $loggedinuser, $cookie)
69
     = get_template_and_user({template_name => "serials/serial-issues-full.tt",
70
     query => $query,
71
     type => "intranet",
72
	 flagsrequired => {serials => '*'},
73
     });
74
75
 # replace CR by <br> in librarian note
76
 # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
77
78
    $template->param(
79
        biblionumber => scalar $query->param('biblionumber'),
80
        years => $subscriptions,
81
        yearmin => $yearmin,
82
        yearmax =>$yearmax,
83
        bibliotitle => $title,
84
        suggestion => C4::Context->preference("suggestion"),
85
        virtualshelves => C4::Context->preference("virtualshelves"),
86
    );
87
88
} else {
89
    my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
90
    ($template, $loggedinuser, $cookie)
91
    = get_template_and_user({template_name => "serials/serial-issues.tt",
92
        query => $query,
93
        type => "intranet",
94
	    flagsrequired => {serials => '*'},
95
     });
96
97
 # replace CR by <br> in librarian note
98
 # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
99
100
    $template->param(
101
        biblionumber => "".$query->param('biblionumber'),
102
        subscription_LOOP => $subscriptions,
103
        suggestion => "".C4::Context->preference("suggestion"),
104
        virtualshelves => "".C4::Context->preference("virtualshelves"),
105
    );
106
}
107
$template->param((uc(C4::Context->preference("marcflavour"))) => 1);
108
output_html_with_http_headers $query, $cookie, $template->output;
109
- 

Return to bug 19767