diff --git a/app/views/dmsf/_dir.html.erb b/app/views/dmsf/_dir.html.erb index 0c543231..8f0477fb 100644 --- a/app/views/dmsf/_dir.html.erb +++ b/app/views/dmsf/_dir.html.erb @@ -23,19 +23,19 @@ <% locked_for_user = subfolder && subfolder.locked_for_user? %> <% locked = subfolder && subfolder.locked? %> -<%= check_box_tag(name, id, false, +<%= check_box_tag(name, id, false, :title => l(:title_check_for_zip_download_or_email), :id => "subfolder_#{id}") %> <%= link_to(h(title), dmsf_folder_path(:id => project, :folder_id => subfolder), :class => 'icon icon-folder') %> <% if link %> -
<%= link.path %>
+
<%= link.path %>
<% else %> -
[<%= subfolder.items %>]
+
[<%= subfolder.items %>]
<% end %> - + <%= format_time(subfolder.modified) if subfolder %> <% if locked_for_user %> <% if subfolder.lock.reverse[0].user %> @@ -51,9 +51,9 @@ :title => l(:title_locked_by_you)) %> <% end %> - - -<%= h(subfolder.user) if subfolder %> + + +<%= h(subfolder.user) if subfolder %> <% if @folder_manipulation_allowed %> <% unless locked_for_user %> @@ -106,7 +106,7 @@ <% end %> <% end %> -0 -0 -<%= subfolder.modified.to_i if subfolder %> -0 \ No newline at end of file +0 +0 +<%= subfolder.modified.to_i if subfolder %> +0 \ No newline at end of file diff --git a/app/views/dmsf/_dir_trash.html.erb b/app/views/dmsf/_dir_trash.html.erb index 6abda6b2..b7fa2906 100644 --- a/app/views/dmsf/_dir_trash.html.erb +++ b/app/views/dmsf/_dir_trash.html.erb @@ -3,7 +3,7 @@ # # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2011-15 Karel Pičman +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -20,25 +20,25 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> -<%= check_box_tag(name, id, false, +<%= check_box_tag(name, id, false, :title => l(:title_check_for_restore_or_delete), :id => "subfolder_#{id}") %> <%= content_tag(:span, h(title), :title => h(title), :class => 'icon icon-folder') %> <% if link %> -
<%= link.path %>
+
<%= link.path %>
<% else %> -
[<%= subfolder.items %>]
+
[<%= subfolder.items %>]
<% end %> - + <%= format_time(subfolder.modified) if subfolder %> - - -<%= h(subfolder.user) %> + + +<%= h(subfolder.user) %> <% if @folder_manipulation_allowed %> <%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'), @@ -50,7 +50,7 @@ :title => l(:title_delete)) %> <% end %> -0 -0 -<%= subfolder.modified.to_i if subfolder %> -0 \ No newline at end of file +0 +0 +<%= subfolder.modified.to_i if subfolder %> +0 \ No newline at end of file diff --git a/app/views/dmsf/_file.html.erb b/app/views/dmsf/_file.html.erb index e4e36679..dad536fc 100644 --- a/app/views/dmsf/_file.html.erb +++ b/app/views/dmsf/_file.html.erb @@ -22,7 +22,7 @@ <% wf = DmsfWorkflow.find_by_id(file.last_revision.dmsf_workflow_id) %> -<%= check_box_tag(name, id, false, +<%= check_box_tag(name, id, false, :title => l(:title_check_for_zip_download_or_email), :id => "file_#{id}") %> <% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %> @@ -32,9 +32,9 @@ :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version), 'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %> -
<%= h(link ? link.path : file.display_name) %>
+
<%= h(link ? link.path : file.display_name) %>
-<%= number_to_human_size(file.last_revision.size) %> +<%= number_to_human_size(file.last_revision.size) %> <%= format_time(file.last_revision.updated_at) %> <% if file.locked_for_user? %> @@ -51,8 +51,8 @@ :title => l(:title_locked_by_you)) %> <% end %> -<%= file.last_revision.version %> - +<%= file.last_revision.version %> + <% if wf && @file_approval_allowed %> <%= link_to( file.last_revision.workflow_str(false), @@ -66,7 +66,7 @@ <%= file.last_revision.workflow_str(false) %> <% end %> -<%= h(file.last_revision.user) %> +<%= h(file.last_revision.user) %> <% if @file_manipulation_allowed %> <%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'), @@ -160,7 +160,7 @@ title => l(:label_dmsf_wokflow_action_start)) %> <% end %> <% when DmsfWorkflow::STATE_REJECTED %> - <%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'), + <%= content_tag(:span, image_tag('rejected.png', :plugin => 'redmine_dmsf'), :title => l(:title_rejected)) %> <% else %> <% if @workflows_available && !file.locked_for_user? %> @@ -174,7 +174,7 @@ <% end %> <% end %> -1 -<%= file.last_revision.size %> -<%= file.last_revision.updated_at.to_i %> -<%= file.last_revision.iversion %> \ No newline at end of file +1 +<%= file.last_revision.size %> +<%= file.last_revision.updated_at.to_i %> +<%= file.last_revision.iversion %> \ No newline at end of file diff --git a/app/views/dmsf/_file_trash.html.erb b/app/views/dmsf/_file_trash.html.erb index 3a7f2d41..ad10954a 100644 --- a/app/views/dmsf/_file_trash.html.erb +++ b/app/views/dmsf/_file_trash.html.erb @@ -20,23 +20,23 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> -<%= check_box_tag(name, id, false, +<%= check_box_tag(name, id, false, :title => l(:title_check_for_restore_or_delete), :id => "file_#{id}") %> <%= content_tag(:span, h(title), :title => h(title), :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %> -
<%= h(link ? link.path : file.display_name) %>
+
<%= h(link ? link.path : file.display_name) %>
-<%= number_to_human_size(file.last_revision.size) %> +<%= number_to_human_size(file.last_revision.size) %> <%= format_time(file.last_revision.updated_at) %> -<%= file.last_revision.version %> - +<%= file.last_revision.version %> + <%= file.last_revision.workflow_str(false) %> -<%= h(file.last_revision.user) %> +<%= h(file.last_revision.user) %> <% if @file_manipulation_allowed %> <% if link %> @@ -60,7 +60,7 @@ <% end %> <% end %> -1 -<%= file.last_revision.size %> -<%= file.last_revision.updated_at.to_i %> -<%= file.last_revision.iversion %> \ No newline at end of file +1 +<%= file.last_revision.size %> +<%= file.last_revision.updated_at.to_i %> +<%= file.last_revision.iversion %> \ No newline at end of file diff --git a/app/views/dmsf/_url.html.erb b/app/views/dmsf/_url.html.erb index 921a51d6..6e9a1685 100644 --- a/app/views/dmsf/_url.html.erb +++ b/app/views/dmsf/_url.html.erb @@ -20,21 +20,21 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> - + <%= link_to(h(title), link.external_url, :target => '_blank', - :class => 'icon icon-link') %> -
+ :class => 'icon dmsf_icon-link') %> +
<%= link.external_url %>
- + <%= format_time(link.updated_at) %> - - -<%= h(link.user) %> + + +<%= h(link.user) %> @@ -49,7 +49,7 @@ <% end %> -1 - -link.updated_at.to_i - \ No newline at end of file +1 + +link.updated_at.to_i + \ No newline at end of file diff --git a/app/views/dmsf/_url_trash.html.erb b/app/views/dmsf/_url_trash.html.erb index 02cab0a8..b89ca4f1 100644 --- a/app/views/dmsf/_url_trash.html.erb +++ b/app/views/dmsf/_url_trash.html.erb @@ -20,20 +20,20 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> -<%= check_box_tag(name, id, false, +<%= check_box_tag(name, id, false, :title => l(:title_check_for_restore_or_delete)) %> <%= link_to(h(title), link.external_url, - :target => "_blank", - :class => 'icon icon-link') %> -
<%= link.external_url %>
+ :target => '_blank', + :class => 'icon dmsf_icon-link') %> +
<%= link.external_url %>
- + <%= format_time(link.updated_at) %> - - -<%= h(link.user) %> + + +<%= h(link.user) %> <% if @file_manipulation_allowed %> <%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'), @@ -46,7 +46,7 @@ :title => l(:title_delete)) %> <% end %> -1 - -link.updated_at.to_i - \ No newline at end of file +1 + +link.updated_at.to_i + \ No newline at end of file diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index f1e96e49..eb3fbb44 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -30,26 +30,26 @@ <% unless @folder.locked? %> <%= link_to(l(:button_lock), lock_dmsf_path(:id => @project, :folder_id => @folder), - :title => l(:title_lock_file), :class => 'icon icon-dmsf-lock') %> + :title => l(:title_lock_file), :class => 'icon dmsf_icon-lock') %> <% else %> <%= link_to_if(@folder.unlockable?, l(:button_unlock), unlock_dmsf_path(:id => @project, :folder_id => @folder), - :title => l(:title_unlock_file), :class => 'icon icon-dmsf-unlock')%> + :title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%> <% end %> <% if @folder.notification %> <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-notification-on') %> + :class => 'icon dmsf_icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-notification-off') %> + :class => 'icon dmsf_icon-notification-off') %> <% end %> <%= link_to(l(:label_link_to), new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder.id, :type => 'link_to'), - :title => l(:title_create_link), :class => 'icon icon-link') %> + :title => l(:title_create_link), :class => 'icon dmsf_icon-link') %> <%= link_to(l(:button_copy), copy_folder_path(:id => @folder), :title => l(:title_copy), :class => 'icon icon-copy') %> <%= link_to(l(:button_delete), @@ -59,7 +59,7 @@ <% elsif @force_file_unlock_allowed %> <%= link_to_if(@folder.unlockable?, l(:button_unlock), unlock_dmsf_path(:id => @project, :folder_id => @folder), - :title => l(:title_unlock_file), :class => 'icon icon-dmsf-unlock')%> + :title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%> <% end %> <% end %>
diff --git a/app/views/dmsf/edit_root.html.erb b/app/views/dmsf/edit_root.html.erb index e76f87c8..7c33f1aa 100644 --- a/app/views/dmsf/edit_root.html.erb +++ b/app/views/dmsf/edit_root.html.erb @@ -30,12 +30,12 @@ <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-notification-on') %> + :class => 'icon dmsf_icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_path(:id => @project), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-notification-off') %> + :class => 'icon dmsf_icon-notification-off') %> <% end %> <% end %> diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index 4a8c91ba..a1c7ab41 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -39,28 +39,28 @@ <% if @folder.locked? %> <%= link_to_if(@folder.unlockable?, l(:button_unlock), unlock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url), - :title => l(:title_unlock_folder), :class => 'icon icon-dmsf-unlock') %> + :title => l(:title_unlock_folder), :class => 'icon dmsf_icon-unlock') %> <% else %> <%= link_to(l(:button_lock), lock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url), - :title => l(:title_lock_folder), :class => 'icon icon-dmsf-lock') %> + :title => l(:title_lock_folder), :class => 'icon dmsf_icon-lock') %> <% end %> <% end %> <% if !@locked_for_user && ((@folder && @folder.notification) || (!@folder && @project.dmsf_notification)) %> <%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_active_deactivate), - :class => 'icon icon-notification-on') %> + :class => 'icon dmsf_icon-notification-on') %> <% else %> <%= link_to(l(:label_notifications_on), notify_activate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_not_active_activate), - :class => 'icon icon-notification-off') %> + :class => 'icon dmsf_icon-notification-off') %> <% end %> <% if @file_manipulation_allowed && !@locked_for_user %> <%= link_to(l(:label_link_from), new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder ? @folder.id : @folder, :type => 'link_from'), - :title => l(:title_create_link), :class => 'icon icon-link') %> + :title => l(:title_create_link), :class => 'icon dmsf_icon-link') %> <% end %> <%= link_to(l(:link_create_folder), new_dmsf_path(:id => @project, :parent_id => @folder), @@ -85,7 +85,7 @@ <%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, :class => 'dmfs_entries', :id => 'entries_form') do %> <%= hidden_field_tag('action') %> -
+
<%= submit_tag(l(:button_download), :title => l(:title_download_checked), :name => 'download_entries') if @file_view_allowed %> <%= submit_tag(l(:field_mail), :title => l(:title_send_checked_by_email), :name => 'email_entries') if (@file_view_allowed && User.current.allowed_to?(:email_documents, @project)) %> <% if @file_delete_allowed%> @@ -94,30 +94,30 @@
<% values = @folder ? @folder.custom_field_values : @parent ? @parent.custom_field_values : DmsfFolder.new(:project => @project).custom_field_values %> <% unless values.empty? %> -
+
<%= custom_field_tag_with_label( :dmsf_folder, CustomValue.new(:custom_field_id => params[:custom_field_id].present? ? params[:custom_field_id] : values.first.custom_field_id, :value => params[:custom_value])) %>
<% end %>
- +
- - + - - - - - - - - - - - + + + + + + + + + + + @@ -138,7 +138,7 @@ <% Rails.logger.error "Error: dmsf_link id #{link.id} has no target!" %> <% next %> <% end %> - + <%= render(:partial => 'dir', :locals => { :project => link.target_project, @@ -169,7 +169,7 @@ <% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %> <% next %> <% end %> - + <%= render(:partial => 'file', :locals => { :project => link.target_project, :file => link.target_file, @@ -180,7 +180,7 @@ <% end %> <% @url_links.each do |link| %> - + <%= render(:partial => 'url', :locals => { :project => link.target_project, :file => link.target_file, @@ -242,7 +242,7 @@ { 'iDataSort': 11, 'aTargets': [ 4 ] } ], 'fnInitComplete': function() { - jQuery('div.controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]); + jQuery('div.dmsf_controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]); }, 'fnInfoCallback': function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) { return "<%= l(:label_number_of_folders)%>: <%= @subfolders.count + @dir_links.count %>, <%= l(:label_number_of_documents)%>: <%= @files.count + @file_links.count + @url_links.count %>"; diff --git a/app/views/dmsf/trash.html.erb b/app/views/dmsf/trash.html.erb index 081e5bb2..b34082b4 100644 --- a/app/views/dmsf/trash.html.erb +++ b/app/views/dmsf/trash.html.erb @@ -35,7 +35,7 @@ <%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post, :class => 'dmfs_entries', :id => 'entries_form') do %> <%= hidden_field_tag('action') %> -
+
<% if @file_manipulation_allowed && @folder_manipulation_allowed %> <%= submit_tag(l(:title_restore), :title => l(:title_restore_checked), :name => 'restore_entries') %> <% if @file_delete_allowed%> @@ -44,23 +44,23 @@ <% end %>
-
+
<%= l(:link_title) %><%= l(:link_size) %><%= l(:link_modified) %><%= l(:link_ver) %><%= l(:link_workflow) %><%= l(:link_author) %><%= l(:link_title) %><%= l(:link_size) %><%= l(:link_modified) %><%= l(:link_ver) %><%= l(:link_workflow) %><%= l(:link_author) %>
+
- - + - - - - - - - - - - - + + + + + + + + + + + @@ -77,7 +77,7 @@ <% end %> <% @dir_links.each do |link| %> - + <%= render(:partial => 'dir_trash', :locals => { :project => link.target_project, @@ -108,7 +108,7 @@ <% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %> <% next %> <% end %> - + <%= render(:partial => 'file_trash', :locals => { :project => link.target_project, :file => link.target_file, @@ -119,7 +119,7 @@ <% end %> <% @url_links.each do |link| %> - + <%= render(:partial => 'url_trash', :locals => { :project => link.target_project, :file => link.target_file, @@ -180,7 +180,7 @@ { 'iDataSort': 11, 'aTargets': [ 4 ] } ], 'fnInitComplete': function() { - jQuery('div.controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]); + jQuery('div.dmsf_controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]); }, 'fnInfoCallback': function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) { return "<%= l(:label_number_of_folders)%>: <%= @subfolders.count + @dir_links.count %>, <%= l(:label_number_of_documents)%>: <%= @files.count + @file_links.count + @url_links.count %>"; diff --git a/app/views/dmsf_files/_revision_access.html.erb b/app/views/dmsf_files/_revision_access.html.erb index 4c6b276d..a4a736fb 100644 --- a/app/views/dmsf_files/_revision_access.html.erb +++ b/app/views/dmsf_files/_revision_access.html.erb @@ -35,7 +35,7 @@ <% revision.access_grouped.each do |access| %> - + diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index e6f532e4..27241caa 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -29,33 +29,33 @@ <% 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 icon-dmsf-lock') %> + :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 icon-dmsf-unlock') %> + :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-notification-on') %> + :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-notification-off') %> + :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.folder ? @file.folder.id : nil, :dmsf_file_id => @file.id, :type => 'link_to'), :title => l(:title_create_link), - :class => 'icon icon-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 @file 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 icon-dmsf-unlock')%> + :title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%> <% end %> <% end %> <% end %> @@ -77,10 +77,10 @@

<%= l(:heading_revisions) %>

<% @file.revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %> -
+
-
+
<%= link_to_function image_tag('rev_downloads.png', :plugin => 'redmine_dmsf'), "$('#revision_access-#{revision.id}').toggle()", :title => l(:title_download_entries) %> diff --git a/app/views/dmsf_upload/_multi_upload.html.erb b/app/views/dmsf_upload/_multi_upload.html.erb index 1ea277b2..2512754b 100644 --- a/app/views/dmsf_upload/_multi_upload.html.erb +++ b/app/views/dmsf_upload/_multi_upload.html.erb @@ -25,7 +25,7 @@
<%= form_tag({:controller => 'dmsf_upload', :action => 'upload_files', :id => @project, :folder_id => @folder}, :id => 'uploadform', :method => :post, :multipart => true) do %> -
+
- - + - + - + - + - + <% sql = "SELECT c.action, c.note, c.created_at, c.author_id, a.user_id, s.step FROM dmsf_workflow_step_actions c RIGHT JOIN dmsf_workflow_step_assignments a ON a.id = c.dmsf_workflow_step_assignment_id RIGHT JOIN dmsf_workflow_steps s ON s.id = a.dmsf_workflow_step_id WHERE a.dmsf_file_revision_id = #{revision.id} ORDER BY s.step, c.action DESC, c.created_at" %> <% result = DmsfWorkflowStep.connection.exec_query sql %> <% result.each_with_index do |row, i| %> - + - + <% end %> @@ -93,5 +97,4 @@ <% end %> <% end %> -

- +

\ No newline at end of file diff --git a/app/views/dmsf_workflows/_main.html.erb b/app/views/dmsf_workflows/_main.html.erb index e9526c8c..2c3632b2 100644 --- a/app/views/dmsf_workflows/_main.html.erb +++ b/app/views/dmsf_workflows/_main.html.erb @@ -17,7 +17,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> <% @workflows = DmsfWorkflow.active.sorted.where(:project_id => @project.id) if @project && @workflows.nil? %> @@ -46,7 +47,7 @@ <% for workflow in @workflows %> - + <% steps.each do |i|%> - +
+
<%= l(:link_title) %><%= l(:link_size) %><%= l(:link_modified) %><%= l(:link_ver) %><%= l(:link_workflow) %><%= l(:link_author) %><%= l(:link_title) %><%= l(:link_size) %><%= l(:link_modified) %><%= l(:link_ver) %><%= l(:link_workflow) %><%= l(:link_author) %>
<%= link_to_user(access.user) %><%= access['count'] %><%= access['count'] %> <%= format_time(DmsfHelper::to_time(access.first_at)) %> <%= format_time(DmsfHelper::to_time(access.last_at)) %>
+ <%= DmsfWorkflowStepAction.workflow_str(0) %>
<%= link_to_user User.find_by_id(revision.dmsf_workflow_assigned_by) if revision.dmsf_workflow_assigned_by %> <%= DmsfWorkflowStepAction.action_str(DmsfWorkflowStepAction::ACTION_ASSIGN) %> <%= DmsfWorkflowStepAction.workflow_str(DmsfWorkflowStepAction::ACTION_ASSIGN) %> <%= format_time(revision.dmsf_workflow_assigned_at) if revision.dmsf_workflow_assigned_at %>
<%= link_to_user User.find_by_id(revision.dmsf_workflow_started_by) if revision.dmsf_workflow_started_by %> <%= DmsfWorkflowStepAction.action_str(DmsfWorkflowStepAction::ACTION_START) %> <%= DmsfWorkflowStepAction.workflow_str(DmsfWorkflowStepAction::ACTION_START) if revision.dmsf_workflow_started_by %> <%= format_time(revision.dmsf_workflow_started_at) if revision.dmsf_workflow_started_at %>
<%= row['step'] %><%= row['step'] %> <%= link_to_user User.find_by_id(row['author_id'].present? ? row['author_id'] : row['user_id']) %> <%= DmsfWorkflowStepAction.action_str(row['action']) %> @@ -84,7 +88,7 @@ <%= DmsfWorkflowStepAction.workflow_str(row['action']) %> <% end %> <%= row['note'] %><%= row['note'] %> <%= format_time(row['created_at']) if row['created_at'].present? %>
<%= link_to(h(workflow.name), dmsf_workflow_path(workflow)) %> <%= change_status_link(workflow) unless @project %> diff --git a/app/views/dmsf_workflows/_steps.html.erb b/app/views/dmsf_workflows/_steps.html.erb index dd131443..4578fcbb 100644 --- a/app/views/dmsf_workflows/_steps.html.erb +++ b/app/views/dmsf_workflows/_steps.html.erb @@ -52,7 +52,7 @@
<%= i %><%= i %> <% @dmsf_workflow.dmsf_workflow_steps.collect{|s| (s.step == i) ? s : nil}.compact.each_with_index do |step, j| %> <% if j != 0 %> diff --git a/app/views/dmsf_workflows/action.js.erb b/app/views/dmsf_workflows/action.js.erb index fe39820b..f19fdc05 100644 --- a/app/views/dmsf_workflows/action.js.erb +++ b/app/views/dmsf_workflows/action.js.erb @@ -1,6 +1,9 @@ -<%# Redmine plugin for Document Management System "Features" +<% +# encoding: utf-8 # -# Copyright (C) 2011-15 Karel Pičman +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,7 +17,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> $('#ajax-modal').html('<%= escape_javascript(render :partial => 'action', :locals => {:workflow => @dmsf_workflow}) %>'); showModal('ajax-modal', '35%'); diff --git a/app/views/dmsf_workflows/index.html.erb b/app/views/dmsf_workflows/index.html.erb index 6f039389..775ff679 100644 --- a/app/views/dmsf_workflows/index.html.erb +++ b/app/views/dmsf_workflows/index.html.erb @@ -1,6 +1,9 @@ -<%# Redmine plugin for Document Management System "Features" +<% +# encoding: utf-8 # -# Copyright (C) 2013 Karel Pičman +# Redmine plugin for Document Management System "Features" +# +# Copyright (C) 2011-16 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,6 +17,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> <%= render 'main' %> \ No newline at end of file diff --git a/assets/stylesheets/dmsf.css b/assets/stylesheets/dmsf.css index 78c0e7f8..4a2977fb 100644 --- a/assets/stylesheets/dmsf.css +++ b/assets/stylesheets/dmsf.css @@ -19,14 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -button { - vertical-align: middle; - margin-top: 1px; - margin-bottom: 1px; -} - /* DMSF table.list modifications */ -table.list th.ui-state-default { + +table.dmsf_list th.dmsf_th { border: none; } @@ -34,6 +29,11 @@ table.list td.dmsf_modified { min-width: 127px; width: 127px; font-size: 0.8em; + text-align: left; +} + +td.dmsf_modified img { + vertical-align:text-top; } table.list td.dmsf_title { @@ -47,108 +47,83 @@ table.list td.dmsf_buttons { text-align: left; } -table.list th.dmsf_check, table.list td.dmsf_check { - width: 17px; - padding: 2px; - text-align: left; +table.list th.dmsf_checkbox { + width: 15px; + padding: 2px 0 0 0; } -table.list th.dmsf_check div.DataTables_sort_wrapper { +table.list th.dmsf_checkbox input { + padding:0px; +} + +table.list th.dmsf_checkbox div.DataTables_sort_wrapper { padding: 0; } -table.list td.note { - width: 20%; -} - -table.list td.reorder { - width: 15%; -} - -table.list td.step { - text-align: center; - width: 16px; -} - form.dmfs_entries { margin-bottom: 10px; display: block; } -div.dataTables_wrapper div.fg-toolbar input, div.dataTables_wrapper div.fg-toolbar button, -div.dataTables_wrapper div.fg-toolbar select, div.dataTables_wrapper div.fg-toolbar { +div.dmsf_controls, +div.dmsf_controls input, +div.dmsf_controls select, +form.dmfs_entries #browser_filter.dataTables_filter, +form.dmfs_entries #browser_filter.dataTables_filter input{ font-size: 0.9em; } -input[type="checkbox"] { - margin: 1px; -} - -div.filename { - padding: 0 10px 0 10px; float: right; font-size: 0.8em; +div.dmsf_filename { + padding: 0 10px 0 10px; + float: right; + font-size: 0.8em; white-space: nowrap; } -td.size { +td.dmsf_size { font-size: 0.8em; white-space: nowrap; } -td.modified img { +td.dmsf_author { + font-size: 0.8em; + white-space: nowrap; +} + +td.dmsf_version { + font-size: 0.8em; + white-space: nowrap; +} + +td.dmsf_version img { vertical-align:text-top; } -td.author { - font-size: 0.8em; -} - -td.version { +td.dmsf_workflow { font-size: 0.8em; white-space: nowrap; } -td.version img { - vertical-align:text-top; -} - -td.workflow { - font-size: 0.8em; - white-space: nowrap; -} - -#uploader div.flash { - border: none; -} - -.invisible { +.dmsf_invisible { display: none; } -div.upload_select { +div.dmsf_upload_select { float: right; font-size: 0.9em; } -div.upload_select input, div.upload_select select { +div.dmsf_upload_select input, div.dmsf_upload_select select { font-size: 0.9em; } -.plupload_scroll { - max-height: 1000px; - min-height: 175px; -} - -.ui-resizable-s { - bottom: 0px; -} - /* Approval workflow */ -#admin-menu a.approvalworkflows { background-image: url(../../../images/ticket_go.png); } -#users_for_delegate { height: 200px; overflow:auto; } -#users_for_delegate label { display: block; } -tr.workflow.locked a { color: #aaa; } +#admin-menu a.dmsf-approvalworkflows { background-image: url(../../../images/ticket_go.png); } +#dmsf_users_for_delegate { height: 200px; overflow:auto; } +#dmsf_users_for_delegate label { display: block; } +tr.dmsf_workflow.locked a { color: #aaa; } -.revision_box { +.dmsf_revision_box { padding: 0px 0px 0px 0px; margin-bottom: 10px; background-color:#f6f6f6; @@ -169,40 +144,35 @@ tr.workflow.locked a { color: #aaa; } padding-left: 10px; } -div.revision_box .ui-widget-header { +div.dmsf_revision_box .ui-widget-header { font-weight: normal; } -.log_header_box{ +.dmsf_log_header_box{ padding:6px; margin-bottom: 10px; } -.log_header_left { +.dmsf_log_header_left { width: 50%; float: left; } -.log_header_box label{ +.dmsf_log_header_box label{ font-weight: bold; margin-left: 0px; margin-right: 3px; padding: 3px 0 3px 0; } -.modal a, .modal a:link, .modal a:visited{ color: #169; text-decoration: none; } -.modal a:hover, .modal a:active{ color: #c61a1a; text-decoration: underline;} -.modal{ font-size: 12px} - /* Command icons */ -.icon-link { background-image: url(../images/link.png); } -.icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; } -.icon-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; } -.icon-dmsf-lock { background-image: url(../images/lock.png); } -.icon-dmsf-unlock { background-image: url(../images/unlock.png); } -.icon-dmsf-locked { background-image: url(../images/locked.png); margin-left: 2px } +.dmsf_icon-link { background-image: url(../images/link.png); } +.dmsf_icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; } +.dmsf_icon-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; } +.dmsf_icon-lock { background-image: url(../images/lock.png); } +.dmsf_icon-unlock { background-image: url(../images/unlock.png); } /* File types */ -tr.gray .icon-folder { background-image: url(../images/folder_gray.png); } +tr.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); } .icon-file.filetype-doc, .icon-file.filetype-docx { background-image: url(../images/filetypes/doc.png); } .icon-file.filetype-xls, .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls.png); } @@ -214,45 +184,41 @@ tr.gray .icon-folder { background-image: url(../images/folder_gray.png); } .icon-file.filetype-odp { background-image: url(../images/filetypes/odp.png); } .icon-file.filetype-odg { background-image: url(../images/filetypes/odg.png); } -tr.gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); } -tr.gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); } -tr.gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); } -tr.gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); } -tr.gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); } -tr.gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); } -tr.gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); } -tr.gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); } -tr.gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); } -tr.gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); } -tr.gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); } -tr.gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); } -tr.gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); } +tr.dmsf_gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); } +tr.dmsf_gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); } +tr.dmsf_gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); } +tr.dmsf_gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); } +tr.dmsf_gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); } +tr.dmsf_gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); } +tr.dmsf_gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); } +tr.dmsf_gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); } +tr.dmsf_gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); } +tr.dmsf_gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); } +tr.dmsf_gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); } +tr.dmsf_gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); } +tr.dmsf_gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); } -tr.gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); } -tr.gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); } -tr.gray .icon-file.text-x-java { background-image: url(../images/files/filetypes/java_gray.png); } -tr.gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); } -tr.gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); } -tr.gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); } -tr.gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); } -tr.gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); } -tr.gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); } -tr.gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); } -tr.gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); } -tr.gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); } -tr.gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); } -tr.gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); } -tr.gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); } -tr.gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); } +tr.dmsf_gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); } +tr.dmsf_gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); } +tr.dmsf_gray .icon-file.text-x-java { background-image: url(../images/files/filetypes/java_gray.png); } +tr.dmsf_gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); } +tr.dmsf_gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); } +tr.dmsf_gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); } +tr.dmsf_gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); } +tr.dmsf_gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); } +tr.dmsf_gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); } +tr.dmsf_gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); } +tr.dmsf_gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); } +tr.dmsf_gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); } +tr.dmsf_gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); } +tr.dmsf_gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); } +tr.dmsf_gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); } +tr.dmsf_gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); } /* Links */ -.gray { color: #AAA } -.gray a, .gray a:link, .gray a:visited{ color: #484848; text-decoration: none; } +.dmsf_gray { color: #AAA } +.dmsf_gray a, .dmsf_gray a:link, .dmsf_gray a:visited{ color: #484848; text-decoration: none; } /* Search results */ dt.dmsf-file { background-image: url(../../../images/document.png); } -dt.dmsf-folder { background-image: url(../../../images/folder.png); } - -.select2-selection{height: 100% !important; min-height: 30px;} -.select2-selection__rendered{overflow: visible !important; min-height: 30px;} -.select2-results__options {max-height: 600px !important;} \ No newline at end of file +dt.dmsf-folder { background-image: url(../../../images/folder.png); } \ No newline at end of file diff --git a/init.rb b/init.rb index 9115cd93..94811d86 100644 --- a/init.rb +++ b/init.rb @@ -93,7 +93,7 @@ Redmine::Plugin.register :redmine_dmsf do # Administration menu extension Redmine::MenuManager.map :admin_menu do |menu| - menu.push :approvalworkflows, + menu.push :dmsf_approvalworkflows, {:controller => 'dmsf_workflows', :action => 'index'}, :caption => :label_dmsf_workflow_plural end