Bug 35356: Show SMS labels only when data exists
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / routing-lists.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10     [% t("Subscription routing lists for") | html %] [% INCLUDE 'patron-title.inc' no_html = 1 %]
11     [% t("Patrons") | html %] &rsaquo;
12     [% t("Koha") | html %]
13 [% END %]</title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 </head>
16
17 <body id="pat_routing_lists" class="pat">
18 [% WRAPPER 'header.inc' %]
19     [% INCLUDE 'patron-search-header.inc' %]
20 [% END %]
21
22 [% WRAPPER 'sub-header.inc' %]
23     [% WRAPPER breadcrumbs %]
24         [% WRAPPER breadcrumb_item %]
25             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
26         [% END %]
27         [% WRAPPER breadcrumb_item %]
28             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
29         [% END %]
30         [% WRAPPER breadcrumb_item bc_active= 1 %]
31             <span>Subscription routing lists</span>
32         [% END %]
33     [% END #/ WRAPPER breadcrumbs %]
34 [% END #/ WRAPPER sub-header.inc %]
35
36 <div class="main container-fluid">
37     <div class="row">
38         <div class="col-sm-10 col-sm-push-2">
39             <main>
40
41                 [% INCLUDE 'members-toolbar.inc' %]
42
43                 <h1>Subscription routing lists for [% INCLUDE 'patron-title.inc' %]</h1>
44 <!-- Search Bar -->
45 <p class="hint">Search subscriptions:</p>
46 <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">[% IF ( routing ) %]<input type="hidden" name="routing" value="[% routing | html %]" />[% 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 | html %]" /> <label for="title_filter">Title:</label> <input type="text" size="20" maxlength="40" name="title_filter" id="title_filter" value="[% title_filter | html %]" /><input type="submit" class="btn btn-primary" value="Search" />
47 </form>
48 <!-- Search Bar End -->
49
50 [% SET routinglists = patron.get_routing_lists %]
51 <h2>
52 [% UNLESS ( routinglists ) %]
53 <span>0 subscription routing lists</span>
54 [% ELSIF ( routinglists.count == 1 ) %]
55 <span>[% routinglists.count | html %] subscription routing list</span>
56 [% ELSE %]
57 <span>[% routinglists.count | html %] subscription routing lists</span>
58 [% END %]
59 </h2>
60
61 <div id="subscriptions" class="page-section">
62
63 [% IF ( routinglists ) %]
64     <table id="subscriptiont">
65         <thead>
66             <tr>
67                 <th>Subscription title</th>
68                 <th>Position</th>
69                 <th>Routing list</th>
70             </tr>
71         </thead>
72         <tbody>
73         [% FOREACH routinglist IN routinglists %]
74             <tr>
75                 <td>
76                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% routinglist.subscription.subscriptionid | uri %]">
77                         [% routinglist.subscription.biblio.title | html %]
78                     </a>
79                 </td>
80                 <td>
81                     [% routinglist.ranking | html %]
82                 </td>
83                 <td>
84                     <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% routinglist.subscription.subscriptionid | uri %]">
85                         Edit routing list
86                     </a>
87                     <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber | html %]" />
88                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
89                 </td>
90             </tr>
91             [% END %]
92         </tbody>
93     </table>
94 [% ELSE %]
95     <p>Patron does not belong to any subscription routing lists.</p>
96     <input type="hidden" name="biblionumber" value="[% routinglist.subscription.biblionumber | html %]" />
97     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
98 [% END %]
99
100 </div>
101
102             </main>
103         </div> <!-- /.col-sm-10.col-sm-push-2 -->
104
105         <div class="col-sm-2 col-sm-pull-10">
106             <aside>
107                 [% INCLUDE 'circ-menu.inc' %]
108             </aside>
109         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
110      </div> <!-- /.row -->
111
112 [% MACRO jsinclude BLOCK %]
113     [% INCLUDE 'str/members-menu.inc' %]
114     [% Asset.js("js/members-menu.js") | $raw %]
115 [% END %]
116
117 [% INCLUDE 'intranet-bottom.inc' %]