Commit eaec2350 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Style MR form page for twbs3

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5fa805a7
......@@ -91,12 +91,8 @@
.merge-request-angle {
text-align: center;
margin: 0 auto;
background: #eee;
border-radius: 100px;
width: 60px;
line-height: 60px;
color: #777;
text-shadow: 0 1px 2px #FFF;
font-size: 2em;
line-height: 1.1;
}
.merge-request-form-info {
......@@ -109,7 +105,6 @@
}
.chosen-container .chosen-single {
padding: 2px 0 2px 10px;
span {
font-weight: bold;
color: #555;
......
......@@ -19,7 +19,7 @@
%p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
%hr
.form-group
.issue_assignee
.issue-assignee
= f.label :assignee_id, class: 'control-label' do
%i.icon-user
Assign to
......@@ -28,7 +28,7 @@
&nbsp;
= link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
.form-group
.issue_milestone
.issue-milestone
= f.label :milestone_id, class: 'control-label' do
%i.icon-time
Milestone
......
= form_for [@project, @merge_request], html: { class: "#{controller.action_name}-merge-request form-horizontal" } do |f|
= form_for [@project, @merge_request], html: { class: "merge-request-form form-horizontal" } do |f|
-if @merge_request.errors.any?
.alert.alert-danger
%ul
......@@ -16,7 +16,7 @@
= 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
.col-md-2
%h2.merge-request-angle.light
.merge-request-angle
%i.icon-long-arrow-right
.col-md-5
.clearfix
......@@ -31,25 +31,31 @@
%hr
.merge-request-form-info
.form-group
= f.label :title do
= f.label :title, class: 'control-label' do
%strong= "Title *"
.col-sm-10= f.text_field :title, class: "form-control pad js-gfm-input", maxlength: 255, rows: 5, required: true
.form-group
.left
= f.label :assignee_id do
= f.label :description, "Description", class: 'control-label'
.col-sm-10
= f.text_area :description, class: "form-control js-gfm-input", rows: 14
%p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
%hr
.form-group
.merge-request-assignee
= f.label :assignee_id, class: 'control-label' do
%i.icon-user
Assign to
.col-sm-10= f.select(:assignee_id, assignee_options(@merge_request), { include_blank: "Select user" }, {class: 'chosen span3'})
.left
= f.label :milestone_id do
.col-sm-10
= f.select(:assignee_id, assignee_options(@merge_request), { include_blank: "Select a user" }, {class: 'chosen'})
&nbsp;
= link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
.form-group
.merge-request-milestone
= f.label :milestone_id, class: 'control-label' do
%i.icon-time
Milestone
.col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'chosen'})
.form-group
= f.label :description, "Description"
.col-sm-10
= f.text_area :description, class: "form-control js-gfm-input", rows: 14
%p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
.form-actions
......@@ -83,3 +89,7 @@
target_branch.on("change", function() {
$.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() });
});
$('.assign-to-me-link').on('click', function(e){
$('#merge_request_assignee_id').val("#{current_user.id}").trigger("chosen:updated");
e.preventDefault();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment