Bug 27631: labels and members folders
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / purchase-suggestions.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE AuthorisedValues  %]
6 [% USE Branches %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Purchase suggestions for [% INCLUDE 'patron-title.inc' no_html = 1 %] &rsaquo; Patrons &rsaquo; Koha</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="pat_purchase_suggestions" class="pat">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'patron-search-header.inc' %]
16
17 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18     <ol>
19         <li>
20             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21         </li>
22         <li>
23             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
24         </li>
25         <li>
26             <a href="#" aria-current="page">
27                 Purchase suggestions for [% INCLUDE 'patron-title.inc' %]
28             </a>
29         </li>
30     </ol>
31 </nav>
32
33 <div class="main container-fluid">
34     <div class="row">
35         <div class="col-sm-10 col-sm-push-2">
36             <main>
37
38                 <h1>Purchase suggestions</h1>
39                 [% INCLUDE 'members-toolbar.inc' %]
40
41                 <div id="toolbar" class="btn-toolbar">
42                     <a class="btn btn-default" id="newsuggestion" href="/cgi-bin/koha/suggestion/suggestion.pl?op=add&amp;suggestedby=[% patron.borrowernumber | html %]&amp;redirect=purchase_suggestions&amp;borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-plus"></i> New purchase suggestion</a>
43                 </div>
44
45                 [% IF suggestions %]
46                   <table id="suggestions">
47                     <thead>
48                         <tr>
49                           <th>Summary</th>
50                           <th>Note</th>
51                           <th>Managed by</th>
52                           <th>Managed on</th>
53                           <th>Suggested on</th>
54                           <th>Status</th>
55                         </tr>
56                     </thead>
57
58                     <tbody>
59                         [% FOREACH s IN suggestions %]
60                             <tr>
61                                 <td>
62                                     <p>
63                                         <strong>
64                                             [% IF ( CAN_user_catalogue ) %]
65                                                 <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% s.suggestionid | uri %]&amp;op=show">[% s.title | html %]</a>
66                                             [% ELSE %]
67                                                 [% s.title | html %]
68                                             [% END %]
69                                         </strong>
70                                     </p>
71                                     <p>
72                                         [% IF ( s.author ) %][% s.author | html %],[% END %]
73                                         [% IF ( s.copyrightdate ) %] - [% s.copyrightdate | html %],[% END %]
74                                         [% IF ( s.publishercode ) %] - [% s.publishercode | html %][% END %]
75                                         [% IF ( s.place ) %]([% s.place | html %])[% END %]
76                                         [% IF ( s.collectiontitle ) %] , [% s.collectiontitle | html %][% END %]
77                                         [% IF ( s.itemtype ) %] - [% s.itemtype | html %][% END %]
78                                     </p>
79                                 </td>
80                                 <td>[% s.note | html %]
81                                 <td>
82                                     [% IF ( s.surnamemanagedby ) %]
83                                         [% s.surnamemanagedby | html %]
84                                         [% IF ( s.firstnamemanagedby ) %],[% END %]
85                                         [% s.firstnamemanagedby | html %]
86                                     [% ELSE %]
87                                         &nbsp;
88                                     [% END %]
89                                 </td>
90                                 <td data-order="[% s.manageddate | html %]">
91                                     [% s.manageddate | $KohaDates %]
92                                 </td>
93                                 <td data-order="[% s.suggesteddate | html %]">
94                                     [% s.suggesteddate | $KohaDates %]
95                                 </td>
96                                 <td>
97                                     [% SWITCH s.STATUS %]
98                                     [% CASE "ASKED" %]<span>Requested</span>
99                                     [% CASE "CHECKED" %]<span>Checked by the library</span>
100                                     [% CASE "ACCEPTED" %]<span>Accepted by the library</span>
101                                     [% CASE "ORDERED" %]<span>Ordered by the library</span>
102                                     [% CASE "REJECTED" %]<span>Suggestion declined<span>
103                                     [% CASE "AVAILABLE" %]<span>Available in the library</span>
104                                     [% CASE %]
105                                         [% SET status_description = AuthorisedValues.GetByCode('SUGGEST_STATUS', s.STATUS) %]
106                                         [% IF status_description %]
107                                             [% status_description | html %]
108                                         [% ELSE %]
109                                             <span>Unknown</span>
110                                         [% END %]
111                                     [% END %]
112                                     [% IF s.reason %]([% s.reason | html %])[% END %]
113                                 </td>
114                             </tr>
115                         [% END %]
116                     </tbody>
117                   </table>
118                 [% ELSE %]
119                     <div class="dialog message">
120                         <p>This patron has not submitted any purchase suggestions</p>
121                     </div>
122                 [% END %]
123
124             </main>
125         </div> <!-- /.col-sm-10.col-sm-push-2 -->
126
127         <div class="col-sm-2 col-sm-pull-10">
128             <aside>
129                 [% INCLUDE 'circ-menu.inc' %]
130             </aside>
131         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
132      </div> <!-- /.row -->
133
134 [% MACRO jsinclude BLOCK %]
135     [% INCLUDE 'str/members-menu.inc' %]
136     [% Asset.js("js/members-menu.js") | $raw %]
137     [% INCLUDE 'datatables.inc' %]
138     <script>
139         $(document).ready(function() {
140             $("#suggestions").dataTable($.extend(true, {}, dataTablesDefaults, {
141                 'bPaginate': false,
142                 'bFilter': false,
143                 'bInfo': false,
144                 'sDom': 't'
145             } ));
146         });
147     </script>
148 [% END %]
149
150 [% INCLUDE 'intranet-bottom.inc' %]