Bug 34802: Improve translation of title tags: Tags and comments
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / list.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% PROCESS 'i18n.inc' %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% FILTER collapse %]
9     [% tx("Results for tag '{tag}'", { tag = tag }) | html %] &rsaquo;
10     [% t("Tags") | html %] &rsaquo;
11     [% t("Tools") | html %] &rsaquo;
12     [% t("Koha") | html %]
13 [% END %]</title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 <style>
16 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; }</style>
17 </head>
18
19 <body id="tags_list" class="tools">
20 [% WRAPPER 'header.inc' %]
21     [% INCLUDE 'cat-search.inc' %]
22 [% END %]
23
24 [% WRAPPER 'sub-header.inc' %]
25     [% WRAPPER breadcrumbs %]
26         [% WRAPPER breadcrumb_item %]
27             <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
28         [% END %]
29         [% WRAPPER breadcrumb_item %]
30             <a href="/cgi-bin/koha/tags/review.pl">Tags</a>
31         [% END %]
32         [% WRAPPER breadcrumb_item bc_active= 1 %]
33             [% tx("Results for tag '{tag}'", { tag = tag }) | html %]
34         [% END %]
35     [% END #/ WRAPPER breadcrumbs %]
36 [% END #/ WRAPPER sub-header.inc %]
37
38 <div class="main container-fluid">
39     <div class="row">
40         <div class="col-sm-10 col-sm-push-2">
41             <main>
42
43                 <h1>[% tx("Results for tag '{tag}'", { tag = tag }) | html %]</h1>
44
45 [% IF ( titles ) %]
46     <div class="page-section">
47         <table id="itemst">
48             <thead><tr>
49                 <th>Title</th>
50                 <th>Location</th>
51                 <th>&nbsp;</th>
52                 </tr></thead>
53
54                 [% FOREACH title IN titles %]
55                     <tr>
56                     <td>[% INCLUDE 'biblio-title.inc' biblio=title link = 1 %]
57                     [% title.author | html %]
58                     <p>[% IF ( title.publishercode ) %]- [% title.publishercode | html %]
59                     [% IF ( title.place ) %] [% title.place | html %][% END %][% END %]
60                     [% IF ( title.pages ) %] - [% title.pages | html %][% IF ( title.size ) %] [% title.size | html %]
61                     [% END %]
62                     [% END %]</p>
63                     [% IF ( title.notes ) %]
64                     <p>[% title.notes | html %]</p>[% END %]
65                     [% IF ( title.TagLoop ) %]<p style="font-size:90%"><strong>Tagged with:</strong> [% FOREACH TagLoo IN title.TagLoop %]
66                     <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 %]
67                     [% END %]</p>
68                     [% END %]
69                     </td>
70                     <td>[% IF ( title.items.count ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
71                         <li>
72                             [% Branches.GetName(item.holdingbranch) | html %]
73                             <span class="shelvingloc">
74                                 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]
75                             </span>
76                             [% IF ( item.itemcallnumber ) %]
77                                 ([% item.itemcallnumber | html %])
78                             [% END %]
79                         </li>
80                         [% END %]</ul>[% ELSE %]This record has no items.[% END %]
81                     </td>
82                     <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-can"></i> Remove tag</button></form></td>
83                     </tr>
84                 [% END %]
85             </table>
86     </div> <!-- /.page-section -->
87 [% ELSE %]
88     <div class="dialog message">There are no titles tagged with the term <em>[% tag | html %]</em></div>
89 [% END %]
90 </form>
91
92             </main>
93         </div> <!-- /.col-sm-10.col-sm-push-2 -->
94
95         <div class="col-sm-2 col-sm-pull-10">
96             <aside>
97                 <div id="menu">
98                     <ul>
99                         <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved tags</a></li>
100                         <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected tags</a></li>
101                         <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending tags</a></li>
102                         <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">All tags</a></li>
103                     </ul>
104                 </div>
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' %]