下载资源只有贴吧资源可以下载,原因:其他资源的权限控制暂未实现,解决先直接返回true,讨论区主题...显示过早,解决:多显示几个数字
This commit is contained in:
parent
045a09e2ed
commit
24cdea1f34
|
@ -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
|
||||
|
|
|
@ -98,9 +98,9 @@
|
|||
<div class="memo-section" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="width: 83%;word-break: break-all;">
|
||||
<% 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 %>
|
||||
</div>
|
||||
<div class="memo-content">
|
||||
|
|
Loading…
Reference in New Issue