diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 98e31f87..ad207adf 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -1,3 +1,5 @@ +<% selAttachType =@attachtype %> +<% selContentType =@contenttype %> <% attachmenttypes = @project.attachmenttypes %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% edit_allowed = User.current.allowed_to?(:manage_files, @project) %> @@ -35,7 +37,14 @@ <%= 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;" %> <%= format_time(file.created_on) %> <%= number_to_human_size(file.filesize) %> - <%= file.attachmentstype.typeName %> + +
<%= file.attachmentstype.typeName %>
+   +
+ <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, + :attachment => file,:contentype=>selContentType} %> +
+ <%= file.show_suffix_type %> <%= file.downloads %> diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb index 85250250..06aae404 100644 --- a/app/views/files/_sort_by_attachtypel.html.erb +++ b/app/views/files/_sort_by_attachtypel.html.erb @@ -41,7 +41,6 @@ <%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file,:contentype=>selContentType} %> - <%= file.show_suffix_type %> <%= file.downloads %> diff --git a/config/routes.rb b/config/routes.rb index b7e6dceb..c743c215 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -457,7 +457,11 @@ RedmineApp::Application.routes.draw do match 'attachments/autocomplete', :to => 'attachments#autocomplete', via: [:post] post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation' post 'attachments/updateType/:attachmentid/:newtype' ,:to => 'attachments#updateType', :attachmentid => /\d+/, :newtype => /.*/ - resources :attachments, :only => [:show, :destroy] + resources :attachments, :only => [:show, :destroy] do + collection do + match "updateType" , via: [:get, :post] + end + end resources :groups do member do