summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-26 15:18:12 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-26 15:18:12 +0000
commit526044e1da808a3ab291e21be5401e7d84ebecc0 (patch)
tree9674a8d78f6f392b76dd14484971669b9389baef /IkiWiki
parent2e95062df8326a46d91112214a0a80886692b1a4 (diff)
better fix for empty actions list issue
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 51e7a194f..f33d6e66e 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -160,22 +160,30 @@ sub genpage ($$$) { #{{{
my $template=HTML::Template->new(blind_cache => 1,
filename => "$config{templatedir}/page.tmpl");
-
+ my $actions=0;
+
if (length $config{cgiurl}) {
$template->param(editurl => cgiurl(do => "edit", page => $page));
$template->param(prefsurl => cgiurl(do => "prefs"));
if ($config{rcs}) {
$template->param(recentchangesurl => cgiurl(do => "recentchanges"));
}
+ $actions++;
}
if (length $config{historyurl}) {
my $u=$config{historyurl};
$u=~s/\[\[file\]\]/$pagesources{$page}/g;
$template->param(historyurl => $u);
+ $actions++;
}
if ($config{discussion}) {
$template->param(discussionlink => htmllink($page, "Discussion", 1, 1));
+ $actions++;
+ }
+
+ if ($actions) {
+ $template->param(have_actions => 1);
}
if (exists $hooks{pagetemplate}) {