Improve Merge Request form
* added description * simplified form * enabled gfm autocomplete
This commit is contained in:
parent
76a0739454
commit
e0ca2adafd
4 changed files with 36 additions and 31 deletions
|
@ -18,6 +18,8 @@ class Dispatcher
|
|||
switch page
|
||||
when 'projects:issues:index'
|
||||
Issues.init()
|
||||
when 'projects:issues:new', 'projects:merge_requests:new'
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
when 'dashboard:show'
|
||||
new Dashboard()
|
||||
new Activities()
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
|
||||
.merge-request-angle {
|
||||
text-align: center;
|
||||
margin-top: 45px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.merge-request-form-info {
|
||||
|
|
|
@ -5,41 +5,32 @@
|
|||
- @merge_request.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
%h3.page-title
|
||||
Branches
|
||||
.merge-request-branches
|
||||
.row
|
||||
.span5
|
||||
.ui-box
|
||||
.title From
|
||||
.ui-box-head
|
||||
Project:
|
||||
= f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span4'})
|
||||
.prepend-top-10
|
||||
.clearfix
|
||||
.pull-left
|
||||
= f.select(:source_project_id,[[@merge_request.source_project.path_with_namespace,@merge_request.source_project.id]] , {}, {class: 'source_project chosen span3'})
|
||||
.pull-left
|
||||
|
||||
%i.icon-code-fork
|
||||
Branch:
|
||||
= f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span3'})
|
||||
= f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'})
|
||||
.mr_source_commit.prepend-top-10
|
||||
.span2
|
||||
%h1.merge-request-angle
|
||||
%i.icon-angle-right
|
||||
%h2.merge-request-angle.light
|
||||
%i.icon-long-arrow-right
|
||||
.span5
|
||||
.ui-box
|
||||
.title To
|
||||
.ui-box-head
|
||||
.clearfix
|
||||
.pull-left
|
||||
- projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project]
|
||||
Project:
|
||||
= f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span4'})
|
||||
.prepend-top-10
|
||||
= f.select(:target_project_id, projects.map { |proj| [proj.path_with_namespace,proj.id] }, {include_blank: "Select Target Project" }, {class: 'target_project chosen span3'})
|
||||
.pull-left
|
||||
|
||||
%i.icon-code-fork
|
||||
Branch:
|
||||
= f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span3'})
|
||||
= f.select(:target_branch, @target_branches, { include_blank: "Select branch" }, {class: 'target_branch chosen span2'})
|
||||
.mr_target_commit.prepend-top-10
|
||||
|
||||
%hr
|
||||
|
||||
%h3.page-title
|
||||
Details
|
||||
.merge-request-form-info
|
||||
.control-group
|
||||
= f.label :title do
|
||||
|
@ -56,6 +47,12 @@
|
|||
%i.icon-time
|
||||
Milestone
|
||||
.controls= f.select(:milestone_id, @project.milestones.active.all.map {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
|
||||
.control-group
|
||||
= f.label :description, "Description"
|
||||
.controls
|
||||
= f.text_area :description, class: "input-xxlarge js-gfm-input", rows: 14
|
||||
%p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
||||
|
||||
|
||||
.form-actions
|
||||
- if @merge_request.new_record?
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
%strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
|
||||
|
||||
|
||||
- if @merge_request.description.present?
|
||||
.ui-box-bottom
|
||||
.wiki
|
||||
= preserve do
|
||||
= markdown @merge_request.description
|
||||
|
||||
- if @merge_request.closed?
|
||||
.ui-box-bottom.alert-error
|
||||
%span
|
||||
|
|
Loading…
Reference in a new issue