better fix for empty actions list issue
parent
2e95062df8
commit
526044e1da
|
@ -160,6 +160,7 @@ 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));
|
||||
|
@ -167,15 +168,22 @@ sub genpage ($$$) { #{{{
|
|||
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}) {
|
||||
|
|
|
@ -20,31 +20,27 @@
|
|||
</TMPL_IF>
|
||||
</div>
|
||||
|
||||
<TMPL_IF NAME="HAVE_ACTIONS">
|
||||
<div id="actions">
|
||||
<ul>
|
||||
<TMPL_IF NAME="EDITURL">
|
||||
<li><a href="<TMPL_VAR EDITURL>">Edit</a></li>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="RECENTCHANGESURL">
|
||||
<li><a href="<TMPL_VAR RECENTCHANGESURL>">RecentChanges</a></li>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="HISTORYURL">
|
||||
<li><a href="<TMPL_VAR HISTORYURL>">History</a></li>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="PREFSURL">
|
||||
<li><a href="<TMPL_VAR PREFSURL>">Preferences</a></li>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="DISCUSSIONLINK">
|
||||
<li><TMPL_VAR DISCUSSIONLINK><br /></li>
|
||||
</TMPL_IF>
|
||||
|
||||
<li></li>
|
||||
</ul>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
|
||||
<div id="content">
|
||||
<TMPL_VAR CONTENT>
|
||||
|
|
Loading…
Reference in New Issue