Bug 27998: Replace obsolete title-string sorting: Serials templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / mana / mana-subscription-search-result.inc
1 [% USE KohaDates %]
2 [% USE Koha %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% USE raw %]
6
7 [% IF statuscode == "200" %]
8     [% INCLUDE 'mana/mana-comment-status.inc' %]
9     <div id="mana_results">
10         <table id="mana_results_datatable">
11             <thead>
12                 <tr>
13                     <th>ISSN</th>
14                     <th class="anti-the">Title</th>
15                     <th> Published by </th>
16                     <th>Frequency</th>
17                     <th>Numbering pattern</th>
18                     <th title="Number of libraries using this pattern"># of users</th>
19                     <th title="Last time a library used this pattern">Last import</th>
20                     <th> Comments </th>
21                     [% UNLESS search_only %]
22                       <th class="NoSort noExport">Actions</th>
23                     [% END %]
24                 </tr>
25             </thead>
26             <tbody>
27                 [% FOREACH subscription IN subscriptions %]
28                     [% UNLESS subscription.cannotdisplay %]
29                         [% IF subscription.nbofcomment > highWarned  %]
30                             <tr id="row[% subscription.id | html %]" class="high-warned-row" title="This resource has been reported more than [% highWarned | html %] times, take care!">
31                         [% ELSIF subscription.nbofcomment > warned  %]
32                             <tr id="row[% subscription.id | html %]" class="warned-row" title="This resource has been reported more than [% warned | html %] times, take care!">
33                         [% ELSIF subscription.nbofcomment > lowWarned  %]
34                             <tr id="row[% subscription.id | html %]" class="highlighted-row" title="This resource has been reported more than [% lowWarned | html %] times, take care!">
35                         [% ELSE %]
36                             <tr id="row[% subscription.id | html %]">
37                         [% END %]
38                         <input type="hidden" hidden class="rowid" value="[% subscription.id | html %]" />
39                             <td>[% IF ( subscription.issn ) %][% subscription.issn | html %][% END %]</td>
40                             <td>[% subscription.title | html %]</td>
41                             <td>[% IF ( subscription.publishercode ) %][% subscription.publishercode | html %][% END %]</td>
42                             <td>[% IF ( subscription.sfdescription ) %][% subscription.sfdescription | html %][% END %]</td>
43                             <td>[% IF ( subscription.numberingmethod ) %][% subscription.numberingmethod | html %][% END %]</td>
44                             <td>[% IF ( subscription.nbofusers ) %][% subscription.nbofusers | html %][% END %]</td>
45                             <td data-order="[% subscription.lastimport | html %]">[% subscription.lastimport | $KohaDates %]</td>
46                             <td>
47                                 [% FOREACH comment IN subscription.comments %]
48                                     [% comment.message | html %] ([% comment.nb | html %])<br />
49                                 [% END %]
50                             </td>
51                             [% UNLESS search_only %]
52                                 <td class="actions">
53                                     <button class="btn btn-default btn-xs mana-use" data-subscription_id="[% subscription.id | html %]" id="mana-use-[% subscription.id | html %]"><i class="fa fa-download"></i> Import</button>
54                                     <div class="dropup">
55                                         <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
56                                             Report <span class="caret"></span>
57                                         </button>
58                                         <ul class="dropdown-menu pull-right mana-actions" id="mana-actions-[% subscription.id | html %]">
59                                             [% IF ( subscription.comments.size ) %]
60                                                 [% FOREACH comment IN subscription.comments %]
61                                                     <li><a data-commentid="[% comment.id | html %]" data-resourceid="[% subscription.id | html %]" href="#">[% comment.message | html %] ([% comment.nb | html %])</a></li>
62                                                 [% END %]
63                                                 <li role="separator" class="divider"></li>
64                                             [% END %]
65                                             <li><a data-commentid="other" data-resourceid="[% subscription.id | html %]" href="#">New comment</a></li>
66                                         </ul>
67                                     </div>
68                                 </td>
69                             [% END %]
70                         </tr>
71                     [% END %]
72                 [% END %]
73             </tbody>
74         </table>
75     </div>
76     <div id="new_mana_comment" style="display:none">
77         <h4 id="mana_submit_comment"> Please enter a new comment (max 35 characters)</h4>
78         <form id="mana_comment_form" action="/cgi-bin/koha/serials/subscription-detail.pl" method="get">
79             <input type="hidden" id="mana-resource" value="subscription" />
80             <input type="hidden" id="mana-resource-id" value="[% mana_id | html %]" />
81             <input type="text" maxlength="35" size="35" id="mana-comment" required="required" />
82             <input type="hidden" id="selected_id" value="" />
83             <div class="action">
84                 <button id="mana-send-comment">Submit</button>
85                 <a href="#" class="cancel" id="mana-comment-close">Cancel</a>
86             </div>
87         </form>
88     </div>
89 [% ELSE %]
90     <h4>Mana search fails with the code: [% statuscode | html %] </h4>
91 [% END %]
92
93 <div id="comment_box" class="modal" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="display: none;">
94     <div class="modal-dialog modal-lg" style="width: 30%">
95         <div class="modal-content" style="">
96             <div class="modal-header">
97                 <button type="button" id="commentCloseButton" class="closebtn" aria-hidden="true">×</button>
98                 <h3 id="mana_submit_comment"> Please enter a new comment (max 35 characters)</h3>
99             </div>
100             <div class="modal-body">
101                 <form>
102                     <input hidden id="selected_id" value="">
103                     <input type="text" id="manamsg"> Comment:
104                 </form>
105                 <button id="CommentButton"> Comment </button>
106             </div>
107         </div>
108     </div>
109 </div>