mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 16:26:03 +01:00
Moved #link_to_version to ApplicationHelper (#17431).
git-svn-id: http://svn.redmine.org/redmine/trunk@13322 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -1,7 +1,6 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem "rails", "3.2.19"
|
gem "rails", "3.2.19"
|
||||||
gem "rake", "~> 10.1.1"
|
|
||||||
gem "jquery-rails", "~> 2.0.2"
|
gem "jquery-rails", "~> 2.0.2"
|
||||||
gem "coderay", "~> 1.1.0"
|
gem "coderay", "~> 1.1.0"
|
||||||
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
||||||
|
|||||||
@@ -157,6 +157,12 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
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
|
# Helper that formats object for html or text rendering
|
||||||
def format_object(object, html=true, &block)
|
def format_object(object, html=true, &block)
|
||||||
if block_given?
|
if block_given?
|
||||||
|
|||||||
@@ -18,11 +18,6 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
module ProjectsHelper
|
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
|
def project_settings_tabs
|
||||||
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural},
|
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},
|
{:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural},
|
||||||
|
|||||||
Reference in New Issue
Block a user