Bug Fixing :
authorhdl <hdl>
Thu, 28 Jun 2007 12:34:12 +0000 (12:34 +0000)
committerhdl <hdl>
Thu, 28 Jun 2007 12:34:12 +0000 (12:34 +0000)
Authorities display hierarchies is now OK (provided hierarchy.css is in includes)
link with biblios OK.

koha-tmpl/opac-tmpl/prog/en/opac-authoritiesdetail.tmpl

index 3e17634..ba2768f 100644 (file)
@@ -1,12 +1,63 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> Catalog -- Advanced Search
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_IF Name="displayhierarchy"-->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/hierarchy.css">
+<!--/TMPL_IF-->
 <body<!-- TMPL_IF NAME="OpacNav" --> id="withnav"<!-- /TMPL_IF -->>
 <!--TMPL_INCLUDE NAME="masthead.inc" -->
 
 <div id="main">
+<!-- TMPL_IF Name="displayhierarchy"-->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/hierarchy.css">
+<script language="JavaScript" type="text/javascript">
+function showParents(mynumber) {
+  var parents=document.getElementsByName(mynumber+'p')
+  for(i=0;i<parents.length;i++){
+    if (parents[i].style.display == "none") {
+      parents[i].style.display ="block";
+    } else {
+      parents[i].style.display ="none";
+    }
+  } 
+}
+function showChildren(mynumber) {
+  var children=document.getElementsByName(mynumber+'c')
+  for(i=0;i<children.length;i++){
+    if (children[i].style.display == "none") {
+      children[i].style.display = "block";
+    } else {
+      children[i].style.display = "none";
+    }
+  }
+}
+</script>
+
+<div class="hierarchies">
+<!--TMPL_LOOP Name="loophierarchies" -->
+  <div class="hierarchy">
+  <!--TMPL_LOOP Name="loopelement" -->
+    <div id="<!--TMPL_VAR Name="loopauthid" -->" class="<!--TMPL_VAR Name="class" -->">
+    <!-- TMPL_IF name="current_value" -->
+        <!--TMPL_VAR Name="value" -->
+    <!-- TMPL_ELSE -->
+        <a href="opac-authoritiesdetail.pl?authid=<!--TMPL_VAR Name="loopauthid" -->" title="Term"><!--TMPL_VAR Name="value" --></a>
+    <!-- /TMPL_IF -->
+    <!--TMPL_IF Name="ifchildren" -->
+      <sub><a class="parents" title="Narrower terms" href="JavaScript:showChildren('<!--TMPL_VAR Name="loopauthid" -->');">+</a></sub><br/>
+      <!--TMPL_LOOP Name="loopchildren" -->
+        <div name="<!--TMPL_VAR Name="loopauthid" -->c" class="child"> <a href="opac-authoritiesdetail.pl?authid=<!--TMPL_VAR Name="childauthid" -->"><!--TMPL_VAR Name="childvalue" --></a></div>
+      <!--/TMPL_LOOP-->
+    <!-- /TMPL_IF -->
+    </div>
+  <!--/TMPL_LOOP-->
+    
+  </div>
+<!--/TMPL_LOOP-->
+</div>
+<!-- /TMPL_IF -->
 <div class="tabbed">
        <h1>Authority #<!-- TMPL_VAR NAME="authid" --> (<!-- TMPL_VAR name="authtypetext" -->)</h1>
-       <a href="opac-search.pl?type=opac&amp;op=do_search&amp;marclist=<!-- TMPL_VAR NAME="biblio_fields" -->&amp;operator==&amp;value=<!-- TMPL_VAR NAME="authid" -->&amp;and_or=and&amp;excluding="><!-- TMPL_VAR name="count" --> biblios</a>
+       <a href="opac-search.pl?type=opac&amp;q=<!-- TMPL_VAR NAME="authid" -->&amp;idx=an"><!-- TMPL_VAR name="count" --> biblios</a>
 </div>
 <table border="0"><!-- TMPL_LOOP name="0XX" -->
         <tr noborder ><td colspan="3" class="marctag"><b><!-- TMPL_VAR name="tag" --></b></td></tr>