diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c9e73ff..673d033 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -370,8 +370,12 @@ module ApplicationHelper
select_tag "#{object}[#{method}]", options_for_select(options, @page.filter_type || Comatose.config.default_filter), { :id=> "#{object}_#{method}" }.merge(html_options)
end
- def control_panel_button(title, icon, url)
+ def file_manager(&block)
+ concat(content_tag('div', capture(&block), :class => 'file-manager') + "
", block.binding)
end
+ def file_manager_button(title, icon, url)
+ content_tag('div', link_to(image_tag(icon, :alt => title, :title => title) + tag('br') + title, url), :class => 'file-manager-button')
+ end
end
diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml
index 8e4912a..eb6e888 100644
--- a/app/views/profile_editor/index.rhtml
+++ b/app/views/profile_editor/index.rhtml
@@ -2,18 +2,18 @@
<%= display_profile_info(profile) %>
-
- <%= content_tag('div', link_to(image_tag('icons-app/edit-profile.png', :alt => _('Edit Profile'), :title => _('Edit Profile')) + tag('br') + _('Edit Profile'), :controller => 'profile_editor', :action => 'edit'), :class => 'file-manager-button') %>
+<% file_manager do %>
- <%= content_tag('div', link_to(image_tag('icons-app/design-editor.png', :alt => _('Edit Visual Design'), :title => _('Edit Visual Design')) + tag('br') + _('Edit Visual Design'), :controller => 'profile_editor', :action => 'design_editor'), :class => 'file-manager-button') %>
+ <%= file_manager_button(_('Edit Profile'), 'icons-app/edit-profile.png', :controller => 'profile_editor', :action => 'edit') %>
- <%= content_tag('div', link_to(image_tag('icons-app/cms.png', :alt => _('Manage Content'), :title => _('Manage Content')) + tag('br') + _('Manage Content'), :controller => 'cms'), :class => 'file-manager-button') %>
+ <%= file_manager_button(_('Edit Visual Design'), 'icons-app/design-editor.png', :controller => 'profile_editor', :action => 'design_editor') %>
- <%= content_tag('div', link_to(image_tag('icons-app/change-password.png', :alt => _('Change Password'), :title => _('Change Password')) + tag('br') + _('Change Password'), :controller => 'account', :action => 'change_password'), :class => 'file-manager-button') %>
+ <%= file_manager_button(_('Manage Content'), 'icons-app/cms.png', :controller => 'cms') %>
-
-
+ <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') %>
+
+<% end %>