Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / list.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Tools &rsaquo; Tags &rsaquo; [% IF ( do_it ) %]Review &rsaquo; [% ELSE %]Review tags[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% Asset.css("css/datatables.css") | $raw %]
8 <style type="text/css">
9 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
10 </head>
11
12 <body id="tags_list" class="tools">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/tags/review.pl">Tags</a> &rsaquo; Results for tag <i>[% tag | html %]</i></div>
17
18 <div id="doc3" class="yui-t2">
19  <div id="bd">
20   <div id="yui-main">
21   <div class="yui-b">
22 [% IF ( titles ) %]
23 <h3>Titles tagged with the term <i>[% tag | html %]</i></h3>
24 <table id="itemst">
25         <thead><tr>
26             <th>Title</th>
27             <th>Location</th>
28             <th>&nbsp;</th>
29         </tr></thead>
30
31         [% FOREACH title IN titles %]
32             <tr>
33             <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title | html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield | html %][% END %]</a>
34             [% title.author | html %]
35             <p>[% IF ( title.publishercode ) %]- [% title.publishercode | html %]
36             [% IF ( title.place ) %] [% title.place | html %][% END %][% END %]
37             [% IF ( title.pages ) %] - [% title.pages | html %][% IF ( title.size ) %] [% title.size | html %]
38             [% END %]
39             [% END %]</p>
40             [% IF ( title.notes ) %]
41             <p>[% title.notes | html %]</p>[% END %]
42             [% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
43             <a href="/cgi-bin/koha/tags/list.pl?tag=[% TagLoo.term | html %]">[% TagLoo.term | html %]</a> <span class="weight">([% TagLoo.weight_total | html %])</span>[% IF ( loop.last ) %][% ELSE %], [% END %]
44             [% END %]</p>
45             [% END %]
46             </td>
47             <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
48                 <li>
49                     [% item.branchname | html %] [% item.location_description | html %]
50                     [% IF ( item.itemcallnumber ) %]
51                         ([% item.itemcallnumber | html %])
52                     [% END %]
53                 </li>
54                 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
55              </td>
56              <td><form method="post" action="/cgi-bin/koha/tags/list.pl"><input type="hidden" name="op" value="del" /><input type="hidden" name="tag" value="[% tag | html %]" /><input type="hidden" name="tag_id" value="[% title.tag_id | html %]" /><button type="submit" class="delete btn btn-default btn-sm"><i class="fa fa-trash"></i> Remove tag</button></form></td>
57             </tr>
58         [% END %]
59     </table>
60 [% ELSE %]
61         <div class="dialog message">There are no titles tagged with the term <i>[% tag | html %]</i></div>
62 [% END %]
63 </form>
64  </div>
65  </div>
66  <div class="yui-b">
67   <ul>
68     <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a>
69     </li>
70     <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a>
71     </li>
72     <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a>
73     </li>
74     <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a>
75     </li>
76   </ul>
77  </div>
78 </div>
79
80 [% MACRO jsinclude BLOCK %]
81     [% INCLUDE 'datatables.inc' %]
82     <script type="text/javascript">
83         $(document).ready(function() {
84             $(".delete").click(function (event) {
85                 $(this).parent().parent().parent().addClass("selected");
86                 var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
87                     if (!answer){
88                         $("tr").removeClass("selected");
89                         event.preventDefault();
90                     }
91             });
92             $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
93                 "aoColumnDefs": [
94                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
95                 ],
96                 "aaSorting": [[ 0, "asc" ]],
97                 "sPaginationType": "four_button"
98             }));
99         });
100     </script>
101 [% END %]
102
103 [% INCLUDE 'intranet-bottom.inc' %]