Commit ee3d786bc6f042aad9be6ec86b517b35fea6dffb
Committed by
Antonio Terceiro
1 parent
ab3dc495
Exists in
master
and in
29 other branches
Adding article-actions as an indenpendent div
* Also cleaning the css that involves, the article title and the blog-feed-link.
Showing
3 changed files
with
33 additions
and
41 deletions
Show diff stats
app/views/content_viewer/view_page.rhtml
... | ... | @@ -8,33 +8,31 @@ |
8 | 8 | |
9 | 9 | |
10 | 10 | <div<%= " class='logged-in'" if user %>> |
11 | - <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %> | |
12 | - <%= article_title(@page, :no_link => true) %> | |
13 | - <div id="article-actions"> | |
14 | - <% if @page.allow_post_content?(user) %> | |
15 | - <%= link_to content_tag( 'span', label_for_edit_article(@page) ), | |
16 | - profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }), | |
17 | - :class => 'button with-text icon-edit' %> | |
18 | - <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> | |
19 | - <% if @page != profile.home_page && !@page.blog? %> | |
20 | - <%= link_to content_tag( 'span', _('Delete') ), | |
21 | - profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }), | |
22 | - :class => 'button with-text icon-delete' %> | |
23 | - <% end %> | |
24 | - <% if !environment.enabled?('disable_cms') && !@page.folder? %> | |
25 | - <% if profile.kind_of?(Person) %> | |
26 | - <%= link_to content_tag( 'span', _('Spread this') ), | |
27 | - profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }), | |
28 | - :class => 'button with-text icon-spread' %> | |
29 | - <% elsif profile.kind_of?(Community) && environment.portal_community %> | |
30 | - <%= link_to content_tag( 'span', _('Spread this') ), | |
31 | - profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }), | |
32 | - :class => 'button with-text icon-spread' %> | |
11 | + <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %> | |
12 | + <div id="article-actions"> | |
13 | + <% if @page.allow_post_content?(user) %> | |
14 | + <%= link_to content_tag( 'span', label_for_edit_article(@page) ), | |
15 | + profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }), | |
16 | + :class => 'button with-text icon-edit' %> | |
17 | + <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> | |
18 | + <% if @page != profile.home_page && !@page.blog? %> | |
19 | + <%= link_to content_tag( 'span', _('Delete') ), | |
20 | + profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }), | |
21 | + :class => 'button with-text icon-delete' %> | |
22 | + <% end %> | |
23 | + <% if !environment.enabled?('disable_cms') && !@page.folder? %> | |
24 | + <% if profile.kind_of?(Person) %> | |
25 | + <%= link_to content_tag( 'span', _('Spread this') ), | |
26 | + profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }), | |
27 | + :class => 'button with-text icon-spread' %> | |
28 | + <% elsif profile.kind_of?(Community) && environment.portal_community %> | |
29 | + <%= link_to content_tag( 'span', _('Spread this') ), | |
30 | + profile.admin_url.merge({ :controller => 'cms', :action => 'publish_on_portal_community', :id => @page }), | |
31 | + :class => 'button with-text icon-spread' %> | |
32 | + <% end %> | |
33 | 33 | <% end %> |
34 | 34 | <% end %> |
35 | 35 | <% end %> |
36 | - <% end %> | |
37 | - <% if @page.allow_post_content?(user) || @page.allow_publish_content?(user) %> | |
38 | 36 | <% if !(profile.kind_of?(Enterprise) && environment.enabled?('disable_cms')) %> |
39 | 37 | <% if !@page.display_as_gallery? %> |
40 | 38 | <%= 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 @@ |
46 | 44 | <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %> |
47 | 45 | <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %> |
48 | 46 | <% end %> |
49 | - <% end %> | |
47 | + </div> | |
48 | + <% end %> | |
49 | + <div id="article-header"> | |
50 | + <%= link_to(image_tag('icons-mime/rss-feed.png'), @page.feed.url, :class => 'blog-feed-link') if @page.blog? && @page.feed %> | |
51 | + <%= article_title(@page, :no_link => true) %> | |
50 | 52 | </div> |
51 | 53 | </div> |
52 | 54 | ... | ... |
public/designs/themes/base/style.css
... | ... | @@ -966,24 +966,12 @@ hr.pre-posts, hr.sep-posts { |
966 | 966 | display: none; |
967 | 967 | } |
968 | 968 | |
969 | -.blog-feed-link { | |
970 | - float: right; | |
971 | - margin-left: 5px; | |
972 | - position: absolute; | |
973 | - right: 0px; | |
974 | - top: -2px; | |
975 | -} | |
976 | - | |
977 | 969 | .blog-post { |
978 | 970 | background: url(imgs/blog-sep.png) repeat-x; |
979 | 971 | padding: 15px 20px 5px 20px; |
980 | 972 | margin: 0px -19px; |
981 | 973 | } |
982 | 974 | |
983 | -#article .logged-in h1 { | |
984 | - margin-top: 25px; | |
985 | -} | |
986 | - | |
987 | 975 | #article-actions a.button, |
988 | 976 | #article-actions a.button:hover { |
989 | 977 | border: none; | ... | ... |
public/stylesheets/application.css
... | ... | @@ -972,10 +972,8 @@ code input { |
972 | 972 | } |
973 | 973 | |
974 | 974 | #article-actions { |
975 | - position: absolute; | |
976 | - top: 1px; | |
977 | - right: 20px; | |
978 | - padding-right: 15px; | |
975 | + margin-bottom: 5px; | |
976 | + width: 100%; | |
979 | 977 | } |
980 | 978 | |
981 | 979 | #article-tags { |
... | ... | @@ -1164,6 +1162,10 @@ a.comment-picture { |
1164 | 1162 | text-decoration: none; |
1165 | 1163 | } |
1166 | 1164 | |
1165 | +.blog-feed-link { | |
1166 | + float: right; | |
1167 | +} | |
1168 | + | |
1167 | 1169 | #content .title { |
1168 | 1170 | margin-bottom: 2px; |
1169 | 1171 | } | ... | ... |