reindenting and removing tmpl_if in doc-head-close
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tags / tags.tmpl
index 8681a8a..d2ba19f 100644 (file)
@@ -1,51 +1,52 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Tags
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Tags
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <style type="text/css">
-       fieldset { padding : .3em;margin:.3em 0;}
-       #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
-       .tag a       {text-decoration: none;}
-       .tag a:hover {text-decoration: underline;}
-       .tag         {display: block; padding-left: 1em;}
-       .tagcount    {display: none;}
-       .cloudweight {display: none;}
-       .tagweight {
-               display: none;
-               position: relative;
-               bottom: 0.4em;
-               color: red;
-               font-size: 12px;
-       }
+    fieldset { padding : .3em;margin:.3em 0;}
+    #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
+    .tag a       {text-decoration: none;}
+    .tag a:hover {text-decoration: underline;}
+    .tag         {display: block; padding-left: 1em;}
+    .tagcount    {display: none;}
+    .cloudweight {display: none;}
+    .tagweight {
+        display: none;
+        position: relative;
+        bottom: 0.4em;
+        color: red;
+        font-size: 12px;
+    }
 </style>
 <script type="text/javascript">
 //<![CDATA[
-       var fontsizes = new Array (12,14,16,18,20,22,24,26,28,30);
-       var fontcount = fontsizes.length;
-       var maxcloudweight = 1;
-       $(document).ready(function() {
-               // $('#tagcloud').css('background-color','lightgrey');
-               // $('#tagcloud .tag').css('border','1px solid black');
-               $('#tagcloud .tag').each(function() {
-                       if (maxcloudweight < this.title) { maxcloudweight = this.title; }
-                       // have to run through the set of tags once to get the max: cannot be combined w/ 2nd pass
-               });
-               $('#tagcloud .tag').each(function(i) {
-                       var pos = this.id;
-                       var weight = this.title;        // "cloudweight"
-                       weight = (! weight) ? 1 : (weight > maxcloudweight) ? maxcloudweight : weight ;
-                       var index = Math.round(fontcount * weight/maxcloudweight) - 1;
-                       index  = (! index ) ? 0 : ( index > fontcount     ) ? fontcount      : index  ;
-                       var newsize = fontsizes[index];
-                       // alert(pos+ " (" +i+ ") weight = " +weight+ " of " +maxcloudweight+ ", fontsize[" +index+ " of " +fontcount+ "] = " +newsize);
-                       $('#' + pos).css({"font-size":(newsize + 'px'), display:"inline"});
-               });
-               $("#mytagst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+    var fontsizes = new Array (12,14,16,18,20,22,24,26,28,30);
+    var fontcount = fontsizes.length;
+    var maxcloudweight = 1;
+    $(document).ready(function() {
+        // $('#tagcloud').css('background-color','lightgrey');
+        // $('#tagcloud .tag').css('border','1px solid black');
+        $('#tagcloud .tag').each(function() {
+            if (maxcloudweight < this.title) { maxcloudweight = this.title; }
+            // have to run through the set of tags once to get the max: cannot be combined w/ 2nd pass
+        });
+        $('#tagcloud .tag').each(function(i) {
+            var pos = this.id;
+            var weight = this.title;   // "cloudweight"
+            weight = (! weight) ? 1 : (weight > maxcloudweight) ? maxcloudweight : weight ;
+            var index = Math.round(fontcount * weight/maxcloudweight) - 1;
+            index  = (! index ) ? 0 : ( index > fontcount     ) ? fontcount      : index  ;
+            var newsize = fontsizes[index];
+            // alert(pos+ " (" +i+ ") weight = " +weight+ " of " +maxcloudweight+ ", fontsize[" +index+ " of " +fontcount+ "] = " +newsize);
+            $('#' + pos).css({"font-size":(newsize + 'px'), display:"inline"});
+        });
+        $("#mytagst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
     dateFormat: 'uk',<!-- /TMPL_IF -->
             widgets : ['zebra'],
-                       headers: { 3: { sorter: false }},
+            headers: { 3: { sorter: false }},
             sortList: [[2,0]]
         });
-       });
+    });
 //]]>
 </script>
 </head>
 <!-- TMPL_INCLUDE NAME="masthead.inc" -->
 
 <div id="yui-main">
