updated release notes for 3.14.0 beta
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-tags.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Tags
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'datatables.inc' %]
6 <style type="text/css">
7         fieldset { padding : .3em;margin:.3em 0;}
8         #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
9         .tag a       {text-decoration: none;}
10         .tag a:hover {text-decoration: underline;}
11         .tag         {display: block; padding-left: 1em;}
12         .tagcount    {display: none;}
13         .cloudweight {display: none;}
14         .tagweight {
15                 display: none;
16                 position: relative;
17                 bottom: 0.4em;
18                 color: red;
19                 font-size: 12px;
20         }
21 </style>
22 <script type="text/javascript">
23 //<![CDATA[
24     $(document).ready(function(){
25         $("#mytagst").dataTable($.extend(true, {}, dataTablesDefaults, {
26             "aaSorting": [[ 2, "asc" ]],
27             "aoColumnDefs": [
28               { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
29             ],
30             "aoColumns": [
31                 null,
32                 { "sType": "anti-the" },
33                 { "sType": "title-string" },
34                 null
35             ]
36         }));
37     });
38 //]]>
39 </script>
40 </head>
41 [% IF ( loggedinusername ) %]<body id="opac-usertags">[% ELSE %]<body id="opac-tags">[% END %]
42 [% IF ( OpacNav||loggedinusername ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
43 <div id="bd">
44 [% INCLUDE 'masthead.inc' %]
45
46 <div id="yui-main">
47   <div class="yui-b"><div class="yui-g">
48         <div id="usertags" class="container">
49         [% IF ( ERRORS ) %]
50         [% FOREACH ERROR IN ERRORS %]
51                 <div class="dialog alert">There was a problem with this operation:
52                 [% IF ( ERROR.tagsdisabled ) %]Sorry, tags are not enabled on this system.
53                 [% ELSIF ( ERROR.badparam ) %]ERROR: illegal parameter [% ERROR.badparam %]
54                 [% ELSIF ( ERROR.login ) %]ERROR: You must log in to complete that action.
55                 [% ELSIF ( ERROR.failed_delete ) %]ERROR: You cannot delete the tag [% ERROR.failed_delete %].
56                                         <br />Note: you can only delete your own tags.
57                 [% ELSIF ( ERROR.scrubbed ) %]Note: your tag contained markup code that was removed. 
58                                         <br />The tag was added as &quot;[% ERROR.scrubbed %]&quot;.
59                 [% ELSIF ( ERROR.scrubbed_all_bad ) %]Note: your tag was entirely markup code.  It was NOT added.
60                                         <br />Please try again with plain text.
61                 [% ELSE %]Unrecognized error.
62                 [% END %]
63                 </div>
64         [% END %]
65         [% END %]
66         <h1>All Tags</h1>
67         
68                 <form method="get" action="opac-tags.pl">
69                 <fieldset>Show up to <input type="text" name="limit" style="text-align: right;" maxlength="4" size="4" value="[% limit or "100" %]" />
70                         tags[% IF ( opacuserlogin ) %] from other users[% END %].
71                         <input type="submit" value="OK" />
72             [% IF ( opacuserlogin ) %][% UNLESS ( loggedinusername ) %]
73             <a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.
74             [% END %][% END %]</fieldset>
75                 </form>
76         
77         [% IF ( TAGLOOP ) %]
78         <div id="tagcloud">
79         [% FOREACH TAGLOO IN TAGLOOP %]
80             <span class="tag tagweight[% TAGLOO.stratum %]" id="tag[% loop.count %]" style="display:inline;">
81                 <a href="/cgi-bin/koha/opac-search.pl?tag=[% TAGLOO.term |url %]&amp;q=[% TAGLOO.term |url %]">
82                 [% TAGLOO.term |html %]</a>
83                         <span class="tagweight">[% TAGLOO.weight_total %]</span>
84         </span>
85         [% END %]
86         </div>
87         [% END %]
88         [% IF ( add_op ) %]
89           [% IF ( added_count ) %]
90                 <div class="dialog message">[% added_count %] [% IF ( added_count ==1 ) %] tag[% ELSE %]tags[% END %] successfully added.</div>
91           [% END %]
92           [% IF ( deleted_count ) %]
93                 <div class="dialog message">[% deleted_count %][% IF ( deleted_count ==1 ) %] tag[% ELSE %]tags[% END %] successfully deleted.</div>
94           [% END %]
95         [% END %]
96
97         [% IF ( MY_TAGS ) %]
98                 <form method="post" action="opac-tags.pl">
99                 <h2>My Tags</h2>
100                 <table id="mytagst">
101         <thead><tr><th>Term</th><th>Title</th><th>Date added</th><th>Delete</th>
102                 </tr></thead>
103         <tbody>[% FOREACH MY_TAG IN MY_TAGS %]
104         <tr><td class="tagterm"><a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&amp;q=[% MY_TAG.term |url %]">
105                                 [% MY_TAG.term |html %]</a>
106                         </td>
107                         <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber %]">
108                                 [% MY_TAG.bib_summary |html %]</a></td>
109             <td><span title="[% MY_TAG.date_created %]">[% MY_TAG.date_created | $KohaDates %]</span></td>
110                         <td><input type="submit" name="del[% MY_TAG.tag_id %]" value="Delete" /></td>
111                 </tr>
112         [% END %]</tbody>
113                 </table>
114                 </form>
115         [% END %]
116
117 </div>
118 </div>
119 </div>
120 </div>
121 [% IF ( OpacNav||loggedinusername ) %]
122 <div class="yui-b"><div id="leftmenus" class="container">
123 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
124 </div></div>
125 [% END %]
126 </div>
127 [% INCLUDE 'opac-bottom.inc' %]
128