|
|
@ -81,25 +81,77 @@ div.tags_area {
|
|
|
|
white-space: nowrap;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
div.pagination{
|
|
|
|
|
|
|
|
margin: 10px 0px;
|
|
|
|
|
|
|
|
height: 1.5em;
|
|
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.m5p5{
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
height: auto;
|
|
|
|
|
|
|
|
color: white !important;
|
|
|
|
|
|
|
|
margin: 8px;
|
|
|
|
|
|
|
|
padding: 3px 7px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.m5p5:hover {
|
|
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
/*padding-bottom: 3px;*/
|
|
|
|
|
|
|
|
/*border-bottom: 1px solid #666666;*/
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
border: 1px solid #15bccf;
|
|
|
|
|
|
|
|
box-shadow: 3px 3px 3px #666666;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#relation_file_div{
|
|
|
|
|
|
|
|
margin: 0px 25px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#relation_file_div fieldset{
|
|
|
|
|
|
|
|
margin: 0px 25px;
|
|
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="borad-title"><%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>文件共享专区</span>
|
|
|
|
<span class="borad-title"><%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>文件共享专区</span>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="content-title-top">
|
|
|
|
<div class="content-title-top">
|
|
|
|
<%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
<%= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
<div id="file_buttons" class="hidden">
|
|
|
|
|
|
|
|
<%= link_to('上传文件', new_project_file_path(@project), :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
|
|
|
|
<%= link_to('关联已有文件', 'javascript:void(0);', :onclick => "$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
|
|
|
|
|
|
|
|
<% if Rails.env.development? %>
|
|
|
|
<div id="relation_file_div" class="hidden" >
|
|
|
|
<a href="#" class = 'icon' onclick="modalWin();">~测试测试~</a>
|
|
|
|
<fieldset>
|
|
|
|
<script type="text/javascript">
|
|
|
|
<legend>搜索</legend>
|
|
|
|
function modalWin () {
|
|
|
|
<%= form_tag(
|
|
|
|
$('#ajax-modal').html('<h3 class="title">~测试测试~</h3><p>导入勾选文件xxx test</p>');
|
|
|
|
attachments_autocomplete_path(:format => 'js'),
|
|
|
|
showModal('ajax-modal', '400px');
|
|
|
|
:remote => true,
|
|
|
|
|
|
|
|
:method => :post) do %>
|
|
|
|
|
|
|
|
<%= label_tag(:attach_search, "按文件名搜索:") %>
|
|
|
|
|
|
|
|
<%= text_field_tag(:attach_search) %>
|
|
|
|
|
|
|
|
<%#= submit_tag("Search") %>
|
|
|
|
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<%= form_tag attach_relation_path(:format => 'js'),
|
|
|
|
|
|
|
|
method: :post,
|
|
|
|
|
|
|
|
remote: true,
|
|
|
|
|
|
|
|
id:"relation_file_form",
|
|
|
|
|
|
|
|
:class => 'hidden' do %>
|
|
|
|
|
|
|
|
<%= hidden_field_tag(:class_name, 'Project') %>
|
|
|
|
|
|
|
|
<%= hidden_field_tag(:class_id, params[:project_id]) %>
|
|
|
|
|
|
|
|
<div id="relation_file" >
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="kclearfix" style='margin-top: 10px;' >
|
|
|
|
|
|
|
|
<%= submit_tag(l(:button_add)) -%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:project_id => @project.id, :format => 'js') }')" %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
<% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
|
|
|
|
<table class="list files" id="ver-zebra" >
|
|
|
|
<table class="list files" id="ver-zebra" >
|
|
|
@ -130,7 +182,7 @@ div.tags_area {
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
<% container.attachments.each do |file| %>
|
|
|
|
<% container.attachments.each do |file| %>
|
|
|
|
<tr class="file <%= cycle("odd", "odd") %>">
|
|
|
|
<tr class="file <%= cycle("odd", "odd") %>">
|
|
|
|
<td class="filename" style="font-size: 13px; width: 240px; "><%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
|
|
|
|
<td class="filename" style="font-size: 13px; width: 240px; "><%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
|
|
|
|
<td class="created_on"><%= format_time(file.created_on) %></td>
|
|
|
|
<td class="created_on"><%= format_time(file.created_on) %></td>
|
|
|
|
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
|
|
|
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
|
|
|
<td class="downloads"><%= file.downloads %></td>
|
|
|
|
<td class="downloads"><%= file.downloads %></td>
|
|
|
|