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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (+9 lines)
Lines 96-101 Link Here
96
                <a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1">your lists</a></li>
96
                <a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1">your lists</a></li>
97
            [% END %]
97
            [% END %]
98
98
99
            [% IF Koha.Preference( 'RoutingSerials' ) == 1 %]
100
                [% IF ( routinglistsview ) %]
101
                    <li class="active">
102
                [% ELSE %]
103
                    <li>
104
                [% END %]
105
                <a href="/cgi-bin/koha/opac-routing-lists.pl">your routing lists</a></li>
106
            [% END %]
107
99
            [% IF Koha.Preference( 'useDischarge' ) == 1 %]
108
            [% IF Koha.Preference( 'useDischarge' ) == 1 %]
100
                [% IF ( dischargeview ) %]
109
                [% IF ( dischargeview ) %]
101
                    <li class="active">
110
                    <li class="active">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-routing-lists.tt (+70 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% USE KohaDates %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your routing lists</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% BLOCK cssinclude %]
7
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
8
[% END %]
9
</head>
10
11
[% INCLUDE 'bodytag.inc' bodyid='opac-account' bodyclass='scrollto' %]
12
[% INCLUDE 'masthead.inc' %]
13
14
<div class="main">
15
    <ul class="breadcrumb">
16
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
17
        <li><a href="/cgi-bin/koha/opac-routing-lists.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a> <span class="divider">&rsaquo;</span></li>
18
        <li><a href="#">Your routing lists</a></li>
19
    </ul>
20
21
    <div class="container-fluid">
22
        <div class="row-fluid">
23
            <div class="span2">
24
                <div id="navigation">
25
                    [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
26
                </div>
27
            </div>
28
            <div class="span10">
29
                <div id="user-routing-lists" class="maincontent">
30
31
32
                    <h3>Routing lists</h3>
33
34
                    [% IF ( subscriptionLoop ) %]
35
                        <p id="routing-list-intro">You are subscribed to the routing lists for following serial titles. If you wish to make changes, please contact the library.</p>
36
37
                        <table class="table table-bordered table-striped" id="routingtable">
38
                            <thead>
39
                                <tr>
40
                                    <th>Subscription title</th>
41
                                </tr>
42
                            </thead>
43
44
                            <tbody>
45
                            [% FOREACH subscription IN subscriptionLoop %]
46
                                [% IF ( subscripLoop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
47
                                    <td>
48
                                        <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% subscription.biblionumber %]">
49
                                            [% subscription.title %]
50
                                        </a>
51
                                    </td>
52
                                </tr>
53
                            [% END %]
54
                            </tbody>
55
                        </table>
56
                    [% ELSE %]
57
                        <p>You are currently not listed on any routing lists.</p>
58
                    [% END %]
59
                </div>
60
            </div> <!-- / .span10 -->
61
        </div> <!-- / .row-fluid -->
62
    </div> <!-- / .container-fluid -->
63
</div> <!-- / .main -->
64
65
[% INCLUDE 'opac-bottom.inc' %]
66
[% BLOCK jsinclude %]
67
[% INCLUDE 'datatables.inc' %]
68
<script type="text/javascript">
69
</script>
70
[% END %]
(-)a/opac/opac-routing-lists.pl (-1 / +68 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
21
use C4::Members;
22
use C4::Auth;
23
use C4::Output;
24
use C4::Serials;
25
use Koha::Patrons;
26
use Koha::Subscriptions;
27
28
my $query = new CGI;
29
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
30
    {
31
        template_name   => "opac-routing-lists.tt",
32
        query           => $query,
33
        type            => "opac",
34
        authnotrequired => 0,
35
        debug           => 1,
36
    }
37
);
38
39
my $patron = Koha::Patrons->find( $borrowernumber );
40
my $category = $patron->category;
41
my $borrower= $patron->unblessed;
42
$borrower->{description} = $category->description;
43
$borrower->{category_type} = $category->category_type;
44
$template->param( BORROWER_INFO => $borrower );
45
46
47
my $count;
48
my @borrowerSubscriptions;
49
($count, @borrowerSubscriptions) = GetSubscriptionsFromBorrower($borrowernumber );
50
my @subscripLoop;
51
52
foreach my $num_res (@borrowerSubscriptions) {
53
    my %getSubscrip;
54
    $getSubscrip{subscriptionid} = $num_res->{'subscriptionid'};
55
    $getSubscrip{title}          = $num_res->{'title'};
56
    $getSubscrip{borrowernumber} = $num_res->{'borrowernumber'};
57
    my $subscription = Koha::Subscriptions->find( $num_res->{'subscriptionid'} );
58
    $getSubscrip{biblionumber}   = $subscription->biblionumber();
59
    push( @subscripLoop, \%getSubscrip );
60
}
61
62
$template->param(
63
    countSubscrip => scalar @subscripLoop,
64
    subscriptionLoop  => \@subscripLoop,
65
    routinglistview => 1
66
);
67
68
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };

Return to bug 20400