From 04207609cb64282780a4cbfb17b44b5a296db852 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 26 Jul 2016 16:54:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E9=85=8D=E7=BD=AE=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E7=8F=AD=E7=BA=A7=E6=89=93=E5=BC=80=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- app/views/layouts/_course_base_info.html.erb | 10 +++++++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 96e0d7683..eab03935b 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - ">" + l(:label_homework_acts) + "> " + l(:label_homework_acts) when "news" - ">" + l(:label_news_acts) + "> " + l(:label_news_acts) when "attachment" - ">" + l(:label_attachment_acts) + "> " + l(:label_attachment_acts) when "message" - ">" + l(:label_message_acts) + "> " + l(:label_message_acts) when "journalsForMessage" - ">" + l(:label_journalsForMessage_acts) + "> " + l(:label_journalsForMessage_acts) when "poll" - ">" + l(:label_poll_acts) + "> " + l(:label_poll_acts) else - ">" + l(:label_all_cats) + "> " + l(:label_all_cats) end end diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 04162fc9c..06e24e0c2 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -3,8 +3,10 @@ <% student_num = studentCount(@course) %> <% course_file_num = visable_attachemnts_incourse(@course).count %>

- <%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey' %> -  >  + <% if @course.syllabus %> + <%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey' %> +  >  + <% end %> <%=link_to @course.name, course_path(@course), :class => 'sy_cgrey' %>

@@ -16,7 +18,9 @@
  • <%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %>
  • <%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %>
  • <%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %>
  • -
  • <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
  • + <% if @course.syllabus %> +
  • <%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %>
  • + <% end %>