新建课程逻辑修改
This commit is contained in:
parent
d4bc8139a3
commit
0f5c996278
|
@ -67,6 +67,18 @@ class CoursesController < ApplicationController
|
|||
return courses
|
||||
end
|
||||
|
||||
def new
|
||||
@course_type = params[:course_type] ||= params[:course]
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
|
||||
@course = Course.new
|
||||
@course.safe_attributes = params[:course]
|
||||
|
||||
render :layout => 'base'
|
||||
end
|
||||
|
||||
|
||||
def desc_sort_course_by_avtivity(activity_count,courses)
|
||||
return courses if activity_count.size<2
|
||||
(activity_count.size-2).downto(0) do |i|
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<%= labelled_form_for @course do |f| %>
|
||||
<h3><%=l(:label_course_new)%></h3>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
|
||||
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
|
||||
<%= javascript_tag "$('#course_name').focus();" %>
|
||||
</div>
|
||||
<% end %>
|
Loading…
Reference in New Issue