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