From 3b7679b25431277b2086d24a3e686dc467756693 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 1 Jul 2016 11:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A4=A7=E7=BA=B2=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_syllabus_list.html.erb | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/views/users/_user_syllabus_list.html.erb b/app/views/users/_user_syllabus_list.html.erb index 1cf3347c7..e967383f6 100644 --- a/app/views/users/_user_syllabus_list.html.erb +++ b/app/views/users/_user_syllabus_list.html.erb @@ -17,15 +17,17 @@
-
+ <% if @syllabus.any? %> <% @syllabus.each_with_index do |syllabus, index|%> +
<% courses = @courses.where("syllabus_id = #{syllabus.id}").select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS time").order("time desc") %>

<%=syllabus.title %>

+ <%=link_to '', syllabus_path(syllabus.id), :class => 'icons_sy_setting fr',:target => '_blank', :title => '查看课程' %>

更新时间:<%=format_date syllabus.updated_at %> 创建老师:<%=syllabus.user.show_name %> 班级:<%=courses.count %> @@ -65,10 +67,8 @@ <% end %>

- - - <%=link_to '', syllabus_path(syllabus.id), :class => 'icons_sy_setting fr', :title => '管理课程' %> - <% end %> +
+ <% end %>
    <%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %> @@ -78,7 +78,6 @@ <% else %>

    <%= l(:label_no_data) %>

    <% end %> -
\ No newline at end of file