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 @@ ...@@ -91,12 +91,8 @@
.merge-request-angle { .merge-request-angle {
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
background: #eee; font-size: 2em;
border-radius: 100px; line-height: 1.1;
width: 60px;
line-height: 60px;
color: #777;
text-shadow: 0 1px 2px #FFF;
} }
.merge-request-form-info { .merge-request-form-info {
...@@ -109,7 +105,6 @@ ...@@ -109,7 +105,6 @@
} }
.chosen-container .chosen-single { .chosen-container .chosen-single {
padding: 2px 0 2px 10px;
span { span {
font-weight: bold; font-weight: bold;
color: #555; color: #555;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
%p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. %p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
%hr %hr
.form-group .form-group
.issue_assignee .issue-assignee
= f.label :assignee_id, class: 'control-label' do = f.label :assignee_id, class: 'control-label' do
%i.icon-user %i.icon-user
Assign to Assign to
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
&nbsp; &nbsp;
= link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link' = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
.form-group .form-group
.issue_milestone .issue-milestone
= f.label :milestone_id, class: 'control-label' do = f.label :milestone_id, class: 'control-label' do
%i.icon-time %i.icon-time
Milestone 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? -if @merge_request.errors.any?
.alert.alert-danger .alert.alert-danger
%ul %ul
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= f.select(:source_branch, @merge_request.source_project.repository.branch_names, { include_blank: "Select branch" }, {class: 'source_branch chosen span2'}) = 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 .mr_source_commit.prepend-top-10
.col-md-2 .col-md-2
%h2.merge-request-angle.light .merge-request-angle
%i.icon-long-arrow-right %i.icon-long-arrow-right
.col-md-5 .col-md-5
.clearfix .clearfix
...@@ -31,25 +31,31 @@ ...@@ -31,25 +31,31 @@
%hr %hr
.merge-request-form-info .merge-request-form-info
.form-group .form-group
= f.label :title do = f.label :title, class: 'control-label' do
%strong= "Title *" %strong= "Title *"
.col-sm-10= f.text_field :title, class: "form-control pad js-gfm-input", maxlength: 255, rows: 5, required: true .col-sm-10= f.text_field :title, class: "form-control pad js-gfm-input", maxlength: 255, rows: 5, required: true
.form-group .form-group
.left = f.label :description, "Description", class: 'control-label'
= f.label :assignee_id do .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 %i.icon-user
Assign to Assign to
.col-sm-10= f.select(:assignee_id, assignee_options(@merge_request), { include_blank: "Select user" }, {class: 'chosen span3'}) .col-sm-10
.left = f.select(:assignee_id, assignee_options(@merge_request), { include_blank: "Select a user" }, {class: 'chosen'})
= f.label :milestone_id do &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 %i.icon-time
Milestone Milestone
.col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'chosen'}) .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 .form-actions
...@@ -83,3 +89,7 @@ ...@@ -83,3 +89,7 @@
target_branch.on("change", function() { target_branch.on("change", function() {
$.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() }); $.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