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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt (-38 / +40 lines)
Lines 21-80 Link Here
21
21
22
<!-- Search Bar -->
22
<!-- Search Bar -->
23
<p class="tip">Search subscriptions:</p>
23
<p class="tip">Search subscriptions:</p>
24
<form action="/cgi-bin/koha/serials/serials-home.pl" method="get">[% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %]<input type="hidden" name="searched" value="1" /> <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" /> <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" /><input type="submit" value="Search" class="submit" />
24
<form action="/cgi-bin/koha/serials/serials-search.pl" method="get">[% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing %]" />[% END %]<input type="hidden" name="searched" value="1" /> <label for="ISSN_filter">ISSN:</label> <input type="text" size="10" maxlength="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter %]" /> <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter %]" /><input type="submit" value="Search" class="submit" />
25
</form>
25
</form>
26
<!-- Search Bar End -->
26
<!-- Search Bar End -->
27
27
28
<h1>
28
<h1>
29
[% IF ( countSubscrip ) %]
29
[% UNLESS ( routinglists ) %]
30
[% countSubscrip %] Subscription routing list(s)
30
0 subscription routing lists
31
[% ELSIF ( routinglists.size() == 1 ) %]
32
[% routinglists.size() %] subscription routing list
31
[% ELSE %]
33
[% ELSE %]
32
0 Subscription routing lists
34
[% routinglists.size() %] subscription routing lists
33
[% END %]
35
[% END %]
34
</h1>
36
</h1>
35
37
36
<div id="subscriptions">
38
<div id="subscriptions">
37
[% IF ( subscripLoop ) %]
39
38
<table id="subscriptiont">
40
[% IF ( routinglists ) %]
39
              <thead>
41
    <table id="subscriptiont">
40
                <tr>
42
        <thead>
41
                  <th>Subscription title</th>
43
            <tr>
42
                  <th>Routing list</th>
44
                <th>Subscription title</th>
43
                </tr>
45
                <th>Position</th>
44
              </thead>
46
                <th>Routing list</th>
45
              <tbody>
47
            </tr>
46
[% FOREACH subscripLoop IN subscripLoop %]
48
        </thead>
47
<tr>
49
        <tbody>
48
    <td>
50
        [% FOREACH routinglist IN routinglists %]
49
    <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscripLoop.subscriptionid %]"><strong>
51
            <tr>
50
    [% subscripLoop.title %]
52
                <td>
51
    </strong>
53
                    <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% routinglist.subscription.subscriptionid %]">
54
                        [% routinglist.subscription.biblio.title %]
52
                    </a>
55
                    </a>
53
                  </td>
56
                </td>
54
                  <td>
57
                <td>
55
                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscripLoop.subscriptionid %]"><strong>
58
                    [% routinglist.ranking %]
56
                    Edit routing list
59
                </td>
57
                      </strong>
60
                <td>
61
                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% routinglist.subscription.subscriptionid %]">
62
                        Edit routing list
58
                    </a>
63
                    </a>
59
                    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
64
                    <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber %]" />
60
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
61
                  </td>
62
                </tr>
63
                [% END %]
64
                </tbody>
65
            </table>
66
            </form>
67
          [% ELSE %]
68
          <p>Patron does not belong to any subscription routing lists.</p>
69
          <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
70
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
65
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
71
                    [% END %]
66
                </td>
67
            </tr>
68
            [% END %]
69
        </tbody>
70
    </table>
71
[% ELSE %]
72
    <p>Patron does not belong to any subscription routing lists.</p>
73
    <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber %]" />
74
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
75
[% END %]
72
76
73
</div>
77
</div>
74
78
75
79
76
77
78
</div>
80
</div>
79
</div>
81
</div>
80
82
(-)a/members/routing-lists.pl (-16 / +2 lines)
Lines 51-73 my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in" Link Here
51
my $patron         = Koha::Patrons->find( $borrowernumber );
51
my $patron         = Koha::Patrons->find( $borrowernumber );
52
output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
52
output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
53
53
54
my $count;
54
my @routinglists = $patron->get_routinglists();
55
my @borrowerSubscriptions;
56
($count, @borrowerSubscriptions) = GetSubscriptionsFromBorrower($borrowernumber );
57
my @subscripLoop;
58
59
foreach my $num_res (@borrowerSubscriptions) {
60
    my %getSubscrip;
61
    $getSubscrip{subscriptionid} = $num_res->{'subscriptionid'};
62
    $getSubscrip{title}          = $num_res->{'title'};
63
    $getSubscrip{borrowernumber} = $num_res->{'borrowernumber'};
64
    push( @subscripLoop, \%getSubscrip );
65
}
66
55
67
$template->param(
56
$template->param(
68
    countSubscrip => scalar @subscripLoop,
57
    routinglists  => \@routinglists,
69
    subscripLoop  => \@subscripLoop,
70
    routinglistview => 1
71
);
58
);
72
59
73
$template->param(
60
$template->param(
74
- 

Return to bug 20456