socialforge/app/views/admin/courses.html.erb

89 lines
2.2 KiB
Plaintext
Raw Normal View History

2015-07-01 17:34:17 +08:00
<div class="contextual">
<%= link_to l(:label_course_new), {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
</div>
<h3>
<%=l(:label_course_all)%>
</h3>
2016-07-07 09:02:41 +08:00
<%= render 'tab_syllabuses_courses' %>
<h3>
班级列表
</h3>
2015-07-01 17:34:17 +08:00
<%= form_tag({}, :method => :get) do %>
<fieldset>
<label for='name'>
2016-07-07 09:02:41 +08:00
班级:
2015-07-01 17:34:17 +08:00
</label>
2016-07-07 09:02:41 +08:00
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '班级、老师名称' %>
2015-07-01 17:34:17 +08:00
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
2016-07-07 09:02:41 +08:00
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'courses'}, :class => 'icon icon-reload' %>
2015-07-01 17:34:17 +08:00
</fieldset>
<% end %>
&nbsp;
<div class="autoscroll">
<table class="list" style="width: 100%;table-layout: fixed">
<thead>
<tr>
<th style="width: 30px;">
序号
</th>
<th style="width: 85px;">
2016-07-07 09:02:41 +08:00
班级
2015-07-01 17:34:17 +08:00
</th>
<th style="width: 35px;">
2015-07-01 17:34:17 +08:00
主讲老师
</th>
2016-07-07 09:02:41 +08:00
<th style="width: 20px;">
2015-07-01 17:34:17 +08:00
学时
</th>
2016-07-07 09:02:41 +08:00
<th style="width: 15px;">
2015-07-01 17:34:17 +08:00
<%=l(:field_is_public)%>
</th>
2016-07-07 09:02:41 +08:00
<th style="width: 45px;">
2015-07-01 17:34:17 +08:00
<%=l(:field_created_on)%>
</th>
2016-07-07 09:02:41 +08:00
<th style="width: 45px;">
动态时间
</th>
2016-07-07 09:02:41 +08:00
<th style="width:75px">
课程
</th>
<th style="width:35px">
</th>
2015-07-01 17:34:17 +08:00
</tr>
</thead>
<tbody>
<% @courses.each do |course| %>
2016-07-07 09:02:41 +08:00
<tr class="<%= cycle("odd", "even") %>" id="course_<%=course.id %>">
<%=render :partial => 'courselist_detail_tr', :locals => {:course => course} %>
2015-07-01 17:34:17 +08:00
</tr>
<% end %>
</tbody>
</table>
</div>
<div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
</div>
2016-07-07 09:02:41 +08:00
<script type="text/javascript">
function select_syllabus(id){
val = $("#new_syllabus_id_"+id).children('option:selected').val();
if(val != "0") {
$.ajax({
type: "post",
url: "/admin/select_course_syllabus",
data: {syllabus_id: val,
course_id: id},
success: function (data) {
}
});
}
}
</script>
2015-07-01 17:34:17 +08:00
<% html_title(l(:label_course_all)) -%>