summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-04-13 16:24:48 +0000
committerJacob Schatz <jschatz1@gmail.com>2016-04-13 16:24:48 +0000
commite17f79fdfa40fb7cef02bdbc3f0f72a67da12893 (patch)
treec7cf7d8540719c622ea0015064825b29210c0f8a
parent59bfc0fb59b39f23ec19a788c965a61a1daf6129 (diff)
parent450a39ededbf93d0bfcec1d4774c3562b87fc190 (diff)
downloadgitlab-ce-e17f79fdfa40fb7cef02bdbc3f0f72a67da12893.tar.gz
Merge branch 'issuable-form-alignment' into 'master'
Fixed alignment on issuable new form Fixes #13802 ![Screen_Shot_2016-04-11_at_17.03.29](/uploads/d359580e693284d4b694d8158d4f736e/Screen_Shot_2016-04-11_at_17.03.29.png) See merge request !3661
-rw-r--r--app/assets/stylesheets/pages/issuable.scss6
-rw-r--r--app/views/shared/issuable/_form.html.haml6
2 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index 8b6f37f21b5..d9218e15095 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -322,3 +322,9 @@
color: #8c8c8c;
}
}
+
+.issuable-form-padding-top {
+ @media (min-width: $screen-sm-min) {
+ padding-top: 7px;
+ }
+}
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index 757a3812deb..1c89a2ee7f3 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -70,13 +70,13 @@
- if can? current_user, :admin_milestone, issuable.project
= link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank
.form-group
+ - has_labels = issuable.project.labels.any?
= f.label :label_ids, "Labels", class: 'control-label'
- .col-sm-10
- - if issuable.project.labels.any?
+ .col-sm-10{ class: ('issuable-form-padding-top' if !has_labels) }
+ - if has_labels
= f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
{ selected: issuable.label_ids }, multiple: true, class: 'select2', data: { placeholder: "Select labels" }
- else
- .prepend-top-10
%span.light No labels yet.
&nbsp;
- if can? current_user, :admin_label, issuable.project