Document path in the view headers unified
This commit is contained in:
parent
b60ba63efe
commit
d5d08fef74
37
app/views/dmsf/_path.html.erb
Normal file
37
app/views/dmsf/_path.html.erb
Normal file
@ -0,0 +1,37 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# 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.%>
|
||||
|
||||
<h2>
|
||||
<% if folder %>
|
||||
<%= link_to l(:link_documents), dmsf_path(:id => @project) %>
|
||||
<% folder.dmsf_path.each do |path_element| %>
|
||||
/
|
||||
<% if !filename && path_element == folder.dmsf_path.last %>
|
||||
<%= h(path_element.title) %>
|
||||
<% else %>
|
||||
<%= link_to h(path_element.title), dmsf_path(:id => @project, :folder_id => path_element) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= l(:link_documents) %>
|
||||
<% end %>
|
||||
<% if filename %>
|
||||
/
|
||||
<%= h(filename) %>
|
||||
<% end %>
|
||||
</h2>
|
||||
@ -25,17 +25,7 @@
|
||||
:title => l(:title_copy)) if @folder.id %>
|
||||
</div>
|
||||
|
||||
<% create = @pathfolder == @parent %>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @pathfolder, :filename => @pathfolder == @parent ? l(:heading_new_folder) : nil}) %>
|
||||
|
||||
<%= form_for(@folder, :url => {:action => create ? 'create' : 'save', :id => @project, :folder_id => @folder, :parent_id => @parent},
|
||||
:html => {:method=>:post}) do |f| %>
|
||||
|
||||
@ -22,14 +22,7 @@
|
||||
<div class="contextual">
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @folder}) %>
|
||||
|
||||
<h3><%= l(:heading_send_documents_by_email) %></h3>
|
||||
|
||||
|
||||
@ -65,14 +65,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @folder}) %>
|
||||
|
||||
<div class="dmsf-header">
|
||||
<div class="wiki">
|
||||
|
||||
@ -60,17 +60,7 @@
|
||||
<%= link_to(image_tag('copy.png'), {:controller => :dmsf_files_copy, :action => 'new', :id => @file }, :title => l(:title_copy_or_move)) %>
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
/
|
||||
<%= h(@file.last_revision.title) %>
|
||||
<%= image_tag('notify.png', :plugin => 'redmine_dmsf', :title => l(:title_notifications_active)) if @file.notification %>
|
||||
</h2>
|
||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
|
||||
|
||||
<%= error_messages_for('file') %>
|
||||
<%= error_messages_for('revision') %>
|
||||
|
||||
@ -22,17 +22,7 @@
|
||||
<div class="contextual">
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
|
||||
|
||||
<% if DmsfFile.allowed_target_projects_on_copy.present? %>
|
||||
<%= form_tag({:action => 'create', :id => @file}, :id => 'copyForm') do |f| %>
|
||||
|
||||
@ -21,13 +21,7 @@
|
||||
|
||||
<div class="contextual"></div>
|
||||
|
||||
<h2>
|
||||
<%= 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @folder}) %>
|
||||
|
||||
<% unless DmsfFolder.allowed_target_projects_on_copy.blank? %>
|
||||
<%= form_tag({:action => 'copy_to', :id => @folder}, :id => 'copyForm') do |f| %>
|
||||
|
||||
@ -22,17 +22,10 @@
|
||||
<div class="contextual">
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
<% 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 %>
|
||||
</h2>
|
||||
<%= render(:partial => 'path', :locals => {:folder => @folder}) %>
|
||||
|
||||
<div class="wiki">
|
||||
<%= textilizable(@folder.description) unless @folder.nil? %>
|
||||
<%= textilizable(@folder.description) if @folder %>
|
||||
</div>
|
||||
|
||||
<h3><%=l(:heading_uploaded_files)%></h3>
|
||||
|
||||
@ -36,7 +36,7 @@ RedmineApp::Application.routes.draw do
|
||||
post '/projects/:id/dmsf/entries/email', :controller => 'dmsf', :action => 'entries_email'
|
||||
post '/projects/:id/dmsf/lock', :controller => 'dmsf', :action => 'lock'
|
||||
post '/projects/:id/dmsf/unlock', :controller => 'dmsf', :action => 'unlock'
|
||||
get '/projects/:id/dmsf/', :controller => 'dmsf', :action => 'show'
|
||||
get '/projects/:id/dmsf/', :controller => 'dmsf', :action => 'show', :as => 'dmsf'
|
||||
get '/projects/:id/dmsf/new', :controller => 'dmsf', :action => 'new'
|
||||
get '/projects/:id/dmsf/edit', :controller=> 'dmsf', :action => 'edit'
|
||||
get '/projects/:id/dmsf/edit/root', :controller=> 'dmsf', :action => 'edit_root'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user