添加“新建项目”;调整“新建项目”布局
This commit is contained in:
parent
cb6fe2e7df
commit
85a23c468e
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
||||
<div class="contextual" style="padding-top:10px;padding-right:10px;">
|
||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||
</div>
|
||||
|
||||
<%= form_tag(projects_path, :method => :get) do %>
|
||||
<div class="project-search-block">
|
||||
<span><%=l(:label_project_plural)%></span>
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<h3><%=l(:label_project_new)%></h3>
|
||||
|
||||
<%= 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 %>
|
||||
<!--Added by young-->
|
||||
<div class="box tabular">
|
||||
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
|
||||
<%= 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 %>
|
||||
</div>
|
||||
<!--Ended by young-->
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue