From feaea8375ea9bad376b569d12608532454cbf0d8 Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 21 Jul 2014 17:33:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B5=84=E6=BA=90=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_course_file.html.erb | 30 ++++++++++++------------- app/views/files/_project_file.html.erb | 31 +++++++++++++------------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index a1547bc2b..55a36e125 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -12,21 +12,6 @@ <%= 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) %>

-
- - <% if attachmenttypes.any? %> -       - - <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"), - :onchange => "course_attachmenttypes_searchex(this.value)" %> - <% end %> - <% if sufixtypes.any? %> -   - - <%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes), - :onchange => "course_attachment_contenttypes_searchex(this.value)" %> - <% end %> -
@@ -59,6 +44,21 @@
+
+ + <% if attachmenttypes.any? %> +       + + <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"), + :onchange => "course_attachmenttypes_searchex(this.value)" %> + <% end %> + <% if sufixtypes.any? %> +   + + <%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes), + :onchange => "course_attachment_contenttypes_searchex(this.value)" %> + <% end %> +
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:course_id => @course.id, :format => 'js') }')" %> diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index 67067a638..84a86d209 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -12,21 +12,7 @@ <%= 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, @project) %> <%= 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, @project) %>

-
- - <% if attachmenttypes.any? %> -       - - <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"), - :onchange => "attachmenttypes_searchex(this.value)" %> - <% end %> - <% if sufixtypes.any? %> -   - - <%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes), - :onchange => "attachment_contenttypes_searchex(this.value)" %> - <% end %> -
+ +
+ + <% if attachmenttypes.any? %> +       + + <%= select_tag "attachment_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_from_collection_for_select(attachmenttypes, "id", "typeName"), + :onchange => "attachmenttypes_searchex(this.value)" %> + <% end %> + <% if sufixtypes.any? %> +   + + <%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes), + :onchange => "attachment_contenttypes_searchex(this.value)" %> + <% end %> +
<%= javascript_tag "observeSearchfield('attach_search', null, '#{ escape_javascript attachments_autocomplete_path(:project_id => @project.id, :format => 'js') }')" %>