diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-07-14 10:35:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-07-14 10:35:10 +0000 |
commit | dd11d70eb9624c6e9bea865be7bca76d05f1a808 (patch) | |
tree | ab3fa7543e95e4211e878ac06a9ba1b7ef8cf5d4 | |
parent | 12f1f619280e6ead26fa9d54a675eb5c621279fc (diff) | |
download | redmine-dd11d70eb9624c6e9bea865be7bca76d05f1a808.tar.gz redmine-dd11d70eb9624c6e9bea865be7bca76d05f1a808.zip |
Moved #link_to_version to ApplicationHelper (#17431).
git-svn-id: http://svn.redmine.org/redmine/trunk@13322 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 5 |
3 files changed, 6 insertions, 6 deletions
@@ -1,7 +1,6 @@ source 'https://rubygems.org' gem "rails", "3.2.19" -gem "rake", "~> 10.1.1" gem "jquery-rails", "~> 2.0.2" gem "coderay", "~> 1.1.0" gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f728010c2..2f43574ec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -157,6 +157,12 @@ module ApplicationHelper end end + # Generates a link to a version + def link_to_version(version, options = {}) + return '' unless version && version.is_a?(Version) + link_to_if version.visible?, format_version_name(version), version_path(version), options + end + # Helper that formats object for html or text rendering def format_object(object, html=true, &block) if block_given? diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index d9315b96d..8337d43ab 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -18,11 +18,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module ProjectsHelper - def link_to_version(version, options = {}) - return '' unless version && version.is_a?(Version) - link_to_if version.visible?, format_version_name(version), version_path(version), options - end - def project_settings_tabs tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural}, {:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural}, |