From: Jean-Philippe Lang Date: Mon, 14 Jul 2014 10:35:10 +0000 (+0000) Subject: Moved #link_to_version to ApplicationHelper (#17431). X-Git-Tag: 2.6.0~94 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd11d70eb9624c6e9bea865be7bca76d05f1a808;p=redmine.git Moved #link_to_version to ApplicationHelper (#17431). git-svn-id: http://svn.redmine.org/redmine/trunk@13322 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/Gemfile b/Gemfile index 9dd167bee..343b699d7 100644 --- a/Gemfile +++ b/Gemfile @@ -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},