Update init.rb

This commit is contained in:
Daniel Munn 2013-04-11 10:00:21 +02:00
parent ade8c9af3a
commit 93e558066f

10
init.rb
View File

@ -24,7 +24,7 @@ Redmine::Plugin.register :redmine_dmsf do
name "DMSF" name "DMSF"
author "Vit Jonas / Daniel Munn" author "Vit Jonas / Daniel Munn"
description "Document Management System Features" description "Document Management System Features"
version "1.4.5 stable" version "1.4.5p1 stable"
url "https://github.com/danmunn/redmine_dmsf" url "https://github.com/danmunn/redmine_dmsf"
author_url "https://code.google.com/p/redmine-dmsf/" author_url "https://code.google.com/p/redmine-dmsf/"
@ -72,7 +72,7 @@ Redmine::Plugin.register :redmine_dmsf do
unless entry.nil? || entry.deleted unless entry.nil? || entry.deleted
title = args[1] ? args[1] : entry.title title = args[1] ? args[1] : entry.title
revision = args[2] ? args[2] : "" revision = args[2] ? args[2] : ""
return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :download => revision, :only_path => false return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :download => revision, :only_path => false
end end
nil nil
end end
@ -85,13 +85,13 @@ Redmine::Plugin.register :redmine_dmsf do
macro :dmsff do |obj, args| macro :dmsff do |obj, args|
if args.length < 1 if args.length < 1
return link_to l(:link_documents), :controller => "dmsf", :action => "show", :id => @project, :only_path => false return link_to l(:link_documents), :controller => "dmsf", :action => "show", :id => @project, :only_path => false
else else
entry_id = args[0].strip entry_id = args[0].strip
entry = DmsfFolder.find(entry_id) entry = DmsfFolder.find(entry_id)
unless entry.nil? unless entry.nil?
title = args[1] ? args[1] : entry.title title = args[1] ? args[1] : entry.title
return link_to "#{title}", :controller => "dmsf", :action => "show", :id => entry.project, :folder_id => entry, :only_path => false return link_to "#{title}", :controller => "dmsf", :action => "show", :id => entry.project, :folder_id => entry, :only_path => false
end end
end end
nil nil
@ -109,7 +109,7 @@ Redmine::Plugin.register :redmine_dmsf do
entry = DmsfFile.find(entry_id) entry = DmsfFile.find(entry_id)
unless entry.nil? || entry.deleted unless entry.nil? || entry.deleted
title = args[1] ? args[1] : entry.title title = args[1] ? args[1] : entry.title
return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :only_path => false return link_to "#{title}", :controller => "dmsf_files", :action => "show", :id => entry, :only_path => false
end end
nil nil
end end