clean up comment preview
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 25 Jan 2009 23:56:47 +0000 (18:56 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 25 Jan 2009 23:56:47 +0000 (18:56 -0500)
Remove actions from it, and avoid a broken title link.

IkiWiki/Plugin/comments.pm
templates/comment.tmpl

index 388a983f70910f97ea3fc6084b8404036d16ce5a..ad5395a8248d6600e67015030d7afb741f5ead16 100644 (file)
@@ -673,6 +673,8 @@ sub previewcomment ($$$) {
                        template => $template);
        });
 
+       $template->param(have_actions => 0);
+
        return $template->output;
 }
 
index 582efccb8d25f667b4dd334068565935d779d516..b4f235845d08405294ea4b2c94e5f09bdf9576cf 100644 (file)
@@ -1,6 +1,12 @@
 <div class="comment" id="<TMPL_VAR NAME=INLINEPAGE>">
 
-<div class="comment-subject"><a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a></div>
+<div class="comment-subject">
+<TMPL_IF PERMALINK">
+<a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a>
+<TMPL_ELSE>
+<TMPL_VAR TITLE>
+</TMPL_IF>
+</div>
 
 <div class="inlinecontent">
 <TMPL_VAR CONTENT>