diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb
index 0c9f0382b..a311fc765 100644
--- a/app/controllers/documents_controller.rb
+++ b/app/controllers/documents_controller.rb
@@ -22,7 +22,7 @@ class DocumentsController < ApplicationController
before_filter :find_project_by_project_id, :only => [:index, :new, :create]
before_filter :find_model_object, :except => [:index, :new, :create]
before_filter :find_project_from_association, :except => [:index, :new, :create]
- before_filter :authorize, :except => [:index]#Added by young
+ before_filter :authorize #, :except => [:index]#Added by young
helper :attachments
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index a75fac2eb..04793ef7e 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, :investor, :issue, :mission, :on, :file]
+ before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file]
before_filter :authorize_global, :only => [:new, :create]
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
#by young
- before_filter :member, :focus, :mission, :issue, :on, :file, :investor
+ before_filter :member, :file
#
accept_rss_auth :index
accept_api_auth :index, :show, :create, :update, :destroy
@@ -119,6 +119,7 @@ class ProjectsController < ApplicationController
@trackers = Tracker.sorted.all
@project = Project.new
@project.safe_attributes = params[:project]
+ render :layout => 'base'
end
def create
@@ -271,31 +272,10 @@ class ProjectsController < ApplicationController
#by young
def member
- session[:project_member_num] = 12
end
- def focus
- session[:project_focus_num] = 2508
- end
-
- def investor
- session[:project_investor_num] = 8
- end
-
- def issue
- session[:project_issue_num] = 1
- end
-
- def mission
- session[:project_mission_num] = 225
- end
-
- def on
- session[:project_on_num] = 1208
- end
def file
- session[:project_file_num] = 125
end
#end
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index b93e2eaca..1add4f2b5 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -2,6 +2,10 @@
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
+
+ <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
+
+
<%= form_tag(projects_path, :method => :get) do %>
<%=l(:label_project_plural)%>
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
index 95b233f48..c66523896 100644
--- a/app/views/projects/new.html.erb
+++ b/app/views/projects/new.html.erb
@@ -1,8 +1,13 @@
<%=l(:label_project_new)%>
<%= labelled_form_for @project do |f| %>
-<%= render :partial => 'form', :locals => { :f => f } %>
-<%= submit_tag l(:button_create) %>
-<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
-<%= javascript_tag "$('#project_name').focus();" %>
-<% end %>
+
+
+
<%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %>
+ <%= render :partial => 'form', :locals => { :f => f } %>
+ <%= submit_tag l(:button_create) %>
+ <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
+ <%= javascript_tag "$('#project_name').focus();" %>
+ <% end %>
+
+
diff --git a/config/routes.rb b/config/routes.rb
index 3de86aded..7407b0dfe 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -113,16 +113,16 @@ RedmineApp::Application.routes.draw do
resources :projects do
member do
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
- get 'show', :action => 'show', :as => 'project_show'
- get 'activity', :controller => 'activities', :action => 'index', :as => 'activity'
- get 'repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository'
+ # get 'show', :action => 'show', :as => 'project_show'
+ # get 'activity', :controller => 'activities', :action => 'index', :as => 'activity'
+ # get 'repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository'
#by young
get 'member', :controller => 'projects', :action => 'member', :as => 'member'
- get 'focus', :action => 'focus', :as => 'focus'
- get 'investor', :action => 'investor', :as => 'investor'
+# get 'focus', :action => 'focus', :as => 'focus'
+# get 'investor', :action => 'investor', :as => 'investor'
# get 'issue', :action =>'issue', :as => 'issue'
- get 'mission', :action => 'mission', :as => 'mission'
- get 'on', :action => 'on', :as => 'on'
+# get 'mission', :action => 'mission', :as => 'mission'
+# get 'on', :action => 'on', :as => 'on'
get 'file', :action => 'file', :as => 'file'
#end
@@ -136,18 +136,18 @@ RedmineApp::Application.routes.draw do
#by young
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
- match '/focus', :controller => 'projects', :action => 'focus', :as => 'focus', :via => :get
- match '/mission', :controller => 'projects', :action => 'mission', :as => 'mission', :via => :get
- match '/on', :controller => 'projects', :action => 'on', :as => 'on', :via => :get
- match '/settings(/:tab)', :controller => 'projects', :action => 'settings', :as => 'settings', :via => :get
+# match '/focus', :controller => 'projects', :action => 'focus', :as => 'focus', :via => :get
+# match '/mission', :controller => 'projects', :action => 'mission', :as => 'mission', :via => :get
+# 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 '/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 '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
- match '/', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
- get 'projects/:project_id/show', :to => 'projects#show', :as => 'project_show'
- get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository'
+# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get
+# match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
+# match '/', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
+# get 'projects/:project_id/show', :to => 'projects#show', :as => 'project_show'
+# get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository'
# match '/show', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get