Commit ee1342d2b0ebe50d93c8cccf27a790a63f32557f
1 parent
d05a7dfc
Exists in
master
and in
3 other branches
Improve submenus
Showing
4 changed files
with
63 additions
and
39 deletions
Show diff stats
appearance_menu.html.erb
| 1 | <div id="control_panel_bar" class="menu_aparence controller-profile_editor"> | 1 | <div id="control_panel_bar" class="menu_aparence controller-profile_editor"> |
| 2 | 2 | ||
| 3 | -<% control_panel do %> | ||
| 4 | - <%= control_panel_button(_('Edit sideboxes'), 'blocks', :controller => 'profile_design', :action => 'index') %> | 3 | +<ul class="control-panel"> |
| 4 | + <li> | ||
| 5 | + <%= link_to(_('Edit sideboxes'), url_for(:controller => 'profile_design', :action => 'index'), :class => 'control-panel-blocks') %> | ||
| 6 | + </li> | ||
| 5 | 7 | ||
| 6 | - <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'profile_themes', :action => 'index') %> | 8 | + <li> |
| 9 | + <%= link_to(_('Edit Appearance'), url_for(:controller => 'profile_themes', :action => 'index'), :class => 'control-panel-design-editor') %> | ||
| 10 | + </li> | ||
| 7 | 11 | ||
| 8 | - <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %> | ||
| 9 | -<% end %> | 12 | + <li> |
| 13 | + <%= link_to(_('Edit Header and Footer'), url_for(:controller => 'profile_editor', :action => 'header_footer'), :class => 'control-panel-header-and-footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %> | ||
| 14 | + </li> | ||
| 15 | +</ul> | ||
| 10 | 16 | ||
| 11 | </div> | 17 | </div> |
cabecalho.css
| @@ -1252,3 +1252,11 @@ float: right; | @@ -1252,3 +1252,11 @@ float: right; | ||
| 1252 | #user #homepage-link strong { | 1252 | #user #homepage-link strong { |
| 1253 | padding: 10px 0 10px 35px; | 1253 | padding: 10px 0 10px 35px; |
| 1254 | } | 1254 | } |
| 1255 | + | ||
| 1256 | +#control_panel_bar .control-panel a { | ||
| 1257 | + margin-bottom: 0; | ||
| 1258 | + border: 0; | ||
| 1259 | + line-height: normal; | ||
| 1260 | +} | ||
| 1261 | +#control_panel_bar .control-panel a:hover { | ||
| 1262 | +} |
content_menu.html.erb
| 1 | <div id="control_panel_bar" class="menu_content controller-profile_editor"> | 1 | <div id="control_panel_bar" class="menu_content controller-profile_editor"> |
| 2 | 2 | ||
| 3 | -<% control_panel do %> | ||
| 4 | - <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %> | ||
| 5 | - | ||
| 6 | - <% unless profile.enterprise? %> | ||
| 7 | - <%= case profile.blogs.count | ||
| 8 | - when 0 | ||
| 9 | - control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog') | ||
| 10 | - when 1 | ||
| 11 | - control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog) | ||
| 12 | - else | ||
| 13 | - control_panel_button(_('Configure blog'), 'blog', :controller => 'cms') | ||
| 14 | - end %> | ||
| 15 | - <% end %> | ||
| 16 | -<% end %> | 3 | +<ul class="control-panel"> |
| 4 | + <li> | ||
| 5 | + <%= link_to(_('Manage Content'), url_for(:controller => 'cms'), :class => 'control-panel-cms') %> | ||
| 6 | + </li> | ||
| 7 | +</ul> | ||
| 17 | 8 | ||
| 18 | </div> | 9 | </div> |
settings_menu.html.erb
| 1 | <div id="control_panel_bar" class="menu_settings controller-profile_editor"> | 1 | <div id="control_panel_bar" class="menu_settings controller-profile_editor"> |
| 2 | 2 | ||
| 3 | -<% control_panel do %> | 3 | +<ul class="control-panel"> |
| 4 | + <li> | ||
| 5 | + <%= link_to(profile.control_panel_settings_button[:title], | ||
| 6 | + url_for(:controller => 'profile_editor', :action => 'edit'), | ||
| 7 | + :class => "control-panel-#{profile.control_panel_settings_button[:icon]}") %> | ||
| 8 | + </li> | ||
| 4 | 9 | ||
| 5 | - <%= control_panel_button(profile.control_panel_settings_button[:title], | ||
| 6 | - profile.control_panel_settings_button[:icon], | ||
| 7 | - :controller => 'profile_editor', :action => 'edit') %> | 10 | + <li> |
| 11 | + <%= link_to(_('Location'), url_for(:controller => 'maps', :action => 'edit_location'), :class => 'control-panel-edit-location') %> | ||
| 12 | + </li> | ||
| 8 | 13 | ||
| 9 | - <%= control_panel_button(_('Location'), 'edit-location', :controller => 'maps', :action => 'edit_location') %> | 14 | + <li> |
| 15 | + <%= link_to(_('Mail settings'), url_for(:controller => 'mailconf'), :class => 'control-panel-mail') if profile.person? && MailConf.enabled? %> | ||
| 16 | + </li> | ||
| 10 | 17 | ||
| 11 | - <%= control_panel_button(_('Mail settings'), 'mail', :controller => 'mailconf') if profile.person? && MailConf.enabled? %> | 18 | + <li> |
| 19 | + <%= link_to(_('Tasks'), url_for(:controller => 'tasks', :action => 'index'), :class => 'control-panel-todo') %> | ||
| 20 | + </li> | ||
| 12 | 21 | ||
| 13 | - <%= control_panel_button(_('Tasks'), 'todo', :controller => 'tasks', :action => 'index') %> | 22 | + <li> |
| 23 | + <%= link_to(_('Change Password'), url_for(:controller => 'account', :action => 'change_password'), :class => 'control-panel-change-password') if profile.person? %> | ||
| 24 | + </li> | ||
| 14 | 25 | ||
| 15 | - <%= control_panel_button(_('Change Password'), 'change-password', :controller => 'account', :action => 'change_password') if profile.person? %> | 26 | + <li> |
| 27 | + <%= link_to(_('Manage friends'), url_for(:controller => 'friends', :action => 'index'), :class => 'control-panel-friends') if profile.person? %> | ||
| 28 | + </li> | ||
| 16 | 29 | ||
| 17 | - <%= control_panel_button(_('Manage friends'), 'friends', :controller => 'friends', :action => 'index') if profile.person? %> | 30 | + <li> |
| 31 | + <%= link_to(_('Manage Members'), url_for(:controller => 'profile_members'), :class => 'control-panel-members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %> | ||
| 32 | + </li> | ||
| 18 | 33 | ||
| 19 | - <%= control_panel_button(_('Manage Members'), 'members', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %> | ||
| 20 | - | ||
| 21 | - <%= control_panel_button(_('Manage Products/Services'), 'products', :controller => 'manage_products') if profile.enterprise? && environment.enabled?('products_for_enterprises') %> | 34 | + <li> |
| 35 | + <%= link_to(_('Manage Products/Services'), url_for(:controller => 'manage_products'), :class => 'control-panel-products') if profile.enterprise? && environment.enabled?('products_for_enterprises') %> | ||
| 36 | + </li> | ||
| 22 | 37 | ||
| 23 | <% if !environment.enabled?('disable_asset_enterprises') %> | 38 | <% if !environment.enabled?('disable_asset_enterprises') %> |
| 24 | <% if profile.is_validation_entity? %> | 39 | <% if profile.is_validation_entity? %> |
| 25 | - <%= control_panel_button(_('Enterprise Validation'), 'validation', :controller => 'enterprise_validation') %> | 40 | + <li><%= link_to(_('Enterprise Validation'), url_for(:controller => 'enterprise_validation'), :class => 'control-panel-validation') %></li> |
| 26 | <% end %> | 41 | <% end %> |
| 27 | <% if profile.person? %> | 42 | <% if profile.person? %> |
| 28 | - <%= control_panel_button(_('Favorite Enterprises'), 'favorites', :controller => 'favorite_enterprises') %> | 43 | + <li><%= link_to(_('Favorite Enterprises'), url_for(:controller => 'favorite_enterprises'), :class => 'control-panel-favorites') %></li> |
| 29 | <% end %> | 44 | <% end %> |
| 30 | <% end %> | 45 | <% end %> |
| 31 | 46 | ||
| 32 | <% if profile.enterprise? %> | 47 | <% if profile.enterprise? %> |
| 33 | <% if profile.enabled? %> | 48 | <% if profile.enabled? %> |
| 34 | - <%= control_panel_button(_('Disable'), 'disable', :action => 'disable') %> | 49 | + <li><%= link_to(_('Disable'), url_for(:action => 'disable'), :class => 'control-panel-disable') %></li> |
| 35 | <% else %> | 50 | <% else %> |
| 36 | - <%= control_panel_button(_('Enable'), 'enable', :action => 'enable') %> | 51 | + <li><%= link_to(_('Enable'), url_for(:action => 'enable'), :class => 'control-panel-enable') %></li> |
| 37 | <% end %> | 52 | <% end %> |
| 38 | <% end %> | 53 | <% end %> |
| 39 | 54 | ||
| 40 | - <%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %> | 55 | + <li> |
| 56 | + <%= link_to(_('Manage my groups'), url_for(:controller => 'memberships'), :class => 'control-panel-groups') if profile.person? %> | ||
| 57 | + </li> | ||
| 41 | 58 | ||
| 42 | - <%= control_panel_button(_('Manage SPAM'), 'manage-spam', :controller => 'spam', :action => 'index') %> | 59 | + <li> |
| 60 | + <%= link_to(_('Manage SPAM'), url_for(:controller => 'spam', :action => 'index'), :class => 'control-panel-manage-spam') %> | ||
| 61 | + </li> | ||
| 43 | 62 | ||
| 44 | <% @plugins.dispatch(:control_panel_buttons).each do |button| %> | 63 | <% @plugins.dispatch(:control_panel_buttons).each do |button| %> |
| 45 | - <%= control_panel_button(button[:title], button[:icon], button[:url]) %> | 64 | + <li><%= link_to(button[:title], button[:url], :class => "control-panel-#{button[:icon]}") %></li> |
| 46 | <% end %> | 65 | <% end %> |
| 47 | 66 | ||
| 48 | -<% end %> | 67 | +</ul> |
| 49 | 68 | ||
| 50 | </div> | 69 | </div> |