From ee3d786bc6f042aad9be6ec86b517b35fea6dffb Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 1 Sep 2010 13:08:29 -0300 Subject: [PATCH] Adding article-actions as an indenpendent div --- app/views/content_viewer/view_page.rhtml | 52 +++++++++++++++++++++++++++------------------------- public/designs/themes/base/style.css | 12 ------------ public/stylesheets/application.css | 10 ++++++---- 3 files changed, 33 insertions(+), 41 deletions(-) diff --git a/app/views/content_viewer/view_page.rhtml b/app/views/content_viewer/view_page.rhtml index d432005..4706b5f 100644 --- a/app/views/content_viewer/view_page.rhtml +++ b/app/views/content_viewer/view_page.rhtml @@ -8,33 +8,31 @@ > - <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %> - <%= article_title(@page, :no_link => true) %> -
- <% if @page.allow_post_content?(user) %> - <%= link_to content_tag( 'span', label_for_edit_article(@page) ), - profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }), - :class => 'button with-text icon-edit' %> - <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> - <% if @page != profile.home_page && !@page.blog? %> - <%= link_to content_tag( 'span', _('Delete') ), - profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }), - :class => 'button with-text icon-delete' %> - <% end %> - <% if !environment.enabled?('disable_cms') && !@page.folder? %> - <% if profile.kind_of?(Person) %> - <%= link_to content_tag( 'span', _('Spread this') ), - profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }), - :class => 'button with-text icon-spread' %> - <% elsif profile.kind_of?(Community) && environment.portal_community %> - <%= link_to content_tag( 'span', _('Spread this') ), - profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }), - :class => 'button with-text icon-spread' %> + <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %> +
+ <% if @page.allow_post_content?(user) %> + <%= link_to content_tag( 'span', label_for_edit_article(@page) ), + profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }), + :class => 'button with-text icon-edit' %> + <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> + <% if @page != profile.home_page && !@page.blog? %> + <%= link_to content_tag( 'span', _('Delete') ), + profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }), + :class => 'button with-text icon-delete' %> + <% end %> + <% if !environment.enabled?('disable_cms') && !@page.folder? %> + <% if profile.kind_of?(Person) %> + <%= link_to content_tag( 'span', _('Spread this') ), + profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }), + :class => 'button with-text icon-spread' %> + <% elsif profile.kind_of?(Community) && environment.portal_community %> + <%= link_to content_tag( 'span', _('Spread this') ), + profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }), + :class => 'button with-text icon-spread' %> + <% end %> <% end %> <% end %> <% end %> - <% end %> - <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %> <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> <% if !@page.display_as_gallery? %> <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %> @@ -46,7 +44,11 @@ <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %> <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %> <% end %> - <% end %> +
+ <% end %> +
+ <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %> + <%= article_title(@page, :no_link => true) %>
diff --git a/public/designs/themes/base/style.css b/public/designs/themes/base/style.css index 3cc0bbd..3af72cc 100644 --- a/public/designs/themes/base/style.css +++ b/public/designs/themes/base/style.css @@ -966,24 +966,12 @@ hr.pre-posts, hr.sep-posts { display: none; } -.blog-feed-link { - float: right; - margin-left: 5px; - position: absolute; - right: 0px; - top: -2px; -} - .blog-post { background: url(imgs/blog-sep.png) repeat-x; padding: 15px 20px 5px 20px; margin: 0px -19px; } -#article .logged-in h1 { - margin-top: 25px; -} - #article-actions a.button, #article-actions a.button:hover { border: none; diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 028f508..8692ce6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -972,10 +972,8 @@ code input { } #article-actions { - position: absolute; - top: 1px; - right: 20px; - padding-right: 15px; + margin-bottom: 5px; + width: 100%; } #article-tags { @@ -1164,6 +1162,10 @@ a.comment-picture { text-decoration: none; } +.blog-feed-link { + float: right; +} + #content .title { margin-bottom: 2px; } -- libgit2 0.21.2