diff --git a/app/helpers/dmsf_helper.rb b/app/helpers/dmsf_helper.rb index 9020c9be..2d3a1a4c 100644 --- a/app/helpers/dmsf_helper.rb +++ b/app/helpers/dmsf_helper.rb @@ -59,10 +59,11 @@ module DmsfHelper extension = File.extname(filename) extension = extension[1, extension.length-1] if File.exist?("#{File.dirname(__FILE__)}/../../assets/images/filetypes/#{extension}.png") - "filetype-#{extension}"; + cls = "filetype-#{extension}"; else - Redmine::MimeType.css_class_of(filename) + cls = Redmine::MimeType.css_class_of(filename) end + cls + ' dmsf-icon-file' end def plugin_asset_path(plugin, asset_type, source) diff --git a/app/views/dmsf/_dir.html.erb b/app/views/dmsf/_dir.html.erb index 8edf4824..534dfb15 100644 --- a/app/views/dmsf/_dir.html.erb +++ b/app/views/dmsf/_dir.html.erb @@ -83,45 +83,45 @@ <% if @folder_manipulation_allowed && !(subfolder && subfolder.system) %> <% if subfolder && subfolder.locked? %> - + <% if subfolder.unlockable? && (!subfolder.locked_for_user? || @force_file_unlock_allowed) %> <%= link_to('', unlock_dmsf_path(:id => project, :folder_id => subfolder), :title => subfolder.get_locked_title, - :class => 'icon icon-unlock') %> + :class => 'icon-only icon-unlock') %> <% else %> - + <% end %> <% else %> <% if subfolder %> <%= link_to('', edit_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:link_edit, :title => h(subfolder.title)), - :class => 'icon icon-edit') %> + :class => 'icon-only icon-edit') %> <% else %> <%= link_to('', edit_root_dmsf_path(:id => @project), :title => l(:link_edit, :title => l(:link_documents)), - :class => 'icon icon-edit') %> + :class => 'icon-only icon-edit') %> <% end %> <% if subfolder %> <%= link_to('', lock_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_lock_file), - :class => 'icon icon-lock') %> + :class => 'icon-only icon-lock') %> <% else %> - + <% end %> <% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %> <%= link_to('', notify_deactivate_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-email') %> + :class => 'icon-only icon-email') %> <% else %> <%= link_to('', notify_activate_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-email-add') %> + :class => 'icon-only icon-email-add') %> <% end %> <%= link_to('', link ? dmsf_link_path(link) : delete_dmsf_path(:id => project, :folder_id => subfolder), :data => {:confirm => l(:text_are_you_sure)}, :title => l(:title_delete), :method => :delete, - :class => 'icon icon-del') %> + :class => 'icon-only icon-del') %> <% end %> <% end %> diff --git a/app/views/dmsf/_dir_trash.html.erb b/app/views/dmsf/_dir_trash.html.erb index 6ccde20e..12760578 100644 --- a/app/views/dmsf/_dir_trash.html.erb +++ b/app/views/dmsf/_dir_trash.html.erb @@ -69,19 +69,19 @@ <% if @folder_manipulation_allowed %> <%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_path(:id => project, :folder_id => subfolder), :title => l(:title_restore), - :class => 'icon icon-cancel') %> + :class => 'icon-only icon-cancel') %> <% if link %> <%= link_to('', dmsf_link_path(:id => link, :commit => 'yes'), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:title_delete), - :class => 'icon icon-delete') %> + :class => 'icon-only icon-delete') %> <% else %> <%= link_to('', delete_dmsf_path(:id => project, :folder_id => subfolder, :commit => 'yes'), :data => {:confirm => l(:text_are_you_sure)}, :title => l(:title_delete), :method => :delete, - :class => 'icon icon-delete') %> + :class => 'icon-only icon-delete') %> <% end %> <% end %> diff --git a/app/views/dmsf/_file.html.erb b/app/views/dmsf/_file.html.erb index 16669a7f..c63d87f6 100644 --- a/app/views/dmsf/_file.html.erb +++ b/app/views/dmsf/_file.html.erb @@ -89,48 +89,48 @@ <% if @file_manipulation_allowed %> <%= link_to('', dmsf_file_path(:id => file), :title => l(:link_details, :title => h(file.last_revision.title)), - :class => 'icon icon-edit') %> + :class => 'icon-only icon-edit') %> <% if !file.locked? %> <%= link_to('', lock_dmsf_files_path(:id => file), :title => l(:title_lock_file), - :class => 'icon icon-lock') %> + :class => 'icon-only icon-lock') %> <% elsif file.unlockable? && (!file.locked_for_user? || @force_file_unlock_allowed) %> <%= link_to('', unlock_dmsf_files_path(:id => file), :title => file.get_locked_title, - :class => 'icon icon-unlock') %> + :class => 'icon-only icon-unlock') %> <% else %> - + <% end %> <% unless file.locked? %> <% if file.notification %> <%= link_to('', notify_deactivate_dmsf_files_path(:id => file), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-email') %> + :class => 'icon-only icon-email') %> <% else %> <%= link_to('', notify_activate_dmsf_files_path(:id => file), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-email-add') %> + :class => 'icon-only icon-email-add') %> <% end %> <% if link %> <%= link_to('', dmsf_link_path(link), :data => {:confirm => l(:text_are_you_sure)}, :title => l(:title_delete), :method => :delete, - :class => 'icon icon-del') %> + :class => 'icon-only icon-del') %> <% else %> <% if @file_delete_allowed %> <%= link_to('', dmsf_file_path(:id => file), :data => {:confirm => l(:text_are_you_sure)}, :title => l(:title_delete), :method => :delete, - :class => 'icon icon-del') %> + :class => 'icon-only icon-del') %> <% else %> - + <% end %> <% end %> <% else %> - - + + <% end %> <% end %> <%= render(:partial => 'dmsf_files/approval_workflow_button', diff --git a/app/views/dmsf/_file_trash.html.erb b/app/views/dmsf/_file_trash.html.erb index a3635e6c..5844678f 100644 --- a/app/views/dmsf/_file_trash.html.erb +++ b/app/views/dmsf/_file_trash.html.erb @@ -69,14 +69,14 @@ <% if @file_manipulation_allowed %> <%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_file_path(:id => file), :title => l(:title_restore), - :class => 'icon icon-cancel') %> + :class => 'icon-only icon-cancel') %> <% end %> <% if @file_delete_allowed %> <%= link_to('', link ? dmsf_link_path(:id => link, :commit => 'yes') : dmsf_file_path(:id => file, :commit => 'yes'), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:title_delete), - :class => 'icon icon-delete') %> + :class => 'icon-only icon-delete') %> <% end %> 1 diff --git a/app/views/dmsf_files/_link.html.erb b/app/views/dmsf_files/_link.html.erb index 8a884fea..0278770e 100644 --- a/app/views/dmsf_files/_link.html.erb +++ b/app/views/dmsf_files/_link.html.erb @@ -46,36 +46,36 @@ <% if User.current.allowed_to? :file_manipulation, dmsf_file.project %> <%= link_to('', dmsf_file_path(:id => dmsf_file), :title => l(:link_details, :title => h(dmsf_file.last_revision.title)), - :class => 'icon icon-edit') %> + :class => 'icon-only icon-edit') %> <% else %> - + <% end %> <% # Email %> <%= link_to('', entries_operations_dmsf_path(:id => dmsf_file.project, :email_entries => 'email', :files => [dmsf_file.id]), :method => :post, :title => l(:heading_send_documents_by_email), - :class => 'icon icon-email-disabled') %> + :class => 'icon-only icon-email-disabled') %> <% # Lock %> <% if !dmsf_file.locked? %> <%= link_to('', lock_dmsf_files_path(:id => dmsf_file), :title => l(:title_lock_file), - :class => 'icon icon-lock') %> + :class => 'icon-only icon-lock') %> <% elsif dmsf_file.unlockable? && (!dmsf_file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, dmsf_file.project)) %> <%= link_to('', unlock_dmsf_files_path(:id => dmsf_file), :title => dmsf_file.get_locked_title, - :class => 'icon icon-unlock') %> + :class => 'icon-only icon-unlock') %> <% else %> - + <% end %> <% unless dmsf_file.locked? %> <% # Notifications %> <% if dmsf_file.notification %> <%= link_to('', notify_deactivate_dmsf_files_path(:id => dmsf_file), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-email') %> + :class => 'icon-only icon-email') %> <% else %> <%= link_to('', notify_activate_dmsf_files_path(:id => dmsf_file), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-email-add') %> + :class => 'icon-only icon-email-add') %> <% end %> <% # Delete %> <% if @issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project) %> @@ -84,11 +84,11 @@ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:title_delete), - :class => 'icon icon-del') %> + :class => 'icon-only icon-del') %> <% end %> <% else %> - - + + <% end %> <% # Approval workflow %> <% wf = DmsfWorkflow.find_by_id(dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %> diff --git a/assets/stylesheets/redmine_dmsf.css b/assets/stylesheets/redmine_dmsf.css index c5959ce3..1bcfba2c 100644 --- a/assets/stylesheets/redmine_dmsf.css +++ b/assets/stylesheets/redmine_dmsf.css @@ -206,6 +206,11 @@ div.dmsf_revision_inner_box .attribute .label { .icon-approvalworkflows { background-image: url(../../../images/ticket_go.png); } /* File types */ +.dmsf-icon-file{ + display: inline-block; + height: 16px; +} + .dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); } .dmsf_system .icon-folder { background-image: url(../images/folder_system.png); } .dmsf_system_closed .icon-folder { background-image: url(../images/folder_system_closed.png); }