summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-04 07:25:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-04 07:25:12 +0000
commitee408687c61d66a7d70fec636292cf5e8e66e3e0 (patch)
treeece3941813d07cc700ddbb02a3795c9c997911ad /app
parent3b3478b8a3a3160ef9cdefa205a1ca85f7d2ef08 (diff)
downloadredmine-ee408687c61d66a7d70fec636292cf5e8e66e3e0.tar.gz
redmine-ee408687c61d66a7d70fec636292cf5e8e66e3e0.zip
Merged r15431 to r15435 (#22924, #22925, #22926).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15441 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb1
-rw-r--r--app/models/custom_field.rb8
-rw-r--r--app/views/projects/show.html.erb2
3 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 6893174cf..0c937d30f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -28,6 +28,7 @@ module ApplicationHelper
include Redmine::SudoMode::Helper
include Redmine::Themes::Helper
include Redmine::Hook::Helper
+ include Redmine::Helpers::URL
extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index f5f15a4a1..67cfcd2e3 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -262,6 +262,14 @@ class CustomField < ActiveRecord::Base
args.include?(field_format)
end
+ def self.human_attribute_name(attribute_key_name, *args)
+ attr_name = attribute_key_name.to_s
+ if attr_name == 'url_pattern'
+ attr_name = "url"
+ end
+ super(attr_name, *args)
+ end
+
protected
# Removes multiple values for the custom field after setting the multiple attribute to false
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 33f423ca5..007f0fab2 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -26,7 +26,7 @@
<% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %>
<ul>
<% unless @project.homepage.blank? %>
- <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to @project.homepage, @project.homepage %></li>
+ <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
<% end %>
<% if @subprojects.any? %>
<li><span class="label"><%=l(:label_subproject_plural)%>:</span>