Add new milestone link. Hide empty milestone selectbox

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-10-02 12:49:31 +03:00
parent 9f939c9697
commit d2808476e3

View file

@ -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),
.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