Hope encrico doesn't mind, but I changed the location and layout of the
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 28 Jul 2006 00:21:13 +0000 (00:21 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 28 Jul 2006 00:21:13 +0000 (00:21 +0000)
tags on the templates. This way seems to fit better with the links. Also
some css cleanup, avoid hardcoded <i> etc.

IkiWiki/Plugin/tag.pm
Makefile.PL
basewiki/style.css
debian/changelog
doc/plugins/tag.mdwn
templates/inlinepage.tmpl
templates/inlinepagetitle.tmpl
templates/page.tmpl

index 957fd986d69a83496eddced3be5e495f85760477..c4e12e61dd01f4dc31d4777d00d78a63300f503b 100644 (file)
@@ -40,10 +40,10 @@ sub pagetemplate (@) { #{{{
        my $destpage=$params{destpage};
        my $template=$params{template};
 
-       $template->param(tags => join(', ', 
-                       map { IkiWiki::htmllink($page, $destpage, $_) } 
-                               @{$tags{$page}}))
-               if exists $tags{$page} && $template->query(name => "tags");
+       $template->param(tags => [
+               map { link => IkiWiki::htmllink($page, $destpage, $_) }, 
+                       @{$tags{$page}}
+       ]) if exists $tags{$page} && @{$tags{$page}} && $template->query(name => "tags");
 } # }}}
 
 1
index 59c5d86ba4a4c23de6e943af84863d0c397a8fe2..05547ff0537d06daa39a2abfc7796db1cf17bd63 100755 (executable)
@@ -16,7 +16,8 @@ extra_build:
                --wikiname="ikiwiki" --verbose --no-rcs \
                --exclude=/discussion --no-discussion \
                --plugin=brokenlinks --plugin=pagecount \
-               --plugin=orphans --plugin=haiku --plugin=meta
+               --plugin=orphans --plugin=haiku --plugin=meta \
+               --plugin=tag
        ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man
        ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man
                
index 74186ab3b290444697272637f46d86a8a0eeccb0..f96e11ab0b6830bccda86b9640ef405426815f2e 100644 (file)
@@ -74,7 +74,7 @@ td.changelog {
        margin: 1em 0;
 }
 
-#pageinfo {
+.pageinfo {
        font-style: italic;
 }
 
index 282fdf249bfadbb0fa0041b5f807e7cfc00cd59d..0e7a07669dfdb25afb02a227abaae7190a889b38 100644 (file)
@@ -8,10 +8,10 @@ ikiwiki (1.11) UNRELEASED; urgency=low
       value.
     - Fixes preprocessor directive parameter parsing so that
       foo=bar baz now means "foo=bar" and a "baz" with no value.
-  * Run pagetemplate hooks when inlining pages so that inlines pages also
+  * Run pagetemplate hooks when inlining pages so that inlined pages also
     list their tags.
   * Make all plugins with pagetemplate hooks check that variables exist
-    on the template before setting them.
+    on the template before setting them, for robustness.
   * Switch pagetemplate hooks to using named parameters.
   * Pass a "destpage" parameter to preprocessor and pagetemplate hooks.
     This will be the page that a source page will be part of, which is
index 95a346622fcf34210d1b0da83e9ba3db3f80af00..4d45c6bfd4d490a308caca5aa71eca70f0f59a46 100644 (file)
@@ -6,4 +6,8 @@ The tags work the same as if you had put a (hidden) [[WikiLink]] on the page
 for each tag, so you can use a [[GlobList]] to link to all pages that are
 tagged with a given tag, for example.
 
-This plugin is included in ikiwiki, but is not enabled by default.
+This plugin is included in ikiwiki, but is not enabled by default. If it is
+enabled, you'll see a note below that this page is tagged with the "tags"
+tag.
+
+[[tag tags]]
index b470c55859d96cfe92c7ff5ae7878f8404752baa..0f0c47767b7a6eaa917373614b127c2f9a303886 100644 (file)
@@ -3,10 +3,16 @@
 
 <TMPL_VAR CONTENT>
 
-<p>
-<i>
+<span class="pageinfo">
 Posted <TMPL_VAR CTIME>
-<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
-</i>
-</p>
+</span>
+
+<span class="tags">
+<TMPL_IF NAME="TAGS">
+Tags:
+<TMPL_LOOP NAME="TAGS">
+<TMPL_VAR NAME=LINK>
+</TMPL_LOOP>
+</TMPL_IF>
+</span>
 </div>
index 8527b197d1b816c0923dad710c29c0742b2b396f..10469f81c089387a3b4fd083554fab81253939d9 100644 (file)
@@ -2,6 +2,5 @@
 <TMPL_VAR PAGELINK><br />
 <i>
 Posted <TMPL_VAR CTIME>
-<!-- <TMPL_IF NAME="TAGS"><TMPL_VAR TAGS></TMPL_IF> -->
 </i>
 </p>
index 8439ef8e48f8814fef198d86244469760a7aefa5..5bdde1fbc1b951b47f35d1a1b85a7c98142de99a 100644 (file)
 <TMPL_VAR CONTENT>
 </div>
 
+<div class="tags">
+<TMPL_IF NAME="TAGS">
+Tags:
+<TMPL_LOOP NAME="TAGS">
+<TMPL_VAR NAME=LINK>
+</TMPL_LOOP>
+</TMPL_IF>
+</div>
+
 <div id="backlinks">
 <TMPL_IF NAME="BACKLINKS">
 Links:
@@ -59,10 +68,9 @@ Links:
 </div>
 
 <div id="footer">
-<span id="pageinfo">
+<span class="pageinfo">
 <!-- from <TMPL_VAR NAME=WIKINAME> -->
 Last edited <TMPL_VAR NAME=MTIME>
-<TMPL_IF NAME="TAGS">Tags: <TMPL_VAR TAGS></TMPL_IF>
 </span>
 </div>