4 [% USE AdditionalContents %]
5 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Tags › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 fieldset { padding : .3em;margin:.3em 0;}
12 #tagcloud {background-color: #F5F5F5; text-align: justify;padding:7px;}
13 .tag a {text-decoration: none;}
14 .tag a:hover {text-decoration: underline;}
15 .tag {display: block; padding-left: 1em;}
16 .tagcount {display: none;}
17 .cloudweight {display: none;}
28 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usertags' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-tags' bodyclass='scrollto' %][% END %]
29 [% INCLUDE 'masthead.inc' %]
32 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
33 <ol class="breadcrumb">
34 <li class="breadcrumb-item">
35 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
37 [% IF ( loggedinusername ) %]
38 <li class="breadcrumb-item">
39 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
42 <li class="breadcrumb-item active">
43 <a href="#" aria-current="page">Tags</a>
46 </nav> <!-- /#breadcrumbs -->
48 <div class="container-fluid">
50 [% IF ( OpacNav||loggedinusername ) %]
51 <div class="col col-lg-2 order-2 order-lg-1">
53 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
56 <div class="col-md-12 col-lg-10 order-1">
58 <div class="col order-first order-md-first order-lg-2">
61 <div id="usertags" class="maincontent">
64 [% FOREACH ERROR IN ERRORS %]
65 <div class="alert alert-warning">
66 There was a problem with this operation:
67 [% IF ( ERROR.badparam ) %]
68 ERROR: illegal parameter [% ERROR.badparam | html %]
69 [% ELSIF ( ERROR.login ) %]
70 ERROR: You must log in to complete that action.
71 [% ELSIF ( ERROR.failed_delete ) %]
72 ERROR: You cannot delete the tag [% ERROR.failed_delete | html %].
73 <br />Note: you can only delete your own tags.
74 [% ELSIF ( ERROR.scrubbed ) %]
75 Note: your tag contained markup code that was removed.
76 <br />The tag was added as "[% ERROR.scrubbed | html %]".
77 [% ELSIF ( ERROR.scrubbed_all_bad ) %]
78 Note: your tag was entirely markup code. It was NOT added.
79 <br />Please try again with plain text.
80 [% ELSE %]Unrecognized error.
84 [% END # /IF ERRORS %]
86 <form method="get" action="opac-tags.pl" class="form-inline">
88 <div class="form-inline">
90 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
91 Tags to show from other users:
96 <input type="text" name="limit" class="form-control form-control-sm mr-2" maxlength="4" size="4" value="[% limit or "100" | html %]" />
97 <input type="submit" value="OK" class="btn btn-sm btn-primary" />
99 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
100 [% UNLESS ( loggedinusername ) %]
102 [% IF Koha.Preference('casAuthentication') %]
103 [%# CAS authentication is too complicated for modal window %]
104 <a href="/cgi-bin/koha/opac-user.pl">Log in to see your own saved tags.</a>
106 <a class="loginModal-trigger" href="/cgi-bin/koha/opac-user.pl">Log in to see your own saved tags.</a>
116 [% FOREACH TAGLOO IN TAGLOOP %]
117 <span class="tag tagweight[% TAGLOO.stratum | html %]" id="tag[% loop.count | html %]" style="display:inline;">
118 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TAGLOO.term |url %]&q=[% TAGLOO.term |url %]">[% TAGLOO.term | html %]</a>
119 <span class="tagweight">[% TAGLOO.weight_total | html %]</span>
125 [% IF ( added_count ) %]
126 <div class="dialog message">[% added_count | html %] [% IF ( added_count == 1 ) %]tag[% ELSE %]tags[% END %] successfully added.</div>
128 [% IF ( deleted_count ) %]
129 <div class="dialog message">[% deleted_count | html %] [% IF ( deleted_count == 1 ) %]tag[% ELSE %]tags[% END %] successfully deleted.</div>
134 <form id="deletetags" method="post" action="opac-tags.pl">
135 <table id="mytagst" class="table table-bordered table-striped">
136 <caption>Your tags</caption>
141 <th class="anti-the">Title</th>
146 [% FOREACH MY_TAG IN MY_TAGS %]
147 [% IF MY_TAG.visible %]
149 <td class="selectcol">
150 <input type="checkbox" name="del[% MY_TAG.tag_id | html %]" value="del[% MY_TAG.tag_id | html %]">
153 <span class="tdlabel">Tag:</span>
154 [% IF MY_TAG.approved == 1 %]
155 <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&q=[% MY_TAG.term |url %]">[% MY_TAG.term | html %]</a>
157 [% MY_TAG.term | html %] (not approved)
161 [% IF ( MY_TAG.XSLTBloc ) %]
162 [% MY_TAG.XSLTBloc | $raw %]
164 <span class="tdlabel">Title:</span>
165 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber | html %]">
166 [% INCLUDE 'biblio-title.inc' biblio=MY_TAG %]
168 [% IF ( MY_TAG.author ) %]
169 by [% MY_TAG.author | html %]
171 [% END # /IF MY_TAG.XSLTBloc %]
173 [% INCLUDE 'title-actions-menu.inc' items=MY_TAG %]
175 <td data-order="[% MY_TAG.date_created | html %]">
176 <span class="tdlabel">Date added:</span>
177 [% MY_TAG.date_created | $KohaDates %]
184 <input type="submit" value="Delete selected tags" class="btn btn-danger btn-sm delete">
187 </div> <!-- / .usertags -->
188 </div> <!-- / .span10/12 -->
189 </div> <!-- / .row -->
190 </div> <!-- / .container-fluid -->
191 </div> <!-- / .main -->
193 [% INCLUDE 'opac-bottom.inc' %]
194 [% BLOCK jsinclude %]
195 [% INCLUDE 'datatables.inc' %]
198 function checkboxesChecked() {
199 if ($("#deletetags input:checkbox:checked").length > 0) {
206 $(document).ready(function(){
207 var MSG_DELETE_TAG = _("Are you sure you want to delete the selected tag(s)?");
208 $(".delete").on("click", function(e){
209 if ( checkboxesChecked() == 1 ) {
210 return confirmDelete(MSG_DELETE_TAG);
212 alert(_("Please select a tag to delete."));
217 $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
218 "sorting": [[ 2, "asc" ]],
220 { "targets": [ 0 ], "sortable": false, "searchable": false },
221 { "sType": "anti-the", "aTargets" : [ "anti-the" ] }