From 24cdea1f347fbd06e5a704e6479684877d51ca7c Mon Sep 17 00:00:00 2001 From: z9hang Date: Sun, 28 Sep 2014 16:09:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E8=B5=84=E6=BA=90=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E8=B4=B4=E5=90=A7=E8=B5=84=E6=BA=90=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=EF=BC=8C=E5=8E=9F=E5=9B=A0=EF=BC=9A=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E8=B5=84=E6=BA=90=E7=9A=84=E6=9D=83=E9=99=90=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=9A=82=E6=9C=AA=E5=AE=9E=E7=8E=B0=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=85=88=E7=9B=B4=E6=8E=A5=E8=BF=94=E5=9B=9Etrue?= =?UTF-8?q?=EF=BC=8C=E8=AE=A8=E8=AE=BA=E5=8C=BA=E4=B8=BB=E9=A2=98...?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=BF=87=E6=97=A9=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=EF=BC=9A=E5=A4=9A=E6=98=BE=E7=A4=BA=E5=87=A0=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 8 +++++--- app/views/messages/_project_show.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0b4309ef5..3ab894c69 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -258,11 +258,13 @@ class ApplicationController < ActionController::Base if @attachment.container_type == "Memo" allowed = User.current.allowed_to?(:memos_attachments_download,nil,:global => true) elsif @attachment.container_type == "Project" - + return true elsif @attachment.container_type == "course" - + return true elsif @attachment.container_type == "contest" - + return true + else + return true end if allowed diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index eff5fa160..ad55e9be7 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -98,9 +98,9 @@
<% if @project %> - <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %> + <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(29, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %> <% elsif @course %> - <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %> + <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(29,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %> <% end %>