Commit 37699d6fec3bcc84da9fd8231c63935c8479a21d

Authored by Daniela Feitosa
Committed by Joenio Costa
1 parent a45ffb4b

Duplicating article-actions to avoid empty div

(ActionItem1911)
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
app/views/content_viewer/view_page.rhtml
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 8
9 9
10 <div<%= " class='logged-in'" if user %>> 10 <div<%= " class='logged-in'" if user %>>
11 - <div id="article-actions">  
12 <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %> 11 <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %>
  12 + <div id="article-actions">
13 <% if @page.allow_post_content?(user) %> 13 <% if @page.allow_post_content?(user) %>
14 <%= link_to content_tag( 'span', label_for_edit_article(@page) ), 14 <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
15 profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }), 15 profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
@@ -49,10 +49,12 @@ @@ -49,10 +49,12 @@
49 <% if profile.kind_of?(Enterprise) && @page.gallery? %> 49 <% if profile.kind_of?(Enterprise) && @page.gallery? %>
50 <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %> 50 <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
51 <% end %> 51 <% end %>
  52 + </div>
52 <% elsif profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) %> 53 <% elsif profile.community? && (@page.blog? || @page.parent && @page.parent.blog?) %>
  54 + <div id="article-actions">
53 <%= link_to content_tag( 'span', _('Suggest an article') ), profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}), :id => 'suggest-article-link', :class => 'button with-text icon-new' %> 55 <%= link_to content_tag( 'span', _('Suggest an article') ), profile.admin_url.merge({ :controller => 'cms', :action => 'suggest_an_article'}), :id => 'suggest-article-link', :class => 'button with-text icon-new' %>
  56 + </div>
54 <% end %> 57 <% end %>
55 - </div>  
56 <div id="article-header"> 58 <div id="article-header">
57 <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %> 59 <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.has_posts? && @page.feed %>
58 <%= article_title(@page, :no_link => true) %> 60 <%= article_title(@page, :no_link => true) %>