Author: snoopdave
Date: Sun Feb  8 14:49:34 2015
New Revision: 1658181

URL: http://svn.apache.org/r1658181
Log:
Comment preview fix in Gaurav theme from Kohei Nozaki (ROL-2059)

Modified:
    roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm

Modified: roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm
URL: 
http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm?rev=1658181&r1=1658180&r2=1658181&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/gaurav/entry.vm Sun Feb  8 14:49:34 
2015
@@ -39,19 +39,19 @@
                                <div class="panel panel-primary">
                                        <div class="panel-heading">
                                        <a name="comments"></a>
-                                       #if($entry.commentCount > 0)            
                
-                                               #if($model.commentForm.preview)
+                                       #if($model.commentForm.preview)
                                                #set($comments = 
[$model.commentForm.previewComment])
                                                <div 
class="comments-head">$text.get( "macro.weblog.preview" ):</div>
+                                       #else
+                                               #if($entry.commentCount > 0)
+                                                       #set($comments = 
$entry.getComments(true, true))
+                                                       <div 
class="comments-head">$text.get( "macro.weblog.comments" ):</div>
                                                #else
-                                               <div 
class="comments-head">$text.get( "macro.weblog.comments" ):</div>
-                                               #set($comments = 
$entry.getComments(true, true))
+                                                       <div 
class="comments-head">No one has commented yet.</div>
                                                #end
-                                       #else
-                                               <div class="comments-head">No 
one has commented yet.</div>
                                        #end
                                        </div>
-                                       #if($entry.commentCount > 0)
+                                       #if($entry.commentCount > 0 || 
$model.commentForm.preview)
                                                                <div 
class="panel-body">
                                                #foreach( $comment in $comments 
)
                                                        #if($comment.approved 
|| $model.commentForm.preview)
@@ -81,9 +81,6 @@
                                        #end
                                </div>
 
-                               
#if($utils.isNotEmpty($model.commentForm.preview))                              
-                                       #showWeblogEntryComments($entry)
-                                       #end
                                        #set($cform = $model.getCommentForm())
                                        #if( $entry.commentsStillAllowed )
                                        <div class="panel panel-default">


Reply via email to