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 / +41 lines)
Lines 22-81 Link Here
22
22
23
<!-- Search Bar -->
23
<!-- Search Bar -->
24
<p class="tip">Search subscriptions:</p>
24
<p class="tip">Search subscriptions:</p>
25
<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" />
25
<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" />
26
</form>
26
</form>
27
<!-- Search Bar End -->
27
<!-- Search Bar End -->
28
28
29
<h1>
29
<h1>
30
[% IF ( countSubscrip ) %]
30
[% UNLESS ( routinglists ) %]
31
[% countSubscrip %] Subscription routing list(s)
31
0 subscription routing lists
32
[% ELSIF ( routinglists.size() == 1 ) %]
33
[% routinglists.size() %] subscription routing list
32
[% ELSE %]
34
[% ELSE %]
33
0 Subscription routing lists
35
[% routinglists.size() %] subscription routing lists
34
[% END %]
36
[% END %]
35
</h1>
37
</h1>
36
38
37
<div id="subscriptions">
39
<div id="subscriptions">
38
[% IF ( subscripLoop ) %]
40
39
<table id="subscriptiont">
41
[% SET routinglists = logged_in_user.get_routing_lists %]
40
              <thead>
42
[% IF ( routinglists ) %]
41
                <tr>
43
    <table id="subscriptiont">
42
                  <th>Subscription title</th>
44
        <thead>
43
                  <th>Routing list</th>
45
            <tr>
44
                </tr>
46
                <th>Subscription title</th>
45
              </thead>
47
                <th>Position</th>
46
              <tbody>
48
                <th>Routing list</th>
47
[% FOREACH subscripLoop IN subscripLoop %]
49
            </tr>
48
<tr>
50
        </thead>
49
    <td>
51
        <tbody>
50
    <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscripLoop.subscriptionid %]"><strong>
52
        [% FOREACH routinglist IN routinglists %]
51
    [% subscripLoop.title %]
53
            <tr>
52
    </strong>
54
                <td>
55
                    <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% routinglist.subscription.subscriptionid %]">
56
                        [% routinglist.subscription.biblio.title %]
53
                    </a>
57
                    </a>
54
                  </td>
58
                </td>
55
                  <td>
59
                <td>
56
                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscripLoop.subscriptionid %]"><strong>
60
                    [% routinglist.ranking %]
57
                    Edit routing list
61
                </td>
58
                      </strong>
62
                <td>
63
                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% routinglist.subscription.subscriptionid %]">
64
                        Edit routing list
59
                    </a>
65
                    </a>
60
                    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
66
                    <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber %]" />
61
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
62
                  </td>
63
                </tr>
64
                [% END %]
65
                </tbody>
66
            </table>
67
            </form>
68
          [% ELSE %]
69
          <p>Patron does not belong to any subscription routing lists.</p>
70
          <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
71
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
67
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
72
                    [% END %]
68
                </td>
69
            </tr>
70
            [% END %]
71
        </tbody>
72
    </table>
73
[% ELSE %]
74
    <p>Patron does not belong to any subscription routing lists.</p>
75
    <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber %]" />
76
    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
77
[% END %]
73
78
74
</div>
79
</div>
75
80
76
81
77
78
79
</div>
82
</div>
80
</div>
83
</div>
81
84
(-)a/members/routing-lists.pl (-20 lines)
Lines 51-75 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;
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
67
$template->param(
68
    countSubscrip => scalar @subscripLoop,
69
    subscripLoop  => \@subscripLoop,
70
    routinglistview => 1
71
);
72
73
$template->param(
54
$template->param(
74
    patron            => $patron,
55
    patron            => $patron,
75
    findborrower      => $findborrower,
56
    findborrower      => $findborrower,
76
- 

Return to bug 20456