From 829c77879a360aa2a06a6dcea1a37c9ef481b3bc Mon Sep 17 00:00:00 2001 From: yanxd Date: Wed, 14 May 2014 17:12:04 +0800 Subject: [PATCH] typo --- app/helpers/files_helper.rb | 4 +- app/views/files/_show_all_attachment.html.erb | 134 +- app/views/files/_sort_by_attachtypel.html.erb | 132 +- app/views/files/getattachtype.js.erb | 10 +- app/views/files/index.html.erb | 307 +--- public/stylesheets/nyan.css | 1465 ++++++++++------- 6 files changed, 1080 insertions(+), 972 deletions(-) diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb index 16a3d8b5..052aae46 100644 --- a/app/helpers/files_helper.rb +++ b/app/helpers/files_helper.rb @@ -55,9 +55,9 @@ module FilesHelper result = true end if result - if contentType != l(:attachment_all) && contentType != attachment.suffix_type + if contentType != '0' && contentType != attachment.suffix_type result = false - end + end end result end diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index ad207adf..6a2d6e54 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -3,72 +3,72 @@ <% attachmenttypes = @project.attachmenttypes %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% edit_allowed = User.current.allowed_to?(:manage_files, @project) %> - + + diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb index 06aae404..01c57c49 100644 --- a/app/views/files/_sort_by_attachtypel.html.erb +++ b/app/views/files/_sort_by_attachtypel.html.erb @@ -3,73 +3,69 @@ <% attachmenttypes = @project.attachmenttypes %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% edit_allowed = User.current.allowed_to?(:manage_files, @project) %> -
- -
+ + diff --git a/app/views/files/getattachtype.js.erb b/app/views/files/getattachtype.js.erb index fe8458e2..3bc9863b 100644 --- a/app/views/files/getattachtype.js.erb +++ b/app/views/files/getattachtype.js.erb @@ -1,5 +1,5 @@ - <% if @attachtype==0 && @contenttype==l(:attachment_all)%> - $("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>'); - <%else%> - $("#all_browse_div").html('<%= j(render partial: "sort_by_attachtypel")%>'); - <%end%> +<% if @attachtype==0 && @contenttype=='0' %> +$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>'); +<%else%> +$("#all_browse_div").html('<%= j(render partial: "sort_by_attachtypel")%>'); +<%end%> diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 0d9a3a21..978b4420 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,205 +1,34 @@ <% attachmenttypes = @project.attachmenttypes %> <% sufixtypes = @project.contenttypes %> - - -<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区 +<%= (@project.project_type == 1) ? t(:label_user_course) : t(:label_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) %>
<%#= link_to('上传文件', new_project_file_path(@project), :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %> - <%= 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_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)) +options_from_collection_for_select(attachmenttypes, "id", "typeName"), - :onchange=>"attachmenttypes_searchex(this.value)"%> - <% end %> - <% if sufixtypes.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)) +options_for_select(sufixtypes), - :onchange=>"attachment_contenttypes_searchex(this.value)"%> + + <%= select_tag "attach_sufix_browse", content_tag(:option, l(:attachment_all), :value => '0') +options_for_select(sufixtypes), + :onchange => "attachment_contenttypes_searchex(this.value)" %> <% end %> -