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