Commit e0ca2adafda95dbb0476847499d662623ff0b6be
1 parent
76a07394
Exists in
master
and in
4 other branches
Improve Merge Request form
* added description * simplified form * enabled gfm autocomplete
Showing
4 changed files
with
36 additions
and
31 deletions
Show diff stats
app/assets/javascripts/dispatcher.js.coffee
app/assets/stylesheets/sections/merge_requests.scss
app/views/projects/merge_requests/_form.html.haml
... | ... | @@ -5,41 +5,32 @@ |
5 | 5 | - @merge_request.errors.full_messages.each do |msg| |
6 | 6 | %li= msg |
7 | 7 | |
8 | - %h3.page-title | |
9 | - Branches | |
10 | 8 | .merge-request-branches |
11 | - .row | |
12 | - .span5 | |
13 | - .ui-box | |
14 | - .title From | |
15 | - .ui-box-head | |
16 | - Project: | |
17 | - = f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span4'}) | |
18 | - .prepend-top-10 | |
9 | + .row | |
10 | + .span5 | |
11 | + .clearfix | |
12 | + .pull-left | |
13 | + = f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'}) | |
14 | + .pull-left | |
15 | + | |
19 | 16 | %i.icon-code-fork |
20 | - Branch: | |
21 | - = f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span3'}) | |
22 | - .mr_source_commit.prepend-top-10 | |
23 | - .span2 | |
24 | - %h1.merge-request-angle | |
25 | - %i.icon-angle-right | |
26 | - .span5 | |
27 | - .ui-box | |
28 | - .title To | |
29 | - .ui-box-head | |
30 | - - projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project] | |
31 | - Project: | |
32 | - = f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span4'}) | |
33 | - .prepend-top-10 | |
17 | + = f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'}) | |
18 | + .mr_source_commit.prepend-top-10 | |
19 | + .span2 | |
20 | + %h2.merge-request-angle.light | |
21 | + %i.icon-long-arrow-right | |
22 | + .span5 | |
23 | + .clearfix | |
24 | + .pull-left | |
25 | + - projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project] | |
26 | + = f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span3'}) | |
27 | + .pull-left | |
28 | + | |
34 | 29 | %i.icon-code-fork |
35 | - Branch: | |
36 | - = f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span3'}) | |
37 | - .mr_target_commit.prepend-top-10 | |
30 | + = f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span2'}) | |
31 | + .mr_target_commit.prepend-top-10 | |
38 | 32 | |
39 | 33 | %hr |
40 | - | |
41 | - %h3.page-title | |
42 | - Details | |
43 | 34 | .merge-request-form-info |
44 | 35 | .control-group |
45 | 36 | = f.label :title do |
... | ... | @@ -56,6 +47,12 @@ |
56 | 47 | %i.icon-time |
57 | 48 | Milestone |
58 | 49 | .controls= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'}) |
50 | + .control-group | |
51 | + = f.label :description, "Description" | |
52 | + .controls | |
53 | + = f.text_area :description, class: "input-xxlarge js-gfm-input", rows: 14 | |
54 | + %p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. | |
55 | + | |
59 | 56 | |
60 | 57 | .form-actions |
61 | 58 | - if @merge_request.new_record? | ... | ... |
app/views/projects/merge_requests/show/_mr_box.html.haml
... | ... | @@ -21,6 +21,12 @@ |
21 | 21 | %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone) |
22 | 22 | |
23 | 23 | |
24 | + - if @merge_request.description.present? | |
25 | + .ui-box-bottom | |
26 | + .wiki | |
27 | + = preserve do | |
28 | + = markdown @merge_request.description | |
29 | + | |
24 | 30 | - if @merge_request.closed? |
25 | 31 | .ui-box-bottom.alert-error |
26 | 32 | %span | ... | ... |