summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-10-03 11:11:58 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-10-03 11:11:58 +0000
commit5709e8d76c6f1d2dd4fb25c2fc9f3799e33652a0 (patch)
treebd153afb52a47bfb23d5e1a53fe585ef753940a6 /app/views
parent5a541f5445345ccf4093e21f153f57f9b6162f82 (diff)
parentd3388d4790c6d09e97d9961e3e9de2d0c60d704b (diff)
downloadgitlab-ce-5709e8d76c6f1d2dd4fb25c2fc9f3799e33652a0.tar.gz
Merge branch 'new-milestone-link' into 'master'
New milestone and label links Fixes #1364 Fixes #1586 See merge request !1145
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/_issuable_form.html.haml18
1 files changed, 15 insertions, 3 deletions
diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml
index 19aced75836..6cdfab933b4 100644
--- a/app/views/projects/_issuable_form.html.haml
+++ b/app/views/projects/_issuable_form.html.haml
@@ -42,15 +42,27 @@
= f.label :milestone_id, class: 'control-label' do
%i.fa.fa-clock-o
Milestone
- .col-sm-10= f.select(:milestone_id, milestone_options(issuable),
- { include_blank: 'Select milestone' }, { class: 'select2' })
+ .col-sm-10
+ - if milestone_options(issuable).present?
+ = f.select(:milestone_id, milestone_options(issuable),
+ { include_blank: 'Select milestone' }, { class: 'select2' })
+ - else
+ %span.light No open milestones available.
+ &nbsp;
+ = link_to 'Create new milestone', new_project_milestone_path(issuable.project)
.form-group
= f.label :label_ids, class: 'control-label' do
%i.icon-tag
Labels
.col-sm-10
- = f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
+ - if issuable.project.labels.any?
+ = f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
{ selected: issuable.label_ids }, multiple: true, class: 'select2'
+ - else
+ %span.light No labels yet.
+ &nbsp;
+ = link_to 'Create new label', new_project_label_path(issuable.project)
+
.form-actions
- if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'