summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-02 12:49:31 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-02 12:52:19 +0300
commitd2808476e3f85c9940500b84ee14d38615ceca41 (patch)
tree4b5b40e721ce70ef162990668b3cffa180436c97
parent9f939c9697c735839072185a9792338f617a2a41 (diff)
downloadgitlab-ce-d2808476e3f85c9940500b84ee14d38615ceca41.tar.gz
Add new milestone link. Hide empty milestone selectbox
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/views/projects/_issuable_form.html.haml10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml
index 0ae1fb3cabe..316b71f6be7 100644
--- a/app/views/projects/_issuable_form.html.haml
+++ b/app/views/projects/_issuable_form.html.haml
@@ -42,8 +42,14 @@
= f.label :milestone_id, class: 'control-label' do
%i.icon-time
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
.form-group
= f.label :label_ids, class: 'control-label' do
%i.icon-tag