diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 759a9a735..4d261c5d1 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -91,8 +91,8 @@   <% end %> <% if options[:author] %> - - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, + + <%= link_to h(truncate(attachment.author.show_name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 8d09ecb52..60db07db0 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -2,10 +2,17 @@
  • <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %> -

    - <%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> +

    + <% title = "#{course.syllabus.title}".html_safe %> + <%= link_to title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> · - <%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> + <% classes = "#{course.name}".html_safe %> + <%= link_to classes, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> + + 课程名称:<%= course.syllabus.title %>
    + 班级名称:<%= course.name+'('+current_time_and_term(course)+')' %>
    + 班级属性:<%= course.is_public? ? '公开' : '私有' %> +

    <%#= 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)+")"%> @@ -106,16 +113,25 @@ } $(".course_list_menu").each(function(){ - var courseWidth = $(this).children().eq(0).width(); - var classWidth = $(this).children().eq(2).width(); - var newClassWidth = 170 - courseWidth; - var newCourseWidth = 170 - classWidth; + var courseWidth = $(this).children().eq(0).children().width(); + var classWidth = $(this).children().eq(2).children().width(); + var newClassWidth = 182 - courseWidth; + var newCourseWidth = 182 - classWidth; console.log(courseWidth, classWidth); - if(courseWidth < 80 && classWidth > 80){ + if(courseWidth < 91 && classWidth > 91){ $(this).children().eq(2).css("max-width",newClassWidth + "px"); } - if(classWidth < 80 && courseWidth > 80){ + if(classWidth < 91 && courseWidth > 91){ $(this).children().eq(0).css("max-width",newCourseWidth + "px"); } }) + + $(".course-name").each(function(){ + $(this).mouseenter(function(){ + $(this).parent().parent().children().eq(3).show(); + }); + $(this).mouseleave(function(){ + $(this).parent().parent().children().eq(3).hide(); + }); + }) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 7015d17e5..4145ee25f 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -90,7 +90,7 @@
    <%= reply.author.name%><%= format_date(reply.created_at) %>
    -
    <%= h reply.content.html_safe %>
    +
    <%= h reply.content.html_safe.gsub(/\/, "