Commit dcac37d9e41f21485822647b922ac952bf64358a

Authored by Dmitriy Zaporozhets
1 parent 8587e3a3

Restyle MR form page

app/assets/images/merge.png

593 Bytes

app/assets/stylesheets/sections/events.scss
... ... @@ -158,9 +158,3 @@
158 158 }
159 159 }
160 160 }
161   -
162   -.event-last-push .btn-create {
163   - position: relative;
164   - top: -3px;
165   - right: -30px;
166   -}
... ...
app/assets/stylesheets/sections/merge_requests.scss
... ... @@ -82,10 +82,6 @@
82 82 }
83 83 }
84 84  
85   -.mr_direction_tip {
86   - margin-top:40px
87   -}
88   -
89 85 .label-branch {
90 86 @include border-radius(4px);
91 87 padding: 2px 4px;
... ... @@ -113,3 +109,12 @@
113 109 }
114 110 }
115 111 }
  112 +
  113 +.merge-request-angle {
  114 + text-align: center;
  115 + margin-top: 45px;
  116 +}
  117 +
  118 +.merge-request-info {
  119 + padding: 15px 0;
  120 +}
... ...
app/views/events/_event_last_push.html.haml
1 1 - if show_last_push_widget?(event)
2   - .alert.alert-success.event-last-push
  2 + .event-last-push
3 3 %span You pushed to
4 4 = link_to project_commits_path(event.project, event.ref_name) do
5 5 %strong= truncate(event.ref_name, length: 28)
... ... @@ -11,3 +11,4 @@
11 11 .pull-right
12 12 = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-create btn-small" do
13 13 Create Merge Request
  14 + %hr
... ...
app/views/projects/merge_requests/_form.html.haml
... ... @@ -5,49 +5,48 @@
5 5 - @merge_request.errors.full_messages.each do |msg|
6 6 %li= msg
7 7  
8   - %fieldset
9   - %legend 1. Select Branches
  8 + %h3.page-title
  9 + %i.icon-code-fork
  10 + Branches
  11 + .merge-request-branches
  12 + .row
  13 + .span5
  14 + .light-well
  15 + %h5.cgray From (Head Branch)
  16 + = f.select(:source_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
  17 + .mr_source_commit.prepend-top-10
10 18  
11   - .row
12   - .span5
13   - .mr_branch_box
14   - %h5.cgray From (Head Branch)
15   - .body
16   - .padded= f.select(:source_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
17   - .mr_source_commit
  19 + .span2
  20 + %h1.merge-request-angle
  21 + %i.icon-angle-right
  22 + .span5
  23 + .light-well
  24 + %h5.cgray To (Base Branch)
  25 + = f.select(:target_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
  26 + .mr_target_commit.prepend-top-10
18 27  
19   - .span2
20   - %center= image_tag "merge.png", class: 'mr_direction_tip'
21   - .span5
22   - .mr_branch_box
23   - %h5.cgray To (Base Branch)
24   - .body
25   - .padded= f.select(:target_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
26   - .mr_target_commit
  28 + %hr
27 29  
28   - %fieldset
29   - %legend 2. Fill info
  30 + %h3.page-title
  31 + %i.icon-paper-clip
  32 + Details
  33 + .merge-request-info
  34 + .clearfix
  35 + = f.label :title do
  36 + %strong= "Title *"
  37 + .input= f.text_field :title, class: "input-xxlarge pad js-gfm-input", maxlength: 255, rows: 5, required: true
  38 + .clearfix
  39 + .left
  40 + = f.label :assignee_id do
  41 + %i.icon-user
  42 + Assign to
  43 + .input= f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
  44 + .left
  45 + = f.label :milestone_id do
  46 + %i.icon-time
  47 + Milestone
  48 + .input= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
30 49  
31   - .ui-box.ui-box-show
32   - .ui-box-head
33   - .clearfix
34   - = f.label :title do
35   - %strong= "Title *"
36   - .input= f.text_field :title, class: "input-xxlarge pad js-gfm-input", maxlength: 255, rows: 5, required: true
37   - .ui-box-body
38   - .clearfix
39   - .left
40   - = f.label :assignee_id do
41   - %i.icon-user
42   - Assign to
43   - .input= f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Select user" }, {class: 'chosen span3'})
44   - .left
45   - = f.label :milestone_id do
46   - %i.icon-time
47   - Milestone
48   - .input= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
49   -
50   - .control-group
51 50  
52 51 .form-actions
53 52 - if @merge_request.new_record?
... ...