comments: Rename COMMENTURL to ADDCOMMENTURL to avoid confusion with COMMENTAUTHORURL
Also refactor page.tmpl to use if/else rather than unless/if.master
parent
8ed94c0a18
commit
9e889c39ed
|
@ -548,9 +548,9 @@ sub pagetemplate (@) {
|
|||
}
|
||||
|
||||
if ($shown && commentsopen($page)) {
|
||||
my $commenturl = IkiWiki::cgiurl(do => 'comment',
|
||||
my $addcommenturl = IkiWiki::cgiurl(do => 'comment',
|
||||
page => $page);
|
||||
$template->param(commenturl => $commenturl);
|
||||
$template->param(addcommenturl => $addcommenturl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,13 +74,12 @@
|
|||
<TMPL_IF COMMENTS>
|
||||
<div id="comments">
|
||||
<TMPL_VAR COMMENTS>
|
||||
<TMPL_UNLESS COMMENTURL>
|
||||
<div class="addcomment">Comments on this page are closed.</div>
|
||||
</TMPL_UNLESS>
|
||||
<TMPL_IF COMMENTURL>
|
||||
<TMPL_IF ADDCOMMENTURL>
|
||||
<div class="addcomment">
|
||||
<a href="<TMPL_VAR COMMENTURL>">Add a comment</a>
|
||||
<a href="<TMPL_VAR ADDCOMMENTURL>">Add a comment</a>
|
||||
</div>
|
||||
<TMPL_ELSE>
|
||||
<div class="addcomment">Comments on this page are closed.</div>
|
||||
</TMPL_IF>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
|
|
Loading…
Reference in New Issue