summaryrefslogtreecommitdiffstats
path: root/app/helpers/repositories_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-14 11:34:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-14 11:34:08 +0000
commit21c97c6a1376a38a3951c57069317c17c81029f8 (patch)
tree8d38f129585767d4c1eb2c78d0b9b978aff14d70 /app/helpers/repositories_helper.rb
parent29348fafb7ca43cb00ef80f29e61167647df0cd8 (diff)
downloadredmine-21c97c6a1376a38a3951c57069317c17c81029f8.tar.gz
redmine-21c97c6a1376a38a3951c57069317c17c81029f8.zip
Added project module concept.
A project module (eg. issue tracking, news, wiki,...) is a set of permissions that can enabled/disabled at project level. For each project, modules can be enabled on the project settings view ('Modules' tab). This requires a specific permission: 'Select project modules' (if this permission is turned off, only Redmine administrators can choose which modules a project uses). When applying this migration, all modules are enabled for all existing projects. git-svn-id: http://redmine.rubyforge.org/svn/trunk@725 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/repositories_helper.rb')
-rw-r--r--app/helpers/repositories_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index 7db748abd..d82e16561 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -29,13 +29,13 @@ module RepositoriesHelper
send(method, form, repository) if repository.is_a?(Repository) && respond_to?(method)
end
- def scm_select_tag
+ def scm_select_tag(repository)
container = [[]]
REDMINE_SUPPORTED_SCM.each {|scm| container << ["Repository::#{scm}".constantize.scm_name, scm]}
select_tag('repository_scm',
- options_for_select(container, @project.repository.class.name.demodulize),
- :disabled => (@project.repository && !@project.repository.new_record?),
- :onchange => remote_function(:update => "repository_fields", :url => { :controller => 'repositories', :action => 'update_form', :id => @project }, :with => "Form.serialize(this.form)")
+ options_for_select(container, repository.class.name.demodulize),
+ :disabled => (repository && !repository.new_record?),
+ :onchange => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")
)
end