diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 398fb8510..bc52b0002 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -162,17 +162,17 @@ module UsersHelper end def current_time_and_term_resource course - str = "" + str = course.syllabus.title + " · " term = cur_course_term_resource name = course.name if (course.time == course.end_time && course.term == course.end_term) || (course.end_term.nil? && course.end_time.nil?) || course.time > Time.now.year - str = name + "(" + course.time.to_s + course.term.to_s + ")" + str = str + name + "(" + course.time.to_s + course.term.to_s + ")" elsif course.time == Time.now.year && set_term_value(cur_course_term) <= set_term_value(course.term) - str = name + "(" + course.time.to_s + course.term.to_s + ")" + str = str + name + "(" + course.time.to_s + course.term.to_s + ")" elsif course.end_time < Time.now.year || (course.end_time == Time.now.year && set_term_value(cur_course_term) >= set_term_value(course.term)) - str = name + "(" + course.end_time.to_s + course.end_term.to_s + ")" + str = str + name + "(" + course.end_time.to_s + course.end_term.to_s + ")" else - str = name + "(" + Time.now.year.to_s + cur_course_term_resource.to_s + ")" + str = str + name + "(" + Time.now.year.to_s + cur_course_term_resource.to_s + ")" end str end diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index ece60cdd1..ba60070d0 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -4,7 +4,10 @@ <% exc_course.each_with_index do |e_course, i| %>
  • <%= i+1 %> + <%= link_to e_course.syllabus.title, syllabus_path(e_course.syllabus_id), :target => '_blank', :class => "sy_class_ltitle fl"%> +  ·  <%=link_to e_course.name, course_path(e_course.id), :class => "sy_class_ltitle fl mb10" %> +

    <% homework_count = e_course.homework_commons.where("publish_time <= '#{Date.today}'").count %> <% if homework_count > 0 %> diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 1be6e5ac8..cc15b6101 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -54,7 +54,11 @@

    -

    <%=@course.name %>

    +

    + <%= link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class =>'c_dark', :target => '_blank'%> +  ·  + <%=@course.name %> +

    教师:<%= course_teacher_link teacher_num %> diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index d8b145ddc..21858fbea 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -2,7 +2,12 @@

  • <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %> - <%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), + + <%#= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :id => "show_course_#{course.id}", :class => 'course_list_menu hidden', :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%> <% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %> <% wechat_count = ShieldWechatMessage.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %> diff --git a/app/views/syllabuses/_syllabus_course_list.html.erb b/app/views/syllabuses/_syllabus_course_list.html.erb index 1388aa1d4..dcca16ead 100644 --- a/app/views/syllabuses/_syllabus_course_list.html.erb +++ b/app/views/syllabuses/_syllabus_course_list.html.erb @@ -18,11 +18,19 @@ <% @courses.each do |course| %>
    diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb index 8c606add6..50de18fb9 100644 --- a/app/views/users/_user_homework_detail.html.erb +++ b/app/views/users/_user_homework_detail.html.erb @@ -8,7 +8,9 @@
    <%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%> TO - <%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%> + <%=link_to homework_common.course.syllabus.title, syllabus_path(homework_common.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> + + <%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue"%>
  • -
  • - <%= link_to "引用数", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "fl", :remote => true %> - <% if @order == "quotes" %> - <%= link_to "", user_resource_user_path(:type => @type, :status => @status, :sort => @score, :order => "quotes"), :class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt16", :remote => true %> - <% end %> -
  • + + + + + +
  • <%= link_to "下载数", resource_search_user_path(:type => @type, :status => @status, :sort => @score, :order => "downloads"), :class => "fl", :remote => true %> <% if @order == "downloads" %> diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 1c2d1d0d9..d4ba7b86c 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -321,7 +321,7 @@ a.loginChooseTab {color:#484848; height:30px; display:block;} .resource-list-checkbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;} .resource-checkbox {margin-top:14px; width:12px; height:12px;} .resource-list-name {width:380px; height:40px; line-height:40px; text-align:left;} -.resource-list-from {width:150px; height:40px; line-height:40px; text-align:center;} +.resource-list-from {width:210px; height:40px; line-height:40px; text-align:center;} .resource-list-size {width:80px; height:40px; line-height:40px; text-align:center;} .resource-list-type {width:80px; height:40px; line-height:40px; text-align:center;} .resource-list-uploader {width:80px; height:40px; line-height:40px; text-align:center;} diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css index 101ff23a6..cf504a10d 100644 --- a/public/stylesheets/syllabus.css +++ b/public/stylesheets/syllabus.css @@ -602,6 +602,7 @@ a:hover.sy_class_ltitle{ color:#333;} /*.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;}*/ .hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;} .hw_list_classname{ width:300px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;} +.syllabus_course_name{ width:450px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;} .hw_list_teachername{ width:80px; overflow:hidden; display:block;overflow:hidden;white-space: nowrap; text-overflow:ellipsis;} /* 测试集显示 */ .hw_popup_testtable{background:#fff; color:#888888; margin:10px 0; border-right:1px solid #e7e7e7; border-bottom:1px solid #e7e7e7;}