From 7d89f69981c6bd27d331ba02a50408fc5a9b264f Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 24 Aug 2016 15:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=92=8C=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_courses.html.erb | 10 ++-- app/views/users/_courses_list.html.erb | 54 +++++++++++-------- ...0160824073554_add_is_collect_to_members.rb | 5 ++ public/stylesheets/syllabus.css | 2 +- 4 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 db/migrate/20160824073554_add_is_collect_to_members.rb diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 2bbd38831..78461b9ba 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -45,12 +45,6 @@ <%= 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' %> - -
  • - <%= link_to "取消收藏", :class => 'user_navmore_li',:target => '_blank' %> -
    -
  • - <% if !course.syllabus.nil? %>
  • <%= link_to "所属课程",syllabus_path(course.syllabus_id), :class => 'user_navmore_li',:target => '_blank' %> @@ -58,6 +52,10 @@
  • <% end %> <% if User.current == user %> +
  • + <%= link_to "取消收藏", '', :class => 'user_navmore_li',:target => '_blank' %> +
    +
  • <% if count == 0 %> <%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post', :class => 'user_navmore_li',:remote => true %> diff --git a/app/views/users/_courses_list.html.erb b/app/views/users/_courses_list.html.erb index 7254a0818..ec5b3e462 100644 --- a/app/views/users/_courses_list.html.erb +++ b/app/views/users/_courses_list.html.erb @@ -1,31 +1,43 @@ <% unless courses.nil? %> <% courses.each_with_index do |course, i| %> -
  • +
  • <% allow_visit = User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1 %> - " target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问"%>"> - - -
  • <% end %> <% if courses.count > 3 %> -
  • - 共<%=courses.count %>个班级,点击全部展开 +
  • + 共<%= courses.count %> + 个班级,点击全部展开
  • <% end %> <% end %> \ No newline at end of file diff --git a/db/migrate/20160824073554_add_is_collect_to_members.rb b/db/migrate/20160824073554_add_is_collect_to_members.rb new file mode 100644 index 000000000..6211d0497 --- /dev/null +++ b/db/migrate/20160824073554_add_is_collect_to_members.rb @@ -0,0 +1,5 @@ +class AddIsCollectToMembers < ActiveRecord::Migration + def change + add_column :is_collect, :members, :integer, :default => 1 + end +end diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css index f11c194a6..95cee0b2c 100644 --- a/public/stylesheets/syllabus.css +++ b/public/stylesheets/syllabus.css @@ -96,7 +96,7 @@ input.syllabus_input_min{ .syllabus_class_list_more{padding:8px; text-align:center;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;} .syllabus_class_list_more:hover{ background:#ececec;} .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; } +a.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;}