1.修正错误

2.添加全部资源视图时的对资源分类的编辑
This commit is contained in:
nwb 2014-05-14 15:16:11 +08:00
parent 4136cd27c8
commit c0c184d8bf
3 changed files with 15 additions and 3 deletions

View File

@ -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 @@
<td class="filename" style="font-size: 13px; width: 240px; "><%= 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;" %></td>
<td class="created_on"><%= format_time(file.created_on) %></td>
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="attach_type"><%= file.attachmentstype.typeName %></td>
<td class="attach_type">
<div id="attach_type_id_label<%= file.id %>" style="white-space:nowrap;"><%= file.attachmentstype.typeName %></div>
&nbsp;
<div id="attach_type_id_edit<%= file.id %>" style="white-space:nowrap;">
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
:attachment => file,:contentype=>selContentType} %>
</div>
</td>
<td class="content_type"><%= file.show_suffix_type %></td>
<td class="downloads"><%= file.downloads %></td>
<!-- <td class="digest" width="300px"><%= file.description %></td> -->

View File

@ -41,7 +41,6 @@
<%= render :partial => 'attachments/type_edit', :locals => {:attachmenttypes => attachmenttypes,
:attachment => file,:contentype=>selContentType} %>
</div>
</td>
<td class="content_type"><%= file.show_suffix_type %></td>
<td class="downloads"><%= file.downloads %></td>

View File

@ -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