summaryrefslogtreecommitdiffstats
path: root/app/helpers/repositories_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-05 08:59:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-05 08:59:04 +0000
commit12fbd06c02d44fdb96922154476302f002783e23 (patch)
tree308599edd76edf56e18308a0559ddf59f731e222 /app/helpers/repositories_helper.rb
parent1e6b8a482ae12d48fa72305d73891a2611db47c5 (diff)
downloadredmine-12fbd06c02d44fdb96922154476302f002783e23.tar.gz
redmine-12fbd06c02d44fdb96922154476302f002783e23.zip
Display svn properties in the browser, svn >= 1.5.0 only (#1581).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1627 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/repositories_helper.rb')
-rw-r--r--app/helpers/repositories_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index 4ef337c26..59e1e0fb9 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -22,6 +22,16 @@ module RepositoriesHelper
txt.to_s[0,8]
end
+ def render_properties(properties)
+ unless properties.nil? || properties.empty?
+ content = ''
+ properties.keys.sort.each do |property|
+ content << content_tag('li', "<b>#{h property}</b>: <span>#{h properties[property]}</span>")
+ end
+ content_tag('ul', content, :class => 'properties')
+ end
+ end
+
def to_path_param(path)
path.to_s.split(%r{[/\\]}).select {|p| !p.blank?}
end