project html
This commit is contained in:
parent
28a5eff048
commit
634dd15be3
|
@ -348,7 +348,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@project_type = params[:project_type]
|
@project_type = params[:project_type] ||= params[:course]
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
|
|
||||||
|
@ -362,9 +362,9 @@ class ProjectsController < ApplicationController
|
||||||
@course_tag = params[:course]
|
@course_tag = params[:course]
|
||||||
@course = Course.new
|
@course = Course.new
|
||||||
@course.safe_attributes = params[:course]
|
@course.safe_attributes = params[:course]
|
||||||
else
|
else # default Project
|
||||||
render_404
|
@project = Project.new
|
||||||
return -1
|
@project.safe_attributes = params[:project]
|
||||||
end
|
end
|
||||||
render :layout => 'base'
|
render :layout => 'base'
|
||||||
end
|
end
|
||||||
|
@ -851,8 +851,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
def select_project_layout
|
def select_project_layout
|
||||||
project = Project.find_by_id(params[:id])
|
project = Project.find_by_id(params[:id])
|
||||||
project ||= @project
|
project ||= @project ||= @course ||= params[:course] ||= params[:project_type]
|
||||||
project ||= @course
|
|
||||||
(project.try(:project_type) == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
|
(project.try(:project_type) == Project::ProjectType_project) ? 'base_projects' : 'base_courses'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
|
<div class="buttons_for_course" style="margin-top:30px;margin-left:144px">
|
||||||
<span class="info"></span>
|
<span class="info"></span>
|
||||||
|
<% if @project.project_type==Project::ProjectType_course %>
|
||||||
<% if(course_endTime_timeout? @project) %>
|
<% if(course_endTime_timeout? @project) %>
|
||||||
<span class="font_lighter">
|
<span class="font_lighter">
|
||||||
课程学期已结束
|
课程学期已结束
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= join_in_course_for_list(@project, User.current,['regular'])%>
|
<%= join_in_course_for_list(@project, User.current,['regular'])%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue