From 8c09e330d42d7ab0a8ee5e6292b03a00e6ebeb84 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jun 2016 07:24:45 +0000 Subject: [PATCH] Merged r15431 to r15435 (#22924, #22925, #22926). git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15440 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 1 + app/models/custom_field.rb | 8 +++++ app/views/projects/show.html.erb | 2 +- lib/redcloth3.rb | 3 ++ lib/redmine/field_format.rb | 17 +++++++-- lib/redmine/helpers/url.rb | 35 +++++++++++++++++++ .../wiki_formatting/markdown/formatter.rb | 9 +++++ test/unit/helpers/application_helper_test.rb | 2 +- .../redmine/field_format/field_format_test.rb | 15 ++++++++ 9 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 lib/redmine/helpers/url.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3e857e3d9..c727d0be5 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 511299523..370ce7090 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?) %>