班级新增收藏功能

This commit is contained in:
Tim 2016-08-24 10:28:09 +08:00
parent 03c093fb13
commit 57ecffc130
5 changed files with 15 additions and 3 deletions

View File

@ -45,6 +45,12 @@
<%= link_to "论坛",course_boards_path(course), :class => 'user_navmore_li fl',:target => '_blank' %>
<%= link_to "+",course_boards_path(course, :flag => true, :is_new => 1), :class => 'user_navmore_add fl', :title => '发布帖子',:target => '_blank' %>
</li>
<li>
<%= link_to "取消收藏", :class => 'user_navmore_li',:target => '_blank' %>
<div class="cl"></div>
</li>
<% if !course.syllabus.nil? %>
<li>
<%= link_to "所属课程",syllabus_path(course.syllabus_id), :class => 'user_navmore_li',:target => '_blank' %>

View File

@ -157,7 +157,7 @@
<% if !unvisiable %>
<ul class="users_accordion mb10">
<li id="user_01" class="user_icons_course">
<%= link_to '课程',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
<% all_count = @user.courses.visible.where("is_delete =?", 0).count%>
<div class="<%= courses.empty? ? 'none' : ''%>" >

View File

@ -3,11 +3,12 @@
<li class="syllabus_class_list <%=i > 2 ? 'none' : '' %>">
<% allow_visit = User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1 %>
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问"%>">
<span class="icons_sy_cir "></span>
<span class="icons_sy_favorite "></span>
<span class="icons_sy_star "></span>
<div class="fl">
<div class="syllabus_class_w ">
<p class="syllabus_class_title fl"><%=course.name %></p>
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl"></span>
<span class="<%= course.is_public == 0 ? 'syllabus_class_private' : 'syllabus_class_open' %> fl ml10 mt3 syllabus_class_property"><%= course.is_public == 0 ? '私有' : '公开' %></span>
<span class="fr sy_p_grey hidden" style="max-width: 120px;">主讲老师:<%=course.teacher.show_name %></span>
<div class="cl"></div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -80,6 +80,8 @@ input.syllabus_input_min{
.icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; position:absolute; right:10px; top:10px; }
.icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; }
.icons_sy_cir{background: url(../images/syllabus/icons_syllabus.png) 0px -82px no-repeat; width:15px; height:15px; display:block; position:absolute; left:-8px; top:25px;}
.icons_sy_favorite{background: url(../images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; position:absolute; left:-10px; top:25px;}
.icons_sy_star{background: url(../images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; position:absolute; left:-10px; top:25px;}
.icons_sy_arrow{background: url(../images/syllabus/icons_syllabus.png) -31px -81px no-repeat; width:20px; height:20px; display:block; }
.syllabus_h2_top{ font-size:18px; color:#333; font-weight:normal; padding:10px 15px;border-bottom:1px solid #e7e7e7; }
.syllabus_category{ padding:10px 15px; background-color:#f6f6f6; border-bottom:1px solid #e7e7e7;}
@ -96,6 +98,9 @@ input.syllabus_input_min{
.syllabus_class_list_more a{ color:#ff7e00;}
.syllabus_class_title{ font-size:14px; color:#333; max-width:480px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.syllabus_class_w{ width:650px;}
.syllabus_class_property {font-size:12px; padding:0 5px; border-radius:3px; line-height:14px;}
.syllabus_class_private {color:#ff4a1b; border:1px solid #ff4a1b;}
.syllabus_class_open {color:#7dd26c; border:1px solid #7dd26c;}
/*新建页面*/