Commit fed54c176e26f03bca0742ebca686d6345fb9a61

Authored by Daniela Feitosa
1 parent f9ab314e

Using variable instead of new call to db

(ActionItem2911)
Showing 1 changed file with 1 additions and 3 deletions   Show diff stats
app/views/content_viewer/view_page.rhtml
... ... @@ -80,11 +80,9 @@
80 80 </h3>
81 81 <% end %>
82 82  
83   - <% if @page.accept_comments? && @comments.count > 1 %>
  83 + <% if @page.accept_comments? && @comments_count > 1 %>
84 84 <%= link_to(_('Post a comment'), '#', :class => 'display-comment-form', :id => 'top-post-comment-button', :onclick => "jQuery('#page-comment-form .display-comment-form').first().click();") %>
85   - <% end %>
86 85  
87   - <% if @page.accept_comments? and @comments.count > 1 %>
88 86 <%= hidden_field_tag("page_url", url_for(:controller=>'content_viewer', :action=>'view_page', :profile=>profile.identifier)) %>
89 87 <%= javascript_include_tag "comment_order.js" %>
90 88 <div class="comment-order">
... ...