diff --git a/app/views/dmsf/_custom_fields.html.erb b/app/views/dmsf/_custom_fields.html.erb index 7b709470..6e5ab581 100644 --- a/app/views/dmsf/_custom_fields.html.erb +++ b/app/views/dmsf/_custom_fields.html.erb @@ -24,10 +24,12 @@ <% if object %>
<% object.show_custom_field_values.each do |custom_value| %> -

- <%= label_tag('', h(custom_value.custom_field.name)) %> - <%= show_value custom_value %> -

+
+ <%= content_tag :div, h(custom_value.custom_field.name), :class => 'label' %> +
+ <%= show_value custom_value %> +
+
<% end %>
<% end %> \ No newline at end of file diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index a90a5115..ba418661 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -26,36 +26,38 @@
<% if User.current.allowed_to?(:file_manipulation, @project) %> - <% if !@file.locked? %> - <%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file), - :title => l(:title_lock_file), :class => 'icon icon-lock') %> + <% unless @file.locked_for_user? %> + <% unless @file.locked? %> + <%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file), + :title => l(:title_lock_file), :class => 'icon dmsf_icon-lock') %> + <% else %> + <%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file), + :title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock') %> + <% end %> <% if @file.notification %> <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_files_path(:id => @file), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-email') %> + :class => 'icon dmsf_icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_files_path(:id => @file), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-email-add') %> + :class => 'icon dmsf_icon-notification-off') %> + <% end %> + <%= link_to(l(:label_link_to), + new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @file.dmsf_folder ? @file.dmsf_folder.id : nil, :dmsf_file_id => @file.id, :type => 'link_to'), + :title => l(:title_create_link), + :class => 'icon dmsf_icon-link') %> + <%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(:id => @file), + :title => l(:title_copy), :class => 'icon icon-copy') %> + <%= delete_link(dmsf_file_path(:id => @file, :details => true)) if @file_delete_allowed %> + <% else %> + <% if User.current.allowed_to?(:force_file_unlock, @project) %> + <%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file), + :title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%> <% end %> - <% elsif (!@file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) %> - <%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file), - :title => l(:title_unlock_file), :class => 'icon icon-unlock') %> <% end %> - <%= link_to(l(:label_link_to), - new_dmsf_link_path(:project_id => @project.id, - :dmsf_folder_id => @file.dmsf_folder ? @file.dmsf_folder.id : nil, - :dmsf_file_id => @file.id, - :type => 'link_to'), - :title => l(:title_create_link), - :class => 'icon icon-link') %> - <%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(:id => @file), - :title => l(:title_copy), :class => 'icon icon-copy') %> - <% if !@file.locked? && @file_delete_allowed %> - <%= delete_link(dmsf_file_path(:id => @file, :details => true)) %> - <% end %> <% end %>
@@ -79,20 +81,16 @@
- <%= link_to_function '', "$('#revision_access-#{revision.id}').toggle()", - :title => l(:title_download_entries), - :class => 'icon icon-downloads' - %> - <%= link_to '', view_dmsf_file_path(@file, :download => revision), - :title => l(:title_title_version_version_download, :title => h(revision.title), :version => revision.version), - :class => 'icon icon-download' - %> - <% if @file_delete_allowed && !@file.locked? && (@file.dmsf_file_revisions.visible.count > 1) %> - <%= link_to '', delete_revision_path(revision), - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:title_delete_revision), - :class => 'icon icon-delete' %> - <% end %> + <%= link_to_function image_tag('rev_downloads.png', :plugin => 'redmine_dmsf'), + "$('#revision_access-#{revision.id}').toggle()", + :title => l(:title_download_entries) %> + <%= link_to image_tag('rev_download.png', :plugin => 'redmine_dmsf'), + view_dmsf_file_path(@file, :download => revision), + :title => l(:title_title_version_version_download, :title => h(revision.title), :version => revision.version) %> + <%= link_to image_tag('rev_delete.png', :plugin => 'redmine_dmsf'), + delete_revision_path(revision), + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:title_delete_revision) if @file_delete_allowed && (@file.dmsf_file_revisions.visible.count > 1) %>
<%= l(:info_revision, :rev => revision.id) %> <%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %> @@ -103,61 +101,64 @@
-

