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