only-icons
This commit is contained in:
parent
54158eb9db
commit
20efe84ad1
@ -59,10 +59,11 @@ module DmsfHelper
|
|||||||
extension = File.extname(filename)
|
extension = File.extname(filename)
|
||||||
extension = extension[1, extension.length-1]
|
extension = extension[1, extension.length-1]
|
||||||
if File.exist?("#{File.dirname(__FILE__)}/../../assets/images/filetypes/#{extension}.png")
|
if File.exist?("#{File.dirname(__FILE__)}/../../assets/images/filetypes/#{extension}.png")
|
||||||
"filetype-#{extension}";
|
cls = "filetype-#{extension}";
|
||||||
else
|
else
|
||||||
Redmine::MimeType.css_class_of(filename)
|
cls = Redmine::MimeType.css_class_of(filename)
|
||||||
end
|
end
|
||||||
|
cls + ' dmsf-icon-file'
|
||||||
end
|
end
|
||||||
|
|
||||||
def plugin_asset_path(plugin, asset_type, source)
|
def plugin_asset_path(plugin, asset_type, source)
|
||||||
|
|||||||
@ -83,45 +83,45 @@
|
|||||||
<td class="dmsf_buttons">
|
<td class="dmsf_buttons">
|
||||||
<% if @folder_manipulation_allowed && !(subfolder && subfolder.system) %>
|
<% if @folder_manipulation_allowed && !(subfolder && subfolder.system) %>
|
||||||
<% if subfolder && subfolder.locked? %>
|
<% if subfolder && subfolder.locked? %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% if subfolder.unlockable? && (!subfolder.locked_for_user? || @force_file_unlock_allowed) %>
|
<% if subfolder.unlockable? && (!subfolder.locked_for_user? || @force_file_unlock_allowed) %>
|
||||||
<%= link_to('', unlock_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', unlock_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => subfolder.get_locked_title,
|
:title => subfolder.get_locked_title,
|
||||||
:class => 'icon icon-unlock') %>
|
:class => 'icon-only icon-unlock') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon icon-unlock" title="<%= subfolder.get_locked_title %>"></span>
|
<span class="icon-only icon-unlock" title="<%= subfolder.get_locked_title %>"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if subfolder %>
|
<% if subfolder %>
|
||||||
<%= link_to('', edit_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', edit_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => l(:link_edit, :title => h(subfolder.title)),
|
:title => l(:link_edit, :title => h(subfolder.title)),
|
||||||
:class => 'icon icon-edit') %>
|
:class => 'icon-only icon-edit') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('', edit_root_dmsf_path(:id => @project),
|
<%= link_to('', edit_root_dmsf_path(:id => @project),
|
||||||
:title => l(:link_edit, :title => l(:link_documents)),
|
:title => l(:link_edit, :title => l(:link_documents)),
|
||||||
:class => 'icon icon-edit') %>
|
:class => 'icon-only icon-edit') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if subfolder %>
|
<% if subfolder %>
|
||||||
<%= link_to('', lock_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', lock_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => l(:title_lock_file),
|
:title => l(:title_lock_file),
|
||||||
:class => 'icon icon-lock') %>
|
:class => 'icon-only icon-lock') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %>
|
<% if (subfolder && subfolder.notification) || (!subfolder && project.dmsf_notification) %>
|
||||||
<%= link_to('', notify_deactivate_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', notify_deactivate_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => l(:title_notifications_active_deactivate),
|
:title => l(:title_notifications_active_deactivate),
|
||||||
:class => 'icon icon-email') %>
|
:class => 'icon-only icon-email') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('', notify_activate_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', notify_activate_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => l(:title_notifications_not_active_activate),
|
:title => l(:title_notifications_not_active_activate),
|
||||||
:class => 'icon icon-email-add') %>
|
:class => 'icon-only icon-email-add') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to('', link ? dmsf_link_path(link) : delete_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', link ? dmsf_link_path(link) : delete_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'icon icon-del') %>
|
:class => 'icon-only icon-del') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -69,19 +69,19 @@
|
|||||||
<% if @folder_manipulation_allowed %>
|
<% if @folder_manipulation_allowed %>
|
||||||
<%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_path(:id => project, :folder_id => subfolder),
|
<%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_path(:id => project, :folder_id => subfolder),
|
||||||
:title => l(:title_restore),
|
:title => l(:title_restore),
|
||||||
:class => 'icon icon-cancel') %>
|
:class => 'icon-only icon-cancel') %>
|
||||||
<% if link %>
|
<% if link %>
|
||||||
<%= link_to('', dmsf_link_path(:id => link, :commit => 'yes'),
|
<%= link_to('', dmsf_link_path(:id => link, :commit => 'yes'),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:class => 'icon icon-delete') %>
|
:class => 'icon-only icon-delete') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('', delete_dmsf_path(:id => project, :folder_id => subfolder, :commit => 'yes'),
|
<%= link_to('', delete_dmsf_path(:id => project, :folder_id => subfolder, :commit => 'yes'),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'icon icon-delete') %>
|
:class => 'icon-only icon-delete') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -89,48 +89,48 @@
|
|||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<%= link_to('', dmsf_file_path(:id => file),
|
<%= link_to('', dmsf_file_path(:id => file),
|
||||||
:title => l(:link_details, :title => h(file.last_revision.title)),
|
:title => l(:link_details, :title => h(file.last_revision.title)),
|
||||||
:class => 'icon icon-edit') %>
|
:class => 'icon-only icon-edit') %>
|
||||||
<% if !file.locked? %>
|
<% if !file.locked? %>
|
||||||
<%= link_to('', lock_dmsf_files_path(:id => file),
|
<%= link_to('', lock_dmsf_files_path(:id => file),
|
||||||
:title => l(:title_lock_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) %>
|
<% elsif file.unlockable? && (!file.locked_for_user? || @force_file_unlock_allowed) %>
|
||||||
<%= link_to('', unlock_dmsf_files_path(:id => file),
|
<%= link_to('', unlock_dmsf_files_path(:id => file),
|
||||||
:title => file.get_locked_title,
|
:title => file.get_locked_title,
|
||||||
:class => 'icon icon-unlock') %>
|
:class => 'icon-only icon-unlock') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon icon-unlock" title="<%= file.get_locked_title %>"></span>
|
<span class="icon-only icon-unlock" title="<%= file.get_locked_title %>"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless file.locked? %>
|
<% unless file.locked? %>
|
||||||
<% if file.notification %>
|
<% if file.notification %>
|
||||||
<%= link_to('', notify_deactivate_dmsf_files_path(:id => file),
|
<%= link_to('', notify_deactivate_dmsf_files_path(:id => file),
|
||||||
:title => l(:title_notifications_active_deactivate),
|
:title => l(:title_notifications_active_deactivate),
|
||||||
:class => 'icon icon-email') %>
|
:class => 'icon-only icon-email') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('', notify_activate_dmsf_files_path(:id => file),
|
<%= link_to('', notify_activate_dmsf_files_path(:id => file),
|
||||||
:title => l(:title_notifications_not_active_activate),
|
:title => l(:title_notifications_not_active_activate),
|
||||||
:class => 'icon icon-email-add') %>
|
:class => 'icon-only icon-email-add') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if link %>
|
<% if link %>
|
||||||
<%= link_to('', dmsf_link_path(link),
|
<%= link_to('', dmsf_link_path(link),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'icon icon-del') %>
|
:class => 'icon-only icon-del') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @file_delete_allowed %>
|
<% if @file_delete_allowed %>
|
||||||
<%= link_to('', dmsf_file_path(:id => file),
|
<%= link_to('', dmsf_file_path(:id => file),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'icon icon-del') %>
|
:class => 'icon-only icon-del') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= render(:partial => 'dmsf_files/approval_workflow_button',
|
<%= render(:partial => 'dmsf_files/approval_workflow_button',
|
||||||
|
|||||||
@ -69,14 +69,14 @@
|
|||||||
<% if @file_manipulation_allowed %>
|
<% if @file_manipulation_allowed %>
|
||||||
<%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_file_path(:id => file),
|
<%= link_to('', link ? restore_dmsf_link_path(:id => link) : restore_dmsf_file_path(:id => file),
|
||||||
:title => l(:title_restore),
|
:title => l(:title_restore),
|
||||||
:class => 'icon icon-cancel') %>
|
:class => 'icon-only icon-cancel') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @file_delete_allowed %>
|
<% if @file_delete_allowed %>
|
||||||
<%= link_to('', link ? dmsf_link_path(:id => link, :commit => 'yes') : dmsf_file_path(:id => file, :commit => 'yes'),
|
<%= link_to('', link ? dmsf_link_path(:id => link, :commit => 'yes') : dmsf_file_path(:id => file, :commit => 'yes'),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:class => 'icon icon-delete') %>
|
:class => 'icon-only icon-delete') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="hol">1</td>
|
<td class="hol">1</td>
|
||||||
|
|||||||
@ -46,36 +46,36 @@
|
|||||||
<% if User.current.allowed_to? :file_manipulation, dmsf_file.project %>
|
<% if User.current.allowed_to? :file_manipulation, dmsf_file.project %>
|
||||||
<%= link_to('', dmsf_file_path(:id => dmsf_file),
|
<%= link_to('', dmsf_file_path(:id => dmsf_file),
|
||||||
:title => l(:link_details, :title => h(dmsf_file.last_revision.title)),
|
:title => l(:link_details, :title => h(dmsf_file.last_revision.title)),
|
||||||
:class => 'icon icon-edit') %>
|
:class => 'icon-only icon-edit') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% # Email %>
|
<% # Email %>
|
||||||
<%= link_to('', entries_operations_dmsf_path(:id => dmsf_file.project, :email_entries => 'email', :files => [dmsf_file.id]), :method => :post,
|
<%= 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),
|
:title => l(:heading_send_documents_by_email),
|
||||||
:class => 'icon icon-email-disabled') %>
|
:class => 'icon-only icon-email-disabled') %>
|
||||||
<% # Lock %>
|
<% # Lock %>
|
||||||
<% if !dmsf_file.locked? %>
|
<% if !dmsf_file.locked? %>
|
||||||
<%= link_to('', lock_dmsf_files_path(:id => dmsf_file),
|
<%= link_to('', lock_dmsf_files_path(:id => dmsf_file),
|
||||||
:title => l(:title_lock_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)) %>
|
<% 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),
|
<%= link_to('', unlock_dmsf_files_path(:id => dmsf_file),
|
||||||
:title => dmsf_file.get_locked_title,
|
:title => dmsf_file.get_locked_title,
|
||||||
:class => 'icon icon-unlock') %>
|
:class => 'icon-only icon-unlock') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon icon-unlock" title="<%= dmsf_file.get_locked_title %>"></span>
|
<span class="icon-only icon-unlock" title="<%= dmsf_file.get_locked_title %>"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless dmsf_file.locked? %>
|
<% unless dmsf_file.locked? %>
|
||||||
<% # Notifications %>
|
<% # Notifications %>
|
||||||
<% if dmsf_file.notification %>
|
<% if dmsf_file.notification %>
|
||||||
<%= link_to('', notify_deactivate_dmsf_files_path(:id => dmsf_file),
|
<%= link_to('', notify_deactivate_dmsf_files_path(:id => dmsf_file),
|
||||||
:title => l(:title_notifications_active_deactivate),
|
:title => l(:title_notifications_active_deactivate),
|
||||||
:class => 'icon icon-email') %>
|
:class => 'icon-only icon-email') %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to('', notify_activate_dmsf_files_path(:id => dmsf_file),
|
<%= link_to('', notify_activate_dmsf_files_path(:id => dmsf_file),
|
||||||
:title => l(:title_notifications_not_active_activate),
|
:title => l(:title_notifications_not_active_activate),
|
||||||
:class => 'icon icon-email-add') %>
|
:class => 'icon-only icon-email-add') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% # Delete %>
|
<% # Delete %>
|
||||||
<% if @issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project) %>
|
<% if @issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project) %>
|
||||||
@ -84,11 +84,11 @@
|
|||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:title => l(:title_delete),
|
:title => l(:title_delete),
|
||||||
:class => 'icon icon-del') %>
|
:class => 'icon-only icon-del') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<span class="icon"></span>
|
<span class="icon-only"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% # Approval workflow %>
|
<% # Approval workflow %>
|
||||||
<% wf = DmsfWorkflow.find_by_id(dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %>
|
<% wf = DmsfWorkflow.find_by_id(dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %>
|
||||||
|
|||||||
@ -206,6 +206,11 @@ div.dmsf_revision_inner_box .attribute .label {
|
|||||||
.icon-approvalworkflows { background-image: url(../../../images/ticket_go.png); }
|
.icon-approvalworkflows { background-image: url(../../../images/ticket_go.png); }
|
||||||
|
|
||||||
/* File types */
|
/* File types */
|
||||||
|
.dmsf-icon-file{
|
||||||
|
display: inline-block;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); }
|
.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); }
|
||||||
.dmsf_system .icon-folder { background-image: url(../images/folder_system.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); }
|
.dmsf_system_closed .icon-folder { background-image: url(../images/folder_system_closed.png); }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user