From ede0fd8247bd46517e2d0a4c0a2153317bba85f7 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Tue, 17 Sep 2013 13:24:00 +0200 Subject: [PATCH] path partial view removed --- app/views/dmsf/edit.html.erb | 12 +++++++++--- app/views/dmsf/email_entries.html.erb | 10 +++++++--- app/views/dmsf_files_copy/new.html.erb | 16 ++++++++++------ app/views/dmsf_folders_copy/new.html.erb | 8 +++++++- .../redmine_dmsf/_view_projects_form.html.erb | 2 +- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 171896ca..90b31c0d 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -7,9 +7,15 @@ <% create = @pathfolder == @parent %> -

-<%= render(:partial => "path", :locals => {:path => @pathfolder.nil? ? [] : @pathfolder.dmsf_path}) %> -<%= ("/ " + l(:heading_new_folder)) if create %> + +

+ <% path = @pathfolder ? @pathfolder.dmsf_path : [] %> + <%= link_to l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> @project } %> + <% path.each do |path_element| %> + / + <%= link_to h(path_element.title), {:controller => 'dmsf', :action => 'show', :id=> @project, :folder_id => path_element} %> + <% end %> + <%= "/ #{l(:heading_new_folder)}" if create %>

<%= form_for(@folder, :url => {:action => create ? "create" : "save", :id => @project, :folder_id => @folder, :parent_id => @parent}, diff --git a/app/views/dmsf/email_entries.html.erb b/app/views/dmsf/email_entries.html.erb index 7740daa3..35373721 100644 --- a/app/views/dmsf/email_entries.html.erb +++ b/app/views/dmsf/email_entries.html.erb @@ -3,9 +3,13 @@
-<% path = @folder.nil? ? [] : @folder.dmsf_path %> -

-<%= render(:partial => 'path', :locals => {:path => path}) %> +

+ <% path = @folder ? @folder.dmsf_path : [] %> + <%= link_to l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> @project } %> + <% path.each do |path_element| %> + / + <%= link_to h(path_element.title), {:controller => 'dmsf', :action => 'show', :id=> @project, :folder_id => path_element} %> + <% end %>

<%= l(:heading_send_documents_by_email) %>

diff --git a/app/views/dmsf_files_copy/new.html.erb b/app/views/dmsf_files_copy/new.html.erb index a51d6dc4..3debefac 100644 --- a/app/views/dmsf_files_copy/new.html.erb +++ b/app/views/dmsf_files_copy/new.html.erb @@ -3,12 +3,16 @@
-<% path = @file.folder.nil? ? [] : @file.folder.dmsf_path %> -

-<%= render(:partial => "/dmsf/path", :locals => {:path => path}) %> -/ -<%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %> -<%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) if @file.notification %> +

+ <% path = @file.folder ? @file.folder.dmsf_path : [] %> + <%= link_to l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> @project } %> + <% path.each do |path_element| %> + / + <%= link_to h(path_element.title), {:controller => 'dmsf', :action => 'show', :id=> @project, :folder_id => path_element} %> + <% end %> + / + <%= link_to(h(@file.title), {:controller => "dmsf_files", :action => "show", :id=> @file}) %> + <%= image_tag("notify.png", :plugin => "redmine_dmsf", :title => l(:title_notifications_active)) if @file.notification %>

<% unless DmsfFile.allowed_target_projects_on_copy.blank? %> diff --git a/app/views/dmsf_folders_copy/new.html.erb b/app/views/dmsf_folders_copy/new.html.erb index bda0ef7a..c2d9f365 100644 --- a/app/views/dmsf_folders_copy/new.html.erb +++ b/app/views/dmsf_folders_copy/new.html.erb @@ -3,7 +3,13 @@
-

<%= render(:partial => "/dmsf/path", :locals => {:path => @folder.dmsf_path}) %>

+

+ <%= link_to l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> @project } %> + <% @folder.dmsf_path.each do |path_element| %> + / + <%= link_to h(path_element.title), {:controller => 'dmsf', :action => 'show', :id=> @project, :folder_id => path_element} %> + <% end %> +

<% unless DmsfFolder.allowed_target_projects_on_copy.blank? %> <%= form_tag({:action => "copy_to", :id => @folder}, :id => "copyForm") do |f| %> diff --git a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb index 0838399e..42fea1ef 100644 --- a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb @@ -1,4 +1,4 @@ -<% if @project.new_record? && !@source_project.nil? %> +<% if @project.new_record? && @source_project %>