From 5afc5884b81d458746e652bd5fbe800b8d8d8e6a Mon Sep 17 00:00:00 2001 From: zhangyang Date: Sat, 10 Aug 2013 10:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E3=80=81=E9=9C=80=E6=B1=82=E4=B8=BB=E9=A1=B5tab=20menu?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 5 ++++- app/controllers/projects_controller.rb | 8 ++++++-- app/controllers/users_controller.rb | 7 +++++++ config/routes.rb | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 9cec2946c..01c35ce7e 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -1,6 +1,9 @@ # fq 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] helper :watchers diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 04793ef7e..e7d487a1d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -22,11 +22,11 @@ class ProjectsController < ApplicationController # menu_item :settings, :only => :settings 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 :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] #by young - before_filter :member, :file + before_filter :member, :file, :statistics # accept_rss_auth :index accept_api_auth :index, :show, :create, :update, :destroy @@ -276,6 +276,10 @@ class ProjectsController < ApplicationController def file + end + + def statistics + end #end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index ae8cb9870..f61542835 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -16,6 +16,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class UsersController < ApplicationController 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 :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, diff --git a/config/routes.rb b/config/routes.rb index 9e8279ef6..29bd4d4a9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -129,6 +129,7 @@ RedmineApp::Application.routes.draw do # get 'mission', :action => 'mission', :as => 'mission' # get 'on', :action => 'on', :as => 'on' get 'file', :action => 'file', :as => 'file' + get 'statistics', :action => 'statistics', :as => 'statistics' #end post 'modules' @@ -146,6 +147,7 @@ RedmineApp::Application.routes.draw do # match '/on', :controller => 'projects', :action => 'on', :as => 'on', :via => :get # match '/settings(/:tab)', :controller => 'projects', :action => 'settings', :as => 'settings', :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 '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get