diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index b0ae6aa023..5181478e3f 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -15,6 +15,8 @@ class MyController < ApplicationController before_filter :require_login + menu_item :account, :only => [:account] + menu_item :password, :only => [:password] BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b0ab73cff5..fb2e587c23 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -940,7 +940,7 @@ module ApplicationHelper # Expands the current menu item using JavaScript based on the params def expand_current_menu current_menu_class = - case + case when params[:controller] == "timelog" "reports" when params[:controller] == 'reports' @@ -957,11 +957,12 @@ module ApplicationHelper 'settings' when params[:controller] == 'contracts' || params[:controller] == 'deliverables' 'contracts' + when params[:controller] == 'my' && params[:action] == 'account' + 'account' else params[:controller] end - javascript_tag("jQuery.menu_expand({ menuItem: '.#{current_menu_class}' });") end diff --git a/app/views/my/_sidebar.rhtml b/app/views/my/_sidebar.rhtml index 407fe990fa..2791d775db 100644 --- a/app/views/my/_sidebar.rhtml +++ b/app/views/my/_sidebar.rhtml @@ -1,3 +1,8 @@ +<% content_for :main_menu do %> + <%= render_menu :my_menu %> + <%= expand_current_menu %> +<% end %> +
<%=l(:field_login)%>: <%= link_to_user(@user, :format => :username) %>
diff --git a/app/views/my/account.rhtml b/app/views/my/account.rhtml
index 52092b8f25..77c5c22487 100644
--- a/app/views/my/account.rhtml
+++ b/app/views/my/account.rhtml
@@ -1,5 +1,4 @@