-  <div class="yui-b"><div class="yui-g">
-       <div class="container">
-       <!-- TMPL_IF NAME="ERRORS" -->
-       <!-- TMPL_LOOP NAME="ERRORS" -->
-               <div class="dialog alert">There was a problem with this operation:
-               <!-- TMPL_IF NAME="tagsdisabled" -->Sorry, tags are not enabled on this system.
-               <!-- TMPL_ELSIF NAME="badparam" -->ERROR: illegal parameter <!-- TMPL_VAR NAME="badparam" -->
-               <!-- TMPL_ELSIF NAME="login"    -->ERROR: You must log in to complete that action.
-               <!-- TMPL_ELSIF NAME="failed_delete" -->ERROR: You cannot delete the tag <!-- TMPL_VAR NAME="failed_delete" -->.
-                                       <br />Note: you can only delete your own tags.
-               <!-- TMPL_ELSIF NAME="scrubbed" -->Note: your tag contained markup code that was removed. 
-                                       <br />The tag was added as &quot;<!-- TMPL_VAR NAME="scrubbed" -->&quot;.
-               <!-- TMPL_ELSIF NAME="scrubbed_all_bad" -->Note: your tag was entirely markup code.  It was NOT added.
-                                       <br />Please try again with plain text.
-               <!-- TMPL_ELSE -->Unrecognized error.
-               <!-- /TMPL_IF -->
-               </div>
-       <!-- /TMPL_LOOP -->
-       <!-- /TMPL_IF -->
-       <h1>All Tags</h1>
-       
-               <form method="get" action="opac-tags.pl">
-               <fieldset>Show up to <input name="limit" style="text-align: right;" maxlength="4" size="4" value="<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->" />
-                       tags from other users.
-                        <!-- TMPL_IF NAME="hidemytags" -->
-                       <input type="hidden" name="hidemytags" value="1" />
-                        <!-- /TMPL_IF -->
-                       <input type="submit" value="OK" />
-                        <!-- TMPL_UNLESS NAME="loggedinusername" -->
-                          <a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.
-                        <!-- TMPL_ELSE -->
-                          <!-- 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>
-                          <!-- 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>
-                          <!-- /TMPL_IF -->
-                        <!-- /TMPL_UNLESS --></fieldset>
-               </form>
-       
-       <!-- TMPL_IF NAME="TAGLOOP" -->
-       <div id="tagcloud">
-       <!-- TMPL_LOOP NAME="TAGLOOP" -->
-       <span class="tag" id="tag<!-- TMPL_VAR NAME="__counter__" -->" title="<!-- TMPL_VAR NAME="cloudweight" -->">
-               <a href="/cgi-bin/koha/opac-search.pl?tag=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->&amp;q=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->">
-               <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
-                       <span class="tagweight"><!-- TMPL_VAR NAME="weight_total" --></span>
-       </span>
-       <!-- /TMPL_LOOP -->
-       </div>
-       <!-- /TMPL_IF -->
-       <!-- TMPL_IF NAME="add_op" -->
-         <!-- TMPL_IF NAME="added_count" -->
-               <div class="dialog message"><!-- TMPL_VAR NAME="added_count" --> <!-- TMPL_IF EXPR="added_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully added.</div>
-         <!-- /TMPL_IF -->
-         <!-- TMPL_IF NAME="deleted_count" -->
-               <div class="dialog message"><!-- TMPL_VAR NAME="deleted_count" --><!-- TMPL_IF EXPR="deleted_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully deleted.</div>
-         <!-- /TMPL_IF -->
-       <!-- /TMPL_IF -->
+<div class="yui-b"><div class="yui-g">
+    <div class="container">
+    <!-- TMPL_IF NAME="ERRORS" -->
+        <!-- TMPL_LOOP NAME="ERRORS" -->
+            <div class="dialog alert">There was a problem with this operation:
+            <!-- TMPL_IF NAME="tagsdisabled" -->Sorry, tags are not enabled on this system.
+            <!-- TMPL_ELSIF NAME="badparam" -->ERROR: illegal parameter <!-- TMPL_VAR NAME="badparam" -->
+            <!-- TMPL_ELSIF NAME="login"    -->ERROR: You must log in to complete that action.
+            <!-- TMPL_ELSIF NAME="failed_delete" -->ERROR: You cannot delete the tag <!-- TMPL_VAR NAME="failed_delete" -->.
+                        <br />Note: you can only delete your own tags.
+            <!-- TMPL_ELSIF NAME="scrubbed" -->Note: your tag contained markup code that was removed. 
+                        <br />The tag was added as &quot;<!-- TMPL_VAR NAME="scrubbed" -->&quot;.
+            <!-- TMPL_ELSIF NAME="scrubbed_all_bad" -->Note: your tag was entirely markup code.  It was NOT added.
+                        <br />Please try again with plain text.
+            <!-- TMPL_ELSE -->Unrecognized error.
+            <!-- /TMPL_IF -->
+            </div>
+        <!-- /TMPL_LOOP -->
+    <!-- /TMPL_IF -->
+    <h1>All Tags</h1>
+    
+        <form method="get" action="opac-tags.pl">
+            <fieldset>Show up to <input name="limit" style="text-align: right;" maxlength="4" size="4" value="<!-- TMPL_VAR NAME="limit" DEFAULT="100" -->" />
+                tags from other users.
+                <!-- TMPL_IF NAME="hidemytags" -->
+                    <input type="hidden" name="hidemytags" value="1" />
+                <!-- /TMPL_IF -->
+                <input type="submit" value="OK" />
+                <!-- TMPL_UNLESS NAME="loggedinusername" -->
+                    <a href="/cgi-bin/koha/opac-user.pl">Log in</a> to see your own saved tags.
+                <!-- TMPL_ELSE -->
+                    <!-- 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>
+                    <!-- 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>
+                    <!-- /TMPL_IF -->
+                <!-- /TMPL_UNLESS -->
+            </fieldset>
+        </form>
+    
+    <!-- TMPL_IF NAME="TAGLOOP" -->
+        <div id="tagcloud">
+        <!-- TMPL_LOOP NAME="TAGLOOP" -->
+            <span class="tag" id="tag<!-- TMPL_VAR NAME="__counter__" -->" title="<!-- TMPL_VAR NAME="cloudweight" -->">
+                <a href="/cgi-bin/koha/opac-search.pl?tag=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->&amp;q=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->">
+                <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
+                    <span class="tagweight"><!-- TMPL_VAR NAME="weight_total" --></span>
+            </span>
+        <!-- /TMPL_LOOP -->
+        </div>
+    <!-- /TMPL_IF -->
+    <!-- TMPL_IF NAME="add_op" -->
+        <!-- TMPL_IF NAME="added_count" -->
+            <div class="dialog message"><!-- TMPL_VAR NAME="added_count" --> <!-- TMPL_IF EXPR="added_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully added.</div>
+        <!-- /TMPL_IF -->
+        <!-- TMPL_IF NAME="deleted_count" -->
+            <div class="dialog message"><!-- TMPL_VAR NAME="deleted_count" --><!-- TMPL_IF EXPR="deleted_count ==1" --> tag<!-- TMPL_ELSE -->tags<!-- /TMPL_IF --> successfully deleted.</div>
+        <!-- /TMPL_IF -->
+    <!-- /TMPL_IF -->
 
