I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

0003-Remove-login-inputs-from-svn-repository-form-plugin-.patch

Elektritter Messinger, 06 May 2014 12:12

Download (2.18 KB)

View differences:

lib/scm_repositories_helper_patch.rb
53 53
            return reptags.html_safe
54 54
        end
55 55

  
56
        def subversion_field_tags_reduced(form, repository)
57
          if ScmConfig['allow_add_local']
58
            subversion_field_tags_without_add(form, repository)
59
          else
60
            content_tag('p', form.text_field(:url, :size => 60, :required => true,
61
                       :disabled => !repository.safe_attribute?('url')))+
62
            form.hidden_field(:login)+
63
            form.hidden_field(:password)
64
          end
65
        end
66

  
56 67
        def subversion_field_tags_with_add(form, repository)
57
            svntags = subversion_field_tags_without_add(form, repository)
68
            svntags = subversion_field_tags_reduced(form,repository)
58 69
            svntags.gsub!('&lt;br /&gt;', '<br />')
59 70

  
60 71
            if @project.respond_to?(:repositories) &&
......
86 97
                SubversionCreator.enabled? && SubversionCreator.options['url'].present?
87 98
                name = SubversionCreator.repository_name(repository.root_url)
88 99
                if name
89
                    svntags.gsub!('(file:///, http://, https://, svn://, svn+[tunnelscheme]://)', SubversionCreator.external_url(name))
100
                    if ScmConfig['allow_add_local']
101
                      svntags.gsub!('(file:///, http://, https://, svn://, svn+[tunnelscheme]://)', SubversionCreator.external_url(name))
102
                    else
103
                      svntags << content_tag(:p,SubversionCreator.external_url(name))
104
                    end
90 105
                end
91 106
            end
92 107

  
93
- 
Terms of use | Privacy policy