5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Tags</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 fieldset { padding : .3em;margin:.3em 0;}
11 #tagcloud {background-color: #F3F3F3; text-align: justify;padding:7px;}
12 .tag a {text-decoration: none;}
13 .tag a:hover {text-decoration: underline;}
14 .tag {display: block; padding-left: 1em;}
15 .tagcount {display: none;}
16 .cloudweight {display: none;}
27 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usertags' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-tags' bodyclass='scrollto' %][% END %]
28 [% INCLUDE 'masthead.inc' %]
31 <nav aria-label="breadcrumb">
32 <ul class="breadcrumb">
33 <li class="breadcrumb-item">
34 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
36 [% IF ( loggedinusername ) %]
37 <li class="breadcrumb-item">
38 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
41 <li class="breadcrumb-item" aria-current="page">
47 <div class="container-fluid">
49 [% IF ( OpacNav||loggedinusername ) %]
50 <div class="col col-lg-2 order-2 order-lg-1">
52 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
55 <div class="col-md-12 col-lg-10 order-1">
57 <div class="col order-first order-md-first order-lg-2">
60 <div id="usertags" class="maincontent">
62 [% FOREACH ERROR IN ERRORS %]
63 <div class="alert alert-warning">
64 There was a problem with this operation:
65 [% IF ( ERROR.badparam ) %]
66 ERROR: illegal parameter [% ERROR.badparam | html %]
67 [% ELSIF ( ERROR.login ) %]
68 ERROR: You must log in to complete that action.
69 [% ELSIF ( ERROR.failed_delete ) %]
70 ERROR: You cannot delete the tag [% ERROR.failed_delete | html %].
71 <br />Note: you can only delete your own tags.
72 [% ELSIF ( ERROR.scrubbed ) %]
73 Note: your tag contained markup code that was removed.
74 <br />The tag was added as "[% ERROR.scrubbed | html %]".
75 [% ELSIF ( ERROR.scrubbed_all_bad ) %]
76 Note: your tag was entirely markup code. It was NOT added.
77 <br />Please try again with plain text.
78 [% ELSE %]Unrecognized error.
82 [% END # /IF ERRORS %]
85 <form method="get" action="opac-tags.pl" class="form-inline">
87 <div class="form-inline">
89 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
90 Tags to show from other users:
95 <input type="text" name="limit" class="form-control form-control-sm mr-2" maxlength="4" size="4" value="[% limit or "100" | html %]" />
96 <input type="submit" value="OK" class="btn btn-sm btn-primary" />
98 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
99 [% UNLESS ( loggedinusername ) %]
101 [% IF Koha.Preference('casAuthentication') %]
102 [%# CAS authentication is too complicated for modal window %]
103 <a href="/cgi-bin/koha/opac-user.pl">Log in to see your own saved tags.</a>
105 <a class="loginModal-trigger" href="/cgi-bin/koha/opac-user.pl">Log in to see your own saved tags.</a>
115 [% FOREACH TAGLOO IN TAGLOOP %]
116 <span class="tag tagweight[% TAGLOO.stratum | html %]" id="tag[% loop.count | html %]" style="display:inline;">
117 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TAGLOO.term |url %]&q=[% TAGLOO.term |url %]">[% TAGLOO.term | html %]</a>
118 <span class="tagweight">[% TAGLOO.weight_total | html %]</span>
124 [% IF ( added_count ) %]
125 <div class="dialog message">[% added_count | html %] [% IF ( added_count == 1 ) %]tag[% ELSE %]tags[% END %] successfully added.</div>
127 [% IF ( deleted_count ) %]
128 <div class="dialog message">[% deleted_count | html %] [% IF ( deleted_count == 1 ) %]tag[% ELSE %]tags[% END %] successfully deleted.</div>
133 <form id="deletetags" method="post" action="opac-tags.pl">
135 <table id="mytagst" class="table table-bordered table-striped">
136 <thead><tr><th> </th><th>Term</th><th>Title</th><th>Date added</th></tr></thead>
138 [% FOREACH MY_TAG IN MY_TAGS %]
139 [% IF MY_TAG.visible %]
142 <input type="checkbox" name="del[% MY_TAG.tag_id | html %]" value="del[% MY_TAG.tag_id | html %]">
145 <span class="tdlabel">Tag:</span>
146 [% IF MY_TAG.approved == 1 %]
147 <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&q=[% MY_TAG.term |url %]">[% MY_TAG.term | html %]</a>
149 [% MY_TAG.term | html %] (not approved)
153 [% IF ( MY_TAG.XSLTBloc ) %]
154 [% MY_TAG.XSLTBloc | $raw %]
156 <span class="tdlabel">Title:</span>
157 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber | html %]">
158 [% INCLUDE 'biblio-title.inc' biblio=MY_TAG %]
160 [% IF ( MY_TAG.author ) %]
161 by [% MY_TAG.author | html %]
163 [% END # /IF MY_TAG.XSLTBloc %]
165 [% INCLUDE 'title-actions-menu.inc' items=MY_TAG %]
168 <span title="[% MY_TAG.date_created | html %]">
169 <span class="tdlabel">Date added:</span>
170 [% MY_TAG.date_created | $KohaDates %]
178 <input type="submit" value="Delete selected tags" class="btn btn-danger btn-sm delete">
181 </div> <!-- / .usertags -->
182 </div> <!-- / .span10/12 -->
183 </div> <!-- / .row -->
184 </div> <!-- / .container-fluid -->
185 </div> <!-- / .main -->
187 [% INCLUDE 'opac-bottom.inc' %]
188 [% BLOCK jsinclude %]
189 [% INCLUDE 'datatables.inc' %]
192 function checkboxesChecked() {
193 if ($("#deletetags input:checkbox:checked").length > 0) {
200 $(document).ready(function(){
201 var MSG_DELETE_TAG = _("Are you sure you want to delete the selected tag(s)?");
202 $(".delete").on("click", function(e){
203 if ( checkboxesChecked() == 1 ) {
204 return confirmDelete(MSG_DELETE_TAG);
206 alert(_("Please select a tag to delete."));
211 $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
212 "sorting": [[ 2, "asc" ]],
214 { "targets": [ 0 ], "sortable": false, "searchable": false }
218 { "type": "anti-the" },
219 { "type": "title-string" },