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