- <%= label_tag('', l(:label_title)) %> - <%= h(revision.title) %> -

+
+ <%= content_tag :div, l(:label_title), :class => 'label' %> + <%= content_tag :div, h(revision.title), :class => 'value' %> +
<% if revision.description.present? %> -

- <%= label_tag('', l(:label_description)) %> -

- <%= textilizable(revision.description) %> -
-

+
+ <%= content_tag :div, l(:label_description), :class => 'label' %> + <%= content_tag :div, textilizable(revision.description), :class => 'wiki, value' %> +
<% end %> -

- <%= label_tag('', l(:label_dmsf_version)) %> - <%= revision.major_version %>.<%= revision.minor_version %> -

-

- <%= label_tag('', l(:label_size)) %> - <%= number_to_human_size(revision.size) %> -

+
+ <%= content_tag :div, l(:label_dmsf_version), :class => 'label' %> + <%= content_tag :div, "#{revision.major_version}.#{revision.minor_version}", :class => 'value' %> +
+
+ <%= content_tag :div, l(:label_size), :class => 'label' %> + <%= content_tag :div, number_to_human_size(revision.size), :class => 'value' %> +
<% wf = DmsfWorkflow.find_by_id(revision.dmsf_workflow_id) %> <% if wf %> -

- <%= label_tag('', l(:link_workflow)) %> - <%= "#{wf.name} - " %> - <%= link_to(revision.workflow_str(false), - log_dmsf_workflow_path(:project_id => @project.id, - :id => wf.id, :dmsf_file_revision_id => revision.id), - :title => revision.workflow_tooltip, - :remote => true) %> -

+
+ <%= content_tag :div, l(:label_workflow), :class => 'label' %> +
+ <%= "#{wf.name} - " %> + <%= link_to(revision.workflow_str(false), + log_dmsf_workflow_path(:project_id => @project.id, + :id => wf.id, :dmsf_file_revision_id => revision.id), + :title => revision.workflow_tooltip, + :remote => true) %> +
+
<% end %> <% if revision.comment.present? %> -

- <%= label_tag('', l(:label_comment)) %> -

- <%= textilizable(revision.comment) %> -
-

+
+ <%= content_tag :div, l(:label_comment), :class => 'label' %> + <%= content_tag :div, textilizable(revision.comment), :class => 'value wiki' %> +
<% end %>
-

- <%= label_tag('', l(:label_file)) %> - <%= (h("#{revision.dmsf_file.dmsf_folder.dmsf_path_str}/")) if revision.dmsf_file.dmsf_folder %><%= h(revision.name) %> -

-

- <%= label_tag('', l(:label_mime)) %> - <%= h(revision.mime_type) %> -

+
+ <%= content_tag :div, l(:label_file), :class => 'label' %> +
+ <% if revision.dmsf_file.dmsf_folder %> + <%= (h("#{revision.dmsf_file.dmsf_folder.dmsf_path_str}/")) %> + <% end %> + <%= h(revision.name) %> +
+
+
+ <%= content_tag :div, l(:label_mime), :class => 'label' %> + <%= content_tag :div, revision.mime_type, :class => 'value' %> +
<% if revision.digest.present? %> -

- <%= label_tag('', 'MD5') %> - <%= revision.digest %> -

+
+ <%= content_tag :div, 'MD5', :class => 'label' %> + <%= content_tag :div, revision.digest, :class => 'value wiki' %> +
<% end %> <%= render 'dmsf/custom_fields', :object => revision %>
@@ -173,6 +174,18 @@ <%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %> - <% if @revision.valid? && @file.valid? %>