Merge branch 'cxt_course' of https://git.trustie.net/jacknudt/trustieforge into cxt_course

This commit is contained in:
cxt 2016-05-13 14:33:16 +08:00
commit dc6c5fe18b
1 changed files with 18 additions and 18 deletions

View File

@ -1,19 +1,19 @@
<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
:mul_id => @resource_id,
:mul_type => @resource_type}),
:method => 'post', :id => 'resource_import_container_form') do %>
<% @attachments.each do |attach| %>
<ul class="subjectRow">
<li class="subjectName fl hidden">
<label>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<span><%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%></span>
</label>
</li>
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
<li class="subjectCount fl hidden"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>
<li class="subjectPublisher fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
<li class="fl subjectDate"><%= format_date(attach.created_on) %></li>
</ul>
<% end %>
<%= form_tag( url_for({:controller => 'users', :action => 'import_into_container',
:mul_id => @resource_id,
:mul_type => @resource_type}),
:method => 'post', :id => 'resource_import_container_form') do %>
<% @attachments.each do |attach| %>
<ul class="subjectRow">
<li class="subjectName fl hidden">
<label>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<span><%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%></span>
</label>
</li>
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
<li class="subjectCount fl hidden"><%= (number_to_human_size(attach.filesize)).gsub("ytes", "") %></li>
<li class="subjectPublisher fl hidden"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
<li class="fl subjectDate"><%= format_date(attach.created_on) %></li>
</ul>
<% end %>
<% end %>