MT 1110 : Balance cart and lists : cart is now in the intranet
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / tags.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Tags
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
4 <style type="text/css">
5         fieldset { padding : .3em;margin:.3em 0;}
6         #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
7         .tag a       {text-decoration: none;}
8         .tag a:hover {text-decoration: underline;}
9         .tag         {display: block; padding-left: 1em;}
10         .tagcount    {display: none;}
11         .cloudweight {display: none;}
12         .tagweight {
13                 display: none;
14                 position: relative;
15                 bottom: 0.4em;
16                 color: red;
17                 font-size: 12px;
18         }
19 </style>
20 <script type="text/javascript">
21 //<![CDATA[
22         var fontsizes = new Array (12,14,16,18,20,22,24,26,28,30);
23         var fontcount = fontsizes.length;
24         var maxcloudweight = 1;
25         $(document).ready(function() {
26                 // $('#tagcloud').css('background-color','lightgrey');
27                 // $('#tagcloud .tag').css('border','1px solid black');
28                 $('#tagcloud .tag').each(function() {
29                         if (maxcloudweight < this.title) { maxcloudweight = this.title; }
30                         // have to run through the set of tags once to get the max: cannot be combined w/ 2nd pass
31                 });
32                 $('#tagcloud .tag').each(function(i) {
33                         var pos = this.id;
34                         var weight = this.title;        // "cloudweight"
35                         weight = (! weight) ? 1 : (weight > maxcloudweight) ? maxcloudweight : weight ;
36                         var index = Math.round(fontcount * weight/maxcloudweight) - 1;
37                         index  = (! index ) ? 0 : ( index > fontcount     ) ? fontcount      : index  ;
38                         var newsize = fontsizes[index];
39                         // alert(pos+ " (" +i+ ") weight = " +weight+ " of " +maxcloudweight+ ", fontsize[" +index+ " of " +fontcount+ "] = " +newsize);
40                         $('#' + pos).css({"font-size":(newsize + 'px'), display:"inline"});
41                 });
42                 $("#mytagst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
43     dateFormat: 'uk',<!-- /TMPL_IF -->
44             widgets : ['zebra'],
45                         headers: { 3: { sorter: false }},
46             sortList: [[2,0]]
47         });
48         });
49 //]]>
50 </script>
51 </head>
52 <!-- TMPL_IF NAME="loggedinusername" --><body id="opac-usertags"><!-- TMPL_ELSE --><body id="opac-tags"><!-- /TMPL_IF -->
53 <!-- TMPL_IF EXPR="OpacNav||loggedinusername" --><div id="doc3" class="yui-t1"><!-- TMPL_ELSE --><div id="doc3" class="yui-t7"><!-- /TMPL_IF -->
54 <div id="bd">
55 <!-- TMPL_INCLUDE NAME="masthead.inc" -->
56
57 <div id="yui-main">
58   <div class="yui-b"><div class="yui-g">
59         <div class="container">
60         <!-- TMPL_IF NAME="ERRORS" -->
61         <!-- TMPL_LOOP NAME="ERRORS" -->
62                 <div class="dialog alert">There was a problem with this operation:
63                 <!-- TMPL_IF NAME="tagsdisabled" -->Sorry, tags are not enabled on this system.
64                 <!-- TMPL_ELSIF NAME="badparam" -->ERROR: illegal parameter <!-- TMPL_VAR NAME="badparam" -->
65                 <!-- TMPL_ELSIF NAME="login"    -->ERROR: You must log in to complete that action.
66                 <!-- TMPL_ELSIF NAME="failed_delete" -->ERROR: You cannot delete the tag <!-- TMPL_VAR NAME="failed_delete" -->.
67                                         <br />Note: you can only delete your own tags.
68                 <!-- TMPL_ELSIF NAME="scrubbed" -->Note: your tag contained markup code that was removed. 
69                                         <br />The tag was added as &quot;<!-- TMPL_VAR NAME="scrubbed" -->&quot;.
70                 <!-- TMPL_ELSIF NAME="scrubbed_all_bad" -->Note: your tag was entirely markup code.  It was NOT added.
71                                         <br />Please try again with plain text.
72                 <!-- TMPL_ELSE -->Unrecognized error.
73                 <!-- /TMPL_IF -->
74                 </div>
75         <!-- /TMPL_LOOP -->
76         <!-- /TMPL_IF -->
77         <h1>All Tags</h1>
78         
79                 <form method="get" action="opac-tags.pl">
80                 <fieldset>Show up to <input name="limit" style="text-align: right;" maxlength="4" size="4" value="<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->" />
81                         tags from other users.
82                         <!-- TMPL_IF NAME="hidemytags" -->
83                         <input type="hidden" name="hidemytags" value="1" />
84                         <!-- /TMPL_IF -->
85                         <input type="submit" value="OK" />
86                         <!-- TMPL_UNLESS NAME="loggedinusername" -->
87                           <a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.
88                         <!-- TMPL_ELSE -->
89                           <!-- TMPL_IF NAME="hidemytags" --><a class="hidemytags" href="/cgi-bin/koha/opac-tags.pl?limit=<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->">Show my tags</a>
90                           <!-- TMPL_ELSE --><a class="hidemytags" href="/cgi-bin/koha/opac-tags.pl?limit=<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->&amp;hidemytags=1">Hide my tags</a>
91                           <!-- /TMPL_IF -->
92                         <!-- /TMPL_UNLESS --></fieldset>
93                 </form>
94         
95         <!-- TMPL_IF NAME="TAGLOOP" -->
96         <div id="tagcloud">
97         <!-- TMPL_LOOP NAME="TAGLOOP" -->
98         <span class="tag" id="tag<!-- TMPL_VAR NAME="__counter__" -->" title="<!-- TMPL_VAR NAME="cloudweight" -->">
99                 <a href="/cgi-bin/koha/opac-search.pl?tag=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->&amp;q=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->">
100                 <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
101                         <span class="tagweight"><!-- TMPL_VAR NAME="weight_total" --></span>
102         </span>
103         <!-- /TMPL_LOOP -->
104         </div>
105         <!-- /TMPL_IF -->
106         <!-- TMPL_IF NAME="add_op" -->
107           <!-- TMPL_IF NAME="added_count" -->
108                 <div class="dialog message"><!-- TMPL_VAR NAME="added_count" --> <!-- TMPL_IF EXPR="added_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully added.</div>
109           <!-- /TMPL_IF -->
110           <!-- TMPL_IF NAME="deleted_count" -->
111                 <div class="dialog message"><!-- TMPL_VAR NAME="deleted_count" --><!-- TMPL_IF EXPR="deleted_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully deleted.</div>
112           <!-- /TMPL_IF -->
113         <!-- /TMPL_IF -->
114
115         <!-- TMPL_UNLESS NAME="hidemytags" -->
116         <!-- TMPL_IF NAME="MY_TAGS" -->
117                 <form method="post" action="opac-tags.pl">
118                 <h2>My Tags</h2>
119                 <table id="mytagst">
120                 <thead><tr><th>Term</th><th>Title</th><th>Date Added</th><th>Delete</th>
121                 </tr></thead>
122         <tbody><!-- TMPL_LOOP NAME="MY_TAGS" -->
123                 <tr><td><a href="/cgi-bin/koha/opac-search.pl?tag=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->&amp;q=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->">
124                                 <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
125                         </td>
126                         <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
127                                 <!-- TMPL_VAR NAME="bib_summary" ESCAPE="HTML" --></a></td>
128                         <td><!-- TMPL_VAR NAME="date_created_display" --></td>
129                         <td><input type="submit" name="del<!-- TMPL_VAR NAME="tag_id" -->" value="Delete" /></td>
130                 </tr>
131         <!-- /TMPL_LOOP --></tbody>
132                 </table>
133                 </form>
134         <!-- /TMPL_IF -->
135         <!-- /TMPL_UNLESS -->
136
137 </div>
138 </div>
139 </div>
140 </div>
141 <!-- TMPL_IF EXPR="OpacNav||loggedinusername" -->
142 <div class="yui-b"><div class="container">
143 <!--TMPL_INCLUDE NAME="navigation.inc" -->
144 <!--TMPL_INCLUDE NAME="usermenu.inc" -->
145 </div></div>
146 <!-- /TMPL_IF -->
147 </div>
148 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
149