Bug 22422: improve item location display with class "shelvingloc"
[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 <style>
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 | html %]</i></div>
16
17 <div class="main container-fluid">
18     <div class="row">
19         <div class="col-sm-10 col-sm-push-2">
20             <main>
21
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 | uri %]">[% 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 %]
50                     <span class="shelvingloc">[% item.location_description | html %]</span>
51                     [% IF ( item.itemcallnumber ) %]
52                         ([% item.itemcallnumber | html %])
53                     [% END %]
54                 </li>
55                 [% END %]</ul>[% ELSE %]This record has no items.[% END %]
56              </td>
57              <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>
58             </tr>
59         [% END %]
60     </table>
61 [% ELSE %]
62         <div class="dialog message">There are no titles tagged with the term <i>[% tag | html %]</i></div>
63 [% END %]
64 </form>
65
66             </main>
67         </div> <!-- /.col-sm-10.col-sm-push-2 -->
68
69         <div class="col-sm-2 col-sm-pull-10">
70             <aside>
71                 <ul>
72                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a></li>
73                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a></li>
74                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a></li>
75                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a></li>
76                 </ul>
77                 [% INCLUDE 'tools-menu.inc' %]
78             </aside>
79         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
80      </div> <!-- /.row -->
81
82 [% MACRO jsinclude BLOCK %]
83     [% INCLUDE 'datatables.inc' %]
84     <script>
85         $(document).ready(function() {
86             $(".delete").click(function (event) {
87                 $(this).parent().parent().parent().addClass("selected");
88                 var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
89                     if (!answer){
90                         $("tr").removeClass("selected");
91                         event.preventDefault();
92                     }
93             });
94             $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
95                 "aoColumnDefs": [
96                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
97                 ],
98                 "aaSorting": [[ 0, "asc" ]],
99                 "sPaginationType": "four_button"
100             }));
101         });
102     </script>
103 [% END %]
104
105 [% INCLUDE 'intranet-bottom.inc' %]