2015-11-26 14:37:03 +05:30
|
|
|
- page_title "Milestones"
|
|
|
|
- header_title group_title(@group, "Milestones", group_milestones_path(@group))
|
|
|
|
|
|
|
|
%h3.page-title
|
|
|
|
New Milestone
|
|
|
|
|
|
|
|
%p.light
|
|
|
|
This will create milestone in every selected project
|
|
|
|
%hr
|
|
|
|
|
2016-06-02 11:05:42 +05:30
|
|
|
= form_for @milestone, url: group_milestones_path(@group), html: { class: 'form-horizontal milestone-form common-note-form js-quick-submit js-requires-input' } do |f|
|
2015-11-26 14:37:03 +05:30
|
|
|
.row
|
2016-06-02 11:05:42 +05:30
|
|
|
- if @milestone.errors.any?
|
|
|
|
#error_explanation
|
|
|
|
.alert.alert-danger
|
|
|
|
%ul
|
|
|
|
- @milestone.errors.full_messages.each do |msg|
|
|
|
|
%li
|
|
|
|
= msg
|
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
.col-md-6
|
|
|
|
.form-group
|
|
|
|
= f.label :title, "Title", class: "control-label"
|
|
|
|
.col-sm-10
|
2016-06-02 11:05:42 +05:30
|
|
|
= f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true
|
2015-11-26 14:37:03 +05:30
|
|
|
.form-group.milestone-description
|
|
|
|
= f.label :description, "Description", class: "control-label"
|
|
|
|
.col-sm-10
|
2017-08-17 22:00:37 +05:30
|
|
|
= render layout: 'projects/md_preview', locals: { url: '' } do
|
2016-06-02 11:05:42 +05:30
|
|
|
= render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...'
|
2015-11-26 14:37:03 +05:30
|
|
|
.clearfix
|
|
|
|
.error-alert
|
|
|
|
.form-group
|
|
|
|
= f.label :projects, "Projects", class: "control-label"
|
|
|
|
.col-sm-10
|
2016-11-03 12:29:30 +05:30
|
|
|
= f.collection_select :project_ids, @group.projects.non_archived, :id, :name,
|
2017-08-17 22:00:37 +05:30
|
|
|
{ selected: @group.projects.non_archived.pluck(:id) }, required: true, multiple: true, class: 'select2'
|
2015-11-26 14:37:03 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
= render "shared/milestones/form_dates", f: f
|
2015-11-26 14:37:03 +05:30
|
|
|
|
|
|
|
.form-actions
|
2017-08-17 22:00:37 +05:30
|
|
|
= f.submit 'Create milestone', class: "btn-create btn"
|
2015-11-26 14:37:03 +05:30
|
|
|
= link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel"
|