diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 47b9f70..95fb16a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -346,7 +346,11 @@ module ApplicationHelper end def icon(icon_name) - design_display_icon(icon_name, :style => 'width: 24px; height: 24px; display: inline;') + design_display_icon(icon_name) + end + + def button_bar(options = {}, &block) + concat(content_tag('div', capture(&block) + tag('br', :style => 'clear: left;'), options), block.binding) end end diff --git a/app/views/cms/view.rhtml b/app/views/cms/view.rhtml index 10f38cf..86017e0 100644 --- a/app/views/cms/view.rhtml +++ b/app/views/cms/view.rhtml @@ -9,45 +9,46 @@ <%= icon('cms') %> <%= _('Content management') %> -
+ + <% button_bar(:style => 'margin-bottom: 1em;') do %> <%= button('new', _('New article'), :action => 'new') %> -
+ <% end %> + <% end %> <%# subitem %> + <%= toggle_panel(_('Hide subitems'), _('Show subitems'), 'article-subitems') unless @subitems.empty? %> +
-
<%= @article ? _('Subitems') : _('Articles') %>
-
- <% unless @subitems.empty? %> - - <% end %> +
<%= @article ? _('Subitems') : _('Articles') %>
+
+ <% unless @subitems.empty? %> +
    + <% @subitems.each do |item| %> +
  • + <%= file_manager_button(item.name, "icons-mime/#{item.icon_name}", :action => 'view', :id => item.id) %> +
  • + <% end %> +
+ <% end %> - <% if @article %> -
- <%= button('new', _('New subitem'), :action => 'new', :parent_id => @article.id) %> -
+ <% if @article %> + <% button_bar(:class => 'file-manager-controls') do %> + <%= button('new', _('New subitem'), :action => 'new', :parent_id => @article.id) %> <% end %> - -
+ <% end %> +
<%# display the article content %> -
+
<% if @article %>

<%= @article.name %>

-
- + <% button_bar(:id => 'article-controls') do %> <%= link_to_edit_article(@article) %> - <%= button('home', _('Use as homepage'), { :action => 'set_home_page', :id => @article }, { :method => :post }) %> -
+ <% end %> <%= @article.to_html %> <% end %>
diff --git a/public/designs/icons/default/abiword_48.png b/public/designs/icons/default/abiword_48.png index 8b6901a..ceb765b 100644 Binary files a/public/designs/icons/default/abiword_48.png and b/public/designs/icons/default/abiword_48.png differ diff --git a/public/stylesheets/button.css b/public/stylesheets/button.css index 093a80c..030bcfa 100644 --- a/public/stylesheets/button.css +++ b/public/stylesheets/button.css @@ -6,6 +6,10 @@ background-position: 0px; padding-left: 25px; + + float: left; + display: block; + height: 26px; } a.button , a.button:visited { @@ -17,4 +21,3 @@ a.button:hover { background-color: #ace; } - diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index d40ca87..d6d67c0 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -198,7 +198,6 @@ div.file-manager-button a:hover { #article-subitems-hide.hide-button { float: right; - margin-top: 2px; margin-right: 4px; color: white; } @@ -219,6 +218,6 @@ div.file-manager-button a:hover { #article-controls { background: white; border: 1px solid gray; - padding-top: 8px; - padding-bottom: 8px; + padding-top: 4px; + padding-bottom: 4px; } -- libgit2 0.21.2