2014-11-28 22:35:33 +01:00
|
|
|
module RedmineGitRemote
|
2014-11-27 21:48:29 +01:00
|
|
|
module RepositoriesHelperPatch
|
|
|
|
def self.included(base) # :nodoc:
|
|
|
|
base.send(:include, InstanceMethods)
|
|
|
|
end
|
|
|
|
|
|
|
|
module InstanceMethods
|
2014-11-27 22:07:35 +01:00
|
|
|
def git_remote_field_tags(form, repository)
|
2014-11-28 22:35:33 +01:00
|
|
|
content_tag('p', form.text_field(:url,
|
|
|
|
:size => 60, :required => true, :required => false,
|
|
|
|
:disabled => !repository.safe_attribute?('url'),
|
|
|
|
:label => l(:field_path_to_repository)) +
|
|
|
|
content_tag('em', l(:text_git_remote_path_note), :class => 'info') +
|
2014-11-27 21:48:29 +01:00
|
|
|
form.text_field(:extra_clone_url, :size => 60, :required => true,
|
|
|
|
:disabled => !repository.safe_attribute?('url')) +
|
2014-11-28 22:35:33 +01:00
|
|
|
content_tag('em', l(:text_git_remote_url_note), :class => 'info')
|
2014-11-27 21:48:29 +01:00
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RepositoriesHelper.send(:include, RepositoriesHelperPatch)
|
|
|
|
end
|