[Koha-patches] [PATCH] Tagging - add basic template slot in search for tags and script responsiveness to tagging sysprefs

Joe Atzberger joe.atzberger at liblime.com
Tue Apr 8 16:01:59 CEST 2008


---
 .../opac-tmpl/prog/en/modules/opac-results.tmpl    |   13 +++++++++++++
 opac/opac-search.pl                                |    4 ++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
index 77be803..280a73d 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl
@@ -242,6 +242,19 @@ $(document).ready(function(){
 <!-- /TMPL_IF --></p> 
 				</td>
                 <!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="TaggingOnList" -->
+				<td><div class="tagcell">
+					<!-- TMPL_IF NAME="TagLoop" -->
+						<span class="tagtitle">Tags:</span>
+						<ul><!-- TMPL_LOOP NAME="TagLoop" --><li><!-- TMPL_VAR NAME="tag" --></li>
+							<!-- /TMPL_LOOP -->
+						</ul>
+					<!-- TMPL_ELSE -->
+					<!-- /TMPL_IF -->
+						<a href="#">Add new tag</a>
+					</div>
+				</td>
+				<!-- /TMPL_IF -->
                 </tr>
                 <!-- /TMPL_LOOP -->
             </table>
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 3c6275a..40dcb47 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -50,6 +50,10 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
     $template->param('UNIMARC' => 1);
 }
 
+foreach (qw(TaggingOnList TaggingOnDetail)) {
+	C4::Context->preference($_) and $template->param($_ => 1);
+}
+
 ## URI Re-Writing
 # Deprecated, but preserved because it's interesting :-)
 # The same thing can be accomplished with mod_rewrite in
-- 
1.5.2.1




More information about the Koha-patches mailing list