|
|
|
@ -21,8 +21,8 @@
|
|
|
|
|
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
|
|
|
|
download_named_attachment_path(file.id, file.filename),
|
|
|
|
|
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
|
|
|
|
<% if User.current.logged? || User.current.admin? %>
|
|
|
|
|
<% if ((manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file)) || User.current.admin? %>
|
|
|
|
|
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
|
|
|
|
<% if authority_pubilic_for_files(project, file) && delete_allowed %>
|
|
|
|
|
<span id="is_public_<%= file.id %>">
|
|
|
|
@ -43,6 +43,22 @@
|
|
|
|
|
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if User.current.admin? || ( User.current.logged? && ( (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file))) %>
|
|
|
|
|
<div>
|
|
|
|
|
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
|
|
|
|
|
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
|
|
|
|
|
</div>
|
|
|
|
|
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
|
|
|
|
|
onblur="edit_file_description('<%= update_file_description_project_file_path(project,file)%>','<%= file.id %>');"><%= file.description %></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="fontGrey2 mb4">
|
|
|
|
|
<% unless file.description.blank? %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="tag_h">
|
|
|
|
|
<!-- container_type = 2 代表是项目里的资源 -->
|
|
|
|
|
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
|
|
|
|
|