Bug 32099: Consistent classes for primary buttons: Assorted templates
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / list.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% IF ( do_it ) %]Review[% ELSE %]Review tags[% END %] &rsaquo; Tags &rsaquo; Tools &rsaquo; Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style>
10 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
11 </head>
12
13 <body id="tags_list" class="tools">
14 [% WRAPPER 'header.inc' %]
15     [% INCLUDE 'cat-search.inc' %]
16 [% END %]
17
18 [% WRAPPER 'sub-header.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20     <ol>
21         <li>
22             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23         </li>
24         <li>
25             <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
26         </li>
27         <li>
28             <a href="/cgi-bin/koha/tags/review.pl">Tags</a>
29         </li>
30         <li>
31             <a href="#" aria-current="page">
32                 Results for tag <em>[% tag | html %]</em>
33             </a>
34         </li>
35     </ol>
36 </nav>
37 [% END %]
38
39 <div class="main container-fluid">
40     <div class="row">
41         <div class="col-sm-10 col-sm-push-2">
42             <main>
43
44                 <h1>Results for tag <em>[% tag | html %]</em></h1>
45
46 [% IF ( titles ) %]
47 <h3>Titles tagged with the term <em>[% tag | html %]</em></h3>
48     <div class="page-section">
49         <table id="itemst">
50             <thead><tr>
51                 <th>Title</th>
52                 <th>Location</th>
53                 <th>&nbsp;</th>
54                 </tr></thead>
55
56                 [% FOREACH title IN titles %]
57                     <tr>
58                     <td>[% INCLUDE 'biblio-title.inc' biblio=title link = 1 %]
59                     [% title.author | html %]
60                     <p>[% IF ( title.publishercode ) %]- [% title.publishercode | html %]
61                     [% IF ( title.place ) %] [% title.place | html %][% END %][% END %]
62                     [% IF ( title.pages ) %] - [% title.pages | html %][% IF ( title.size ) %] [% title.size | html %]
63                     [% END %]
64                     [% END %]</p>
65                     [% IF ( title.notes ) %]
66                     <p>[% title.notes | html %]</p>[% END %]
67                     [% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
68                     <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 %]
69                     [% END %]</p>
70                     [% END %]
71                     </td>
72                     <td>[% IF ( title.items.count ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
73                         <li>
74                             [% Branches.GetName(item.holdingbranch) | html %]
75                             <span class="shelvingloc">
76                                 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
77                             </span>
78                             [% IF ( item.itemcallnumber ) %]
79                                 ([% item.itemcallnumber | html %])
80                             [% END %]
81                         </li>
82                         [% END %]</ul>[% ELSE %]This record has no items.[% END %]
83                     </td>
84                     <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>
85                     </tr>
86                 [% END %]
87             </table>
88     </div> <!-- /.page-section -->
89 [% ELSE %]
90     <div class="dialog message">There are no titles tagged with the term <em>[% tag | html %]</em></div>
91 [% END %]
92 </form>
93
94             </main>
95         </div> <!-- /.col-sm-10.col-sm-push-2 -->
96
97         <div class="col-sm-2 col-sm-pull-10">
98             <aside>
99                 <ul>
100                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a></li>
101                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a></li>
102                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a></li>
103                     <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a></li>
104                 </ul>
105                 [% INCLUDE 'tools-menu.inc' %]
106             </aside>
107         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
108      </div> <!-- /.row -->
109
110 [% MACRO jsinclude BLOCK %]
111     [% INCLUDE 'datatables.inc' %]
112     <script>
113         $(document).ready(function() {
114             $(".delete").click(function (event) {
115                 $(this).parent().parent().parent().addClass("selected");
116                 var answer = confirm(_("Are you sure you want to remove the tag from this title?"));
117                     if (!answer){
118                         $("tr").removeClass("selected");
119                         event.preventDefault();
120                     }
121             });
122             $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
123                 "aoColumnDefs": [
124                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
125                 ],
126                 "aaSorting": [[ 0, "asc" ]],
127                 "sPaginationType": "full"
128             }));
129         });
130     </script>
131 [% END %]
132
133 [% INCLUDE 'intranet-bottom.inc' %]