diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2018-08-25 17:32:59 +0200 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2018-09-04 11:05:40 -0500 |
commit | b47015ad9babf464c1e58ac78c92b8feb7084019 (patch) | |
tree | 83c08a4beddc893b95a91d3bc92da2457d5f25a5 /app/views/projects/default_branch | |
parent | afb49b044bcb71702edd3f5ef0139599ddc54ef5 (diff) | |
download | gitlab-ce-b47015ad9babf464c1e58ac78c92b8feb7084019.tar.gz |
Move project default branch settings under 'Repository'
- Updates specs accordingly
- Updates docs accordingly
- Brews a fresh pot
Diffstat (limited to 'app/views/projects/default_branch')
-rw-r--r-- | app/views/projects/default_branch/_show.html.haml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml new file mode 100644 index 00000000000..ff6a9d49a61 --- /dev/null +++ b/app/views/projects/default_branch/_show.html.haml @@ -0,0 +1,21 @@ +- expanded = Rails.env.test? + +%section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) } + .settings-header + %h4= _('Default Branch') + %button.btn.js-settings-toggle + = expanded ? _('Collapse') : _('Expand') + %p + = _('Select the branch you want to set as the default for this project. All merge requests and commits will automatically be made against this branch unless you specify a different one.') + + .settings-content + - if @project.empty_repo? + .text-secondary + = _('A default branch cannot be chosen for an empty project.') + - else + = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f| + %fieldset + .form-group + = f.label :default_branch, "Default Branch", class: 'label-bold' + = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'}) + = f.submit 'Save changes', class: "btn btn-success" |