Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
2ee93f9f86
|
@ -126,7 +126,7 @@ module FilesHelper
|
|||
(attachment.container_type == "Course" && User.current.allowed_to?(:as_teacher,Course.find(attachment.container_id)))||
|
||||
(attachment.container_type == "Course" && User.current.member_of_course?(Course.find(attachment.container_id)) && attachment.is_publish == 1)||
|
||||
attachment.author_id == User.current.id ||
|
||||
attachment.container_type == "OrgSubfield"
|
||||
(attachment.container_type == "OrgSubfield" and User.current.member_of_org?(attachment.container.organization))
|
||||
result << attachment
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<% delete_allowed = User.current.admin? %>
|
||||
|
||||
<% org_subfield_attachments.each do |file| %>
|
||||
<% if file.is_public == 1 or User.current.member_of_org?(file.container.organization) %>
|
||||
<div class="resources mt10" id="container_files_<%= file.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
|
@ -65,6 +66,7 @@
|
|||
</div>
|
||||
|
||||
</div><!---re_con_box end-->
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if org_subfield_attachments.count == 10 %>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<%= render :partial => "files/subfield_tags", :locals => {:tag_list => @tag_list,:org_subfield => @org_subfield,:tag_name => @tag_name}%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p class="f_l fontBlue f_b f_14">共有 <span id="attachment_count"><%= @all_attachments.count %></span> 个资源</p>
|
||||
<p class="f_l fontBlue f_b f_14">共有 <span id="attachment_count"><%= User.current.member_of_org?(@org_subfield.organization) ? @all_attachments.count : @all_attachments.select{|attach| attach.is_public == 1 }.count %></span> 个资源</p>
|
||||
<p class="f_r" style="color: #808080">
|
||||
<% if @order == "asc" %>
|
||||
按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /
|
||||
|
|
Loading…
Reference in New Issue