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