Bug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-tags.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Tags</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %]
8     <style type="text/css">
9         fieldset { padding : .3em;margin:.3em 0;}
10         #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
11         .tag a       {text-decoration: none;}
12         .tag a:hover {text-decoration: underline;}
13         .tag         {display: block; padding-left: 1em;}
14         .tagcount    {display: none;}
15         .cloudweight {display: none;}
16         .tagweight {
17             display: none;
18             position: relative;
19             bottom: 0.4em;
20             color: red;
21             font-size: 12px;
22         }
23     </style>
24 [% END %]
25 </head>
26 [% IF ( loggedinusername ) %][% INCLUDE 'bodytag.inc' bodyid='opac-usertags' bodyclass='scrollto' %][% ELSE %][% INCLUDE 'bodytag.inc' bodyid='opac-tags' bodyclass='scrollto' %][% END %]
27 [% INCLUDE 'masthead.inc' %]
28
29 <div class="main">
30     <ul class="breadcrumb">
31         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
32         <li><a href="#">Tags</a></li>
33     </ul>
34
35     <div class="container-fluid">
36         <div class="row-fluid">
37             [% IF ( OpacNav||loggedinusername ) %]
38                 <div class="span2">
39                     <div id="navigation">
40                         [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
41                     </div>
42                 </div>
43                 <div class="span10">
44             [% ELSE %]
45                 <div class="span12">
46             [% END %]
47
48                     <div id="usertags" class="maincontent">
49                         [% IF ( ERRORS ) %]
50                             [% FOREACH ERROR IN ERRORS %]
51                                 <div class="alert">
52                                     There was a problem with this operation:
53                                     [% IF ( ERROR.tagsdisabled ) %]
54                                         Sorry, tags are not enabled on this system.
55                                     [% ELSIF ( ERROR.badparam ) %]
56                                         ERROR: illegal parameter [% ERROR.badparam %]
57                                     [% ELSIF ( ERROR.login ) %]
58                                         ERROR: You must log in to complete that action.
59                                     [% ELSIF ( ERROR.failed_delete ) %]
60                                         ERROR: You cannot delete the tag [% ERROR.failed_delete %].
61                                         <br />Note: you can only delete your own tags.
62                                     [% ELSIF ( ERROR.scrubbed ) %]
63                                         Note: your tag contained markup code that was removed.
64                                         <br />The tag was added as &quot;[% ERROR.scrubbed %]&quot;.
65                                     [% ELSIF ( ERROR.scrubbed_all_bad ) %]
66                                         Note: your tag was entirely markup code.  It was NOT added.
67                                         <br />Please try again with plain text.
68                                     [% ELSE %]Unrecognized error.
69                                     [% END %]
70                                 </div>
71                             [% END %]
72                         [% END # /IF ERRORS %]
73                         <h1>All Tags</h1>
74
75                         <form method="get" action="opac-tags.pl" class="form-inline">
76                             <fieldset>
77                                 <label>
78                                     [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
79                                         Tags to show from other users
80                                     [% ELSE %]
81                                         Tags to show
82                                     [% END %]:
83                                 </label>
84                                 <div class="input-append">
85                                     <input type="text" name="limit" style="text-align: right;" maxlength="4" size="4" value="[% limit or "100" %]" />
86                                     <input type="submit" value="OK" class="btn" />
87                                 </div>
88                                 [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
89                                     [% UNLESS ( loggedinusername ) %]
90                                         <p><a class="loginModal-trigger" href="/cgi-bin/koha/opac-user.pl">Log in to see your own saved tags.</a></p>
91                                     [% END %]
92                                 [% END %]
93                             </fieldset>
94                         </form>
95
96                         [% IF ( TAGLOOP ) %]
97                             <div id="tagcloud">
98                                 [% FOREACH TAGLOO IN TAGLOOP %]
99                                     <span class="tag tagweight[% TAGLOO.stratum %]" id="tag[% loop.count %]" style="display:inline;">
100                                     <a href="/cgi-bin/koha/opac-search.pl?tag=[% TAGLOO.term |url %]&amp;q=[% TAGLOO.term |url %]">[% TAGLOO.term |html %]</a>
101                                     <span class="tagweight">[% TAGLOO.weight_total %]</span>
102                                     </span>
103                                 [% END %]
104                             </div>
105                         [% END # / TAGLOOP%]
106                         [% IF ( add_op ) %]
107                             [% IF ( added_count ) %]
108                                 <div class="dialog message">[% added_count %] [% IF ( added_count ==1 ) %] tag[% ELSE %]tags[% END %] successfully added.</div>
109                             [% END %]
110                             [% IF ( deleted_count ) %]
111                             <div class="dialog message">[% deleted_count %][% IF ( deleted_count ==1 ) %] tag[% ELSE %]tags[% END %] successfully deleted.</div>
112                             [% END %]
113                         [% END # /add_op %]
114
115                         [% IF ( MY_TAGS ) %]
116                         <form method="post" action="opac-tags.pl">
117                             <h2>Your tags</h2>
118                             <table id="mytagst" class="table table-bordered table-striped">
119                                 <thead><tr><th>Term</th><th>Title</th><th>Date added</th><th>Delete</th></tr></thead>
120                                 <tbody>
121                                     [% FOREACH MY_TAG IN MY_TAGS %]
122                                         <tr>
123                                             <td class="tagterm">
124                                                 <span class="tdlabel">Tag:</span>
125                                                 [% IF MY_TAG.approved == 1 %]
126                                                     <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&amp;q=[% MY_TAG.term |url %]">[% MY_TAG.term |html %]</a>
127                                                 [% ELSE %]
128                                                     [% MY_TAG.term |html %] (not approved)
129                                                 [% END %]
130                                             </td>
131
132                                             <td>
133                                                 [% IF ( MY_TAG.XSLTBloc ) %]
134                                                     [% MY_TAG.XSLTBloc %]
135                                                 [% ELSE %]
136                                                     <span class="tdlabel">Title:</span>
137                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber %]">
138                                                         [% MY_TAG.title |html %]
139                                                         [% IF ( MY_TAG.subtitle ) %]
140                                                             [% FOREACH subtitle IN MY_TAG.subtitle %]
141                                                                 [% subtitle.subfield |html %]
142                                                             [% END %]
143                                                         [% END %]
144                                                     </a>
145                                                     [% IF ( MY_TAG.author ) %]
146                                                         by [% MY_TAG.author %]
147                                                     [% END %]
148                                                 [% END # /IF MY_TAG.XSLTBloc %]
149                                             </td>
150                                             <td>
151                                                 <span title="[% MY_TAG.date_created %]">
152                                                     <span class="tdlabel">Date added:</span>
153                                                     [% MY_TAG.date_created | $KohaDates %]
154                                                 </span>
155                                             </td>
156                                             <td><input type="submit" name="del[% MY_TAG.tag_id %]" value="Delete" class="btn btn-danger btn-mini" /></td>
157                                         </tr>
158                                     [% END %]
159                                 </tbody>
160                             </table>
161                         </form>
162                         [% END # /MY_TAGS %]
163                     </div> <!-- / .usertags -->
164                 </div> <!-- / .span10/12 -->
165             </div> <!-- / .row-fluid -->
166         </div> <!-- / .container-fluid -->
167     </div> <!-- / .main -->
168
169 [% INCLUDE 'opac-bottom.inc' %]
170 [% BLOCK jsinclude %]
171 [% INCLUDE 'datatables.inc' %]
172 <script type="text/javascript">
173 //<![CDATA[
174     $(document).ready(function(){
175         $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
176             "aaSorting": [[ 2, "asc" ]],
177             "aoColumnDefs": [
178               { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
179             ],
180             "aoColumns": [
181                 null,
182                 { "sType": "anti-the" },
183                 { "sType": "title-string" },
184                 null
185             ]
186         }));
187     });
188 //]]>
189 </script>
190 [% END %]