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:

0008-removed-create-repository-button-from-inside-form-it.patch

Elektritter Messinger, 06 May 2014 12:12

Download (3.79 KB)

View differences:

lib/scm_repositories_helper_patch.rb
76 76
            end
77 77

  
78 78
            if repository.new_record? && SubversionCreator.enabled?
79
                if defined? observe_field # Rails 3.0 and below
80
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
81
                else # Rails 3.1 and above
82
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
83
                end
84
                svntags << content_tag(:p, add)
85 79
                svntags << hidden_field_tag(:operation, '', :id => 'repository_operation')
86 80
                unless request.post?
87 81
                    path = SubversionCreator.access_root_url(SubversionCreator.default_path(@project.identifier))
......
121 115
            end
122 116

  
123 117
            if repository.new_record? && MercurialCreator.enabled?
124
                if defined? observe_field # Rails 3.0 and below
125
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
126
                else # Rails 3.1 and above
127
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
128
                end
129
                hgtags<< content_tag(:p, add)
130 118
                hgtags << hidden_field_tag(:operation, '', :id => 'repository_operation')
131 119
                unless request.post?
132 120
                    path = MercurialCreator.access_root_url(MercurialCreator.default_path(@project.identifier))
......
168 156
            end
169 157

  
170 158
            if repository.new_record? && BazaarCreator.enabled?
171
                if defined? observe_field # Rails 3.0 and below
172
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
173
                else # Rails 3.1 and above
174
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
175
                end
176
                bzrtags<< content_tag(:p, add)
177 159
                bzrtags << hidden_field_tag(:operation, '', :id => 'repository_operation')
178 160
                unless request.post?
179 161
                    path = BazaarCreator.access_root_url(BazaarCreator.default_path(@project.identifier))
......
216 198
            @create_enabled = GitCreator.enabled?
217 199

  
218 200
            if repository.new_record? && GitCreator.enabled?
219
                if defined? observe_field # Rails 3.0 and below
220
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
221
                else # Rails 3.1 and above
222
                    add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
223
                end
224
                gittags<< content_tag(:p, add)
225 201
                gittags << hidden_field_tag(:operation, '', :id => 'repository_operation')
226 202
                unless request.post?
227 203
                    path = GitCreator.access_root_url(GitCreator.default_path(@project.identifier))
228
- 
Terms of use | Privacy policy