|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
<% attachmenttypes = @course.attachmenttypes %>
|
|
|
|
<% attachmenttypes = @course.attachmenttypes %>
|
|
|
|
<% sufixtypes = @course.contenttypes %>
|
|
|
|
<% sufixtypes = @course.contenttypes %>
|
|
|
|
|
|
|
|
|
|
|
@ -10,40 +9,12 @@
|
|
|
|
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div id="file_buttons" class="nhidden">
|
|
|
|
<div id="file_buttons" class="nhidden">
|
|
|
|
|
|
|
|
|
|
|
|
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
|
|
|
|
<p></p>
|
|
|
|
<p></p>
|
|
|
|
<div id="upload_file_div" class="relation_file_div hidden">
|
|
|
|
|
|
|
|
<%= render :partial => 'course_new', locals: {course: @course} %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="relation_file_div" class="relation_file_div hidden">
|
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
|
|
<legend>搜索</legend>
|
|
|
|
|
|
|
|
<%= form_tag(
|
|
|
|
|
|
|
|
attachments_autocomplete_path(:format => 'js'),
|
|
|
|
|
|
|
|
:remote => true,
|
|
|
|
|
|
|
|
:method => :post) do %>
|
|
|
|
|
|
|
|
<%= label_tag(:attach_search, "按关键字搜索:") %>
|
|
|
|
|
|
|
|
<%= text_field_tag(:attach_search) %>
|
|
|
|
|
|
|
|
<%#= submit_tag("Search") %>
|
|
|
|
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<%= form_tag course_attach_relation_path(:format => 'js'),
|
|
|
|
|
|
|
|
method: :post,
|
|
|
|
|
|
|
|
remote: true,
|
|
|
|
|
|
|
|
id: "relation_file_form",
|
|
|
|
|
|
|
|
:class => 'hidden' do %>
|
|
|
|
|
|
|
|
<%= hidden_field_tag(:class_name, 'course') %>
|
|
|
|
|
|
|
|
<%= hidden_field_tag(:class_id, params[:course_id]) %>
|
|
|
|
|
|
|
|
<div id="relation_file">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="kclearfix" style='margin-top: 10px;'>
|
|
|
|
|
|
|
|
<%= submit_tag(l(:button_add)) -%>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<div class="line_under" style="margin:20px 0px;"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="box" id="files-box">
|
|
|
|
<div class="box" id="files-box">
|
|
|
|
<label for="files-box" style="font-weight:bold;"> <%= l(:label_files_filter) %></label>
|
|
|
|
<label for="files-box" style="font-weight:bold;"> <%= l(:label_files_filter) %></label>
|
|
|
|