Commit 57001c23326c94cb846bc74b9734e1b1b683f5dd

Authored by Dmitriy Zaporozhets
1 parent ef735e82

Fix protected branches page UI

app/views/projects/protected_branches/index.html.haml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 .col-md-3 3 .col-md-3
4 = render "projects/branches/filter" 4 = render "projects/branches/filter"
5 .col-md-9 5 .col-md-9
6 - .alert.alert-info 6 + .bs-callout.bs-callout-info
7 %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}. 7 %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}.
8 %p This ability allows: 8 %p This ability allows:
9 %ul 9 %ul
@@ -12,18 +12,18 @@ @@ -12,18 +12,18 @@
12 %p Read more about project permissions #{link_to "here", help_permissions_path, class: "underlined_link"} 12 %p Read more about project permissions #{link_to "here", help_permissions_path, class: "underlined_link"}
13 13
14 - if can? current_user, :admin_project, @project 14 - if can? current_user, :admin_project, @project
15 - = form_for [@project, @protected_branch] do |f| 15 + = form_for [@project, @protected_branch], html: { class: 'form-horizontal' } do |f|
16 -if @protected_branch.errors.any? 16 -if @protected_branch.errors.any?
17 .alert.alert-danger 17 .alert.alert-danger
18 %ul 18 %ul
19 - @protected_branch.errors.full_messages.each do |msg| 19 - @protected_branch.errors.full_messages.each do |msg|
20 %li= msg 20 %li= msg
21 21
22 - .entry.clearfix  
23 - = f.label :name, "Branch"  
24 - .col-md-3  
25 - = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2 span3"})  
26 -   22 + .form-group
  23 + = f.label :name, "Branch", class: 'control-label'
  24 + .col-sm-10
  25 + = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"})
  26 + .form-actions
27 = f.submit 'Protect', class: "btn-create btn" 27 = f.submit 'Protect', class: "btn-create btn"
28 - unless @branches.empty? 28 - unless @branches.empty?
29 %h5 Already Protected: 29 %h5 Already Protected: