修正了用户、需求主页tab menu的显示问题

This commit is contained in:
zhangyang 2013-08-10 10:25:30 +08:00
parent 1615185ebf
commit 5afc5884b8
4 changed files with 19 additions and 3 deletions

View File

@ -1,6 +1,9 @@
# fq # fq
class BidsController < ApplicationController class BidsController < ApplicationController
#Added by young
menu_item :respond
menu_item :project, :only => :show_project
#Ended by young
before_filter :find_bid, :only => [:show, :show_project, :create, :destroy, :more, :back, :add, :new] before_filter :find_bid, :only => [:show, :show_project, :create, :destroy, :more, :back, :add, :new]
helper :watchers helper :watchers

View File

@ -22,11 +22,11 @@ class ProjectsController < ApplicationController
# menu_item :settings, :only => :settings # menu_item :settings, :only => :settings
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ] before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file] before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics]
before_filter :authorize_global, :only => [:new, :create] before_filter :authorize_global, :only => [:new, :create]
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
#by young #by young
before_filter :member, :file before_filter :member, :file, :statistics
# #
accept_rss_auth :index accept_rss_auth :index
accept_api_auth :index, :show, :create, :update, :destroy accept_api_auth :index, :show, :create, :update, :destroy
@ -276,6 +276,10 @@ class ProjectsController < ApplicationController
def file def file
end
def statistics
end end
#end #end

View File

@ -16,6 +16,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class UsersController < ApplicationController class UsersController < ApplicationController
layout 'base_users' layout 'base_users'
#Added by young
menu_item :activity
menu_item :user_information, :only => :info
menu_item :project, :only => :user_projects
menu_item :requirement_focus, :only => :watch_bids
menu_item :user_newfeedback, :only => :user
#Ended by young
before_filter :require_admin, :except => [:show, :index,:tag_save, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info, :user_watchlist, :user_fanslist,:edit] before_filter :require_admin, :except => [:show, :index,:tag_save, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info, :user_watchlist, :user_fanslist,:edit]
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership,

View File

@ -129,6 +129,7 @@ RedmineApp::Application.routes.draw do
# get 'mission', :action => 'mission', :as => 'mission' # get 'mission', :action => 'mission', :as => 'mission'
# get 'on', :action => 'on', :as => 'on' # get 'on', :action => 'on', :as => 'on'
get 'file', :action => 'file', :as => 'file' get 'file', :action => 'file', :as => 'file'
get 'statistics', :action => 'statistics', :as => 'statistics'
#end #end
post 'modules' post 'modules'
@ -146,6 +147,7 @@ RedmineApp::Application.routes.draw do
# match '/on', :controller => 'projects', :action => 'on', :as => 'on', :via => :get # match '/on', :controller => 'projects', :action => 'on', :as => 'on', :via => :get
# match '/settings(/:tab)', :controller => 'projects', :action => 'settings', :as => 'settings', :via => :get # match '/settings(/:tab)', :controller => 'projects', :action => 'settings', :as => 'settings', :via => :get
match '/file', :controller => 'projects', :action => 'file', :as => 'file', :via => :get match '/file', :controller => 'projects', :action => 'file', :as => 'file', :via => :get
match '/statistics', :controller => 'projects', :action => 'statistics', :as => 'statistics', :via => :get
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get # match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get # match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get