-       <!-- TMPL_UNLESS NAME="hidemytags" -->
-       <!-- TMPL_IF NAME="MY_TAGS" -->
-               <form method="post" action="opac-tags.pl">
-               <h2>My Tags</h2>
-               <table id="mytagst">
-               <thead><tr><th>Term</th><th>Title</th><th>Date Added</th><th>Delete</th>
-               </tr></thead>
-       <tbody><!-- TMPL_LOOP NAME="MY_TAGS" -->
-               <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" -->">
-                               <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
-                       </td>
-                       <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
-                               <!-- TMPL_VAR NAME="bib_summary" ESCAPE="HTML" --></a></td>
-                       <td><!-- TMPL_VAR NAME="date_created_display" --></td>
-                       <td><input type="submit" name="del<!-- TMPL_VAR NAME="tag_id" -->" value="Delete" /></td>
-               </tr>
-       <!-- /TMPL_LOOP --></tbody>
-               </table>
-               </form>
-       <!-- /TMPL_IF -->
-       <!-- /TMPL_UNLESS -->
+    <!-- TMPL_UNLESS NAME="hidemytags" -->
+        <!-- TMPL_IF NAME="MY_TAGS" -->
+            <form method="post" action="opac-tags.pl">
+            <h2>My Tags</h2>
+            <table id="mytagst">
+            <thead><tr><th>Term</th><th>Title</th><th>Date Added</th><th>Delete</th>
+            </tr></thead>
+            <tbody>
+                <!-- TMPL_LOOP NAME="MY_TAGS" -->
+                    <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" -->">
+                        <!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a>
+                    </td>
+                    <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+                        <!-- TMPL_VAR NAME="bib_summary" ESCAPE="HTML" --></a></td>
+                    <td><!-- TMPL_VAR NAME="date_created_display" --></td>
+                    <td><input type="submit" name="del<!-- TMPL_VAR NAME="tag_id" -->" value="Delete" /></td>
+                    </tr>
+                <!-- /TMPL_LOOP -->
+            </tbody>
+            </table>
+            </form>
+        <!-- /TMPL_IF -->
+    <!-- /TMPL_UNLESS -->
 
 </div>
 </div>
 </div>
 </div>
 <!-- TMPL_IF EXPR="OpacNav||loggedinusername" -->
-<div class="yui-b"><div class="container">
-<!--TMPL_INCLUDE NAME="navigation.inc" -->
-<!--TMPL_INCLUDE NAME="usermenu.inc" -->
-</div></div>
+    <div class="yui-b"><div class="container">
+    <!--TMPL_INCLUDE NAME="navigation.inc" -->
+    <!--TMPL_INCLUDE NAME="usermenu.inc" -->
+    </div></div>
 <!-- /TMPL_IF -->
 </div>
 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->