Bug 22250: Clean up Mana KB integration with serials and reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / mana / mana-report-search-result.inc
1 [% USE Asset %]
2 [% USE KohaDates %]
3 [% USE Koha %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% USE raw %]
7
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Reports &rsaquo; Mana Knowledge Base reports search</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% Asset.css("css/reports.css") | $raw %]
12 [% Asset.css("css/datatables.css") | $raw %]
13 </head>
14
15 <body id="rep_mana_search" class="rep">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'circ-search.inc' %]
18
19 <div id="breadcrumbs">
20     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21     &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
22     &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
23     &rsaquo; Mana Knowledge Base report search results
24 </div>
25
26 <div class="main container-fluid">
27     <div class="row">
28         <div class="col-sm-10 col-sm-push-2">
29             <main>
30                 <h2>Mana Knowledge Base report search results</h2>
31
32                 <div id="mana_results">
33                     [% IF statuscode == "200" AND reports %]
34
35                         <table id="mana_results_datatable">
36                             <thead>
37                                 <tr>
38                                     <th>Report name</th>
39                                     <th class="anti-the">Notes</th>
40                                     <th>Type</th>
41                                     <th title="Number of libraries using this pattern"># of users</th>
42                                     <th class="title-string" title="Last time a library used this pattern">Last import</th>
43                                     <th> Comments </th>
44                                     [% UNLESS search_only %]
45                                         <th class="NoSort">Actions</th>
46                                     [% END %]
47                                 </tr>
48                             </thead>
49                             <tbody>
50                                 [% FOREACH report IN reports %]
51                                     [% UNLESS report.cannotdisplay %]
52                                         [% IF report.nbofcomment > highWarned %]
53                                             <tr id="row[% report.id | html %]" class="high-warned-row">
54                                         [% ELSIF report.nbofcomment > warned %]
55                                             <tr id="row[% report.id | html %]" class="warned-row">
56                                         [% ELSIF report.nbofcomment > lowWarned %]
57                                             <tr id="row[% report.id | html %]" class="highlighted-row">
58                                         [% ELSE %]
59                                             <tr id="row[% report.id | html %]">
60                                         [% END %]
61                                         <td>
62                                             <input type="hidden" class="rowid" value="[% report.id | $raw %]" />
63                                             [% IF ( report.report_name ) %]
64                                                 [% report.report_name | html %]
65                                             [% END %]
66                                         </td>
67                                         <td title="[% report.savedsql | html %]">
68                                             [% IF report.notes.length > 200 %]
69                                                 <div>
70                                                     [% report.notes.substr(0,200) | html %]... <a href="#" class="btn btn-link btn-sm showbutton"><i class="fa fa-plus-square-o"></i> Show more</a>
71                                                 </div>
72                                                 <div style="display:none">
73                                                     [% report.notes | html %]
74                                                     <a href="#" class="btn btn-link btn-sm hidebutton"><i class="fa fa-minus-square-o"></i> Show less</a>
75                                                 </div>
76                                             [% ELSE %]
77                                                 [% report.notes | html %]
78                                             [% END %]
79                                         </td>
80                                         <td> [% report.type | html %] </td>
81                                         <td>
82                                             [% IF ( report.nbofusers ) %]
83                                                 [% report.nbofusers | html %]
84                                             [% END %]
85                                         </td>
86                                         <td>
87                                             <span title="[% report.lastimport | html %]">
88                                                 [% report.lastimport | $KohaDates %]
89                                             </span>
90                                         </td>
91                                         <td>
92                                             [% FOREACH comment IN report.comments %]
93                                                 [% comment.message | html %] ([% comment.nb | html %])<br>
94                                             [% END %]
95                                         </td>
96
97                                         [% UNLESS search_only %]
98                                             <td>
99                                                 <button type="button" class="btn btn-default btn-xs mana-use" id="mana-use-[% report.id | html %]" data-report_id="[% report.id | html %]"><i class="fa fa-download"></i> Import</button>
100                                             </td>
101                                         [% END %]
102                                       </tr>
103                                     [% END %]
104                                 [% END %]
105                             </tbody>
106                         </table>
107                     [% ELSE %]
108                         <h4>
109                             [% IF ( msg ) %]
110                                 [% msg | html %] (Statuscode: [% statuscode | html %])
111                             [% ELSE %]
112                                 No results found
113                             [% END %]
114                         </h4>
115                     [% END %]
116                 </div>
117
118             </main>
119         </div> <!-- /.col-sm-10.col-sm-push-2 -->
120
121         <div class="col-sm-2 col-sm-pull-10">
122             <aside>
123                 [% INCLUDE 'guided-reports-view.inc' %]
124             </aside>
125         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
126      </div> <!-- /.row -->
127
128 [% INCLUDE 'intranet-bottom.inc' %]