kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
165 lines
5.7 KiB
165 lines
5.7 KiB
<%#-- copyright
|
|
OpenProject is a project management system.
|
|
|
|
Copyright (C) 2012-2013 the OpenProject Team
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License version 3.
|
|
|
|
See doc/COPYRIGHT.rdoc for more details.
|
|
|
|
++#%>
|
|
|
|
<%= error_messages_for 'planning_element' %>
|
|
|
|
<h2 class="subject">
|
|
<% if planning_element.new_record? %>
|
|
<%= l("timelines.new_planning_element") %>
|
|
<% else %>
|
|
*<%=h planning_element.id %> <%=h planning_element.subject %>
|
|
<% end %>
|
|
</h2>
|
|
|
|
<%
|
|
date_input_options = {:size => 10}
|
|
unless planning_element.leaf?
|
|
date_input_options[:disabled] = "disabled"
|
|
date_input_options[:title] = l("timelines.dates_are_calculated_based_on_sub_elements")
|
|
end
|
|
%>
|
|
|
|
<div class="issue details">
|
|
<div class="meta">
|
|
<table class="attributes timelines-attributes">
|
|
<tr>
|
|
<th class="name">
|
|
<label for="planning_element_subject">
|
|
<%= PlanningElement.human_attribute_name(:subject) %><span class="required"> *</span>:
|
|
</label>
|
|
</th>
|
|
<td>
|
|
<%= f.text_field(:subject, :size => 50) %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="parent">
|
|
<label for="planning_element_parent_id">
|
|
<%= PlanningElement.human_attribute_name(:parent) %>:
|
|
</label>
|
|
</th>
|
|
<td>
|
|
<%= parent_id_select_tag(f, planning_element) %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="description">
|
|
<label for="planning_element_description">
|
|
<%= PlanningElement.human_attribute_name(:description)%>:
|
|
</label>
|
|
</th>
|
|
<td class="description">
|
|
<%= f.text_area(:description, :class => 'timelines-planning-element-description wiki-edit', :rows => 3) %>
|
|
<%= wikitoolbar_for 'planning_element_description' %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="planning-element-type">
|
|
<label for="planning_element_planning_element_type_id">
|
|
<%= PlanningElement.human_attribute_name(:planning_element_type) %>:
|
|
</label>
|
|
</th>
|
|
<td class="planning-element-type">
|
|
<%= f.select :planning_element_type_id, (project.planning_element_types.collect { |m| [m.name, m.id] }), :include_blank => true %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="responsible">
|
|
<label for="planning_element_responsible_id">
|
|
<%= PlanningElement.human_attribute_name(:responsible) %>:
|
|
</label>
|
|
</th>
|
|
<td class="responsible">
|
|
<%= f.select :responsible_id, options_for_responsible(project), :include_blank => true %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<%= l('timelines.current_planning')%><span class="required"> *</span>:
|
|
</th>
|
|
<td>
|
|
<label for="planning_element_start_date" class="hidden-for-sighted">
|
|
<%= l('timelines.current_planning') %>
|
|
<%= PlanningElement.human_attribute_name(:start_date) %>
|
|
</label>
|
|
<%= f.text_field :start_date, date_input_options %><%= calendar_for('planning_element_start_date') if planning_element.leaf? %>
|
|
|
|
-
|
|
|
|
<label for="planning_element_end_date" class="hidden-for-sighted">
|
|
<%= l('timelines.current_planning') %>
|
|
<%= PlanningElement.human_attribute_name(:end_date) %>
|
|
</label>
|
|
<%= f.text_field :end_date, date_input_options %><%= calendar_for('planning_element_end_date') if planning_element.leaf? %>
|
|
</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
<% planning_element.all_scenarios.each do |pe_scenario| %>
|
|
<%= fields_for 'planning_element[scenarios][]', pe_scenario do |scenario_fields| %>
|
|
<% id_base = "planning_element_scenarios_#{scenario_fields.object.id}" %>
|
|
<tr class="timelines-scenaric-dates">
|
|
<th>
|
|
<%= scenario_fields.hidden_field :id %>
|
|
<%=h scenario_fields.object.name %>:
|
|
</th>
|
|
<td>
|
|
<label class="hidden-for-sighted" for="<%= id_base %>_start_date">
|
|
<%=h scenario_fields.object.name %>
|
|
<%= PlanningElement.human_attribute_name(:start_date) %>
|
|
</label>
|
|
<%= scenario_fields.text_field :start_date, date_input_options %><%= calendar_for("#{id_base}_start_date") if planning_element.leaf? %>
|
|
|
|
-
|
|
|
|
<label class="hidden-for-sighted" for="<%= id_base %>_end_date">
|
|
<%=h scenario_fields.object.name %>
|
|
<%= PlanningElement.human_attribute_name(:end_date) %>
|
|
</label>
|
|
<%= scenario_fields.text_field :end_date, date_input_options %><%= calendar_for("#{id_base}_end_date") if planning_element.leaf? %>
|
|
|
|
<%= scenario_fields.check_box :_destroy %>
|
|
<label for="<%= id_base %>__destroy">
|
|
<%= t(:button_delete) %>
|
|
<span class="hidden-for-sighted">
|
|
<%=h scenario_fields.object.name %>
|
|
</span>
|
|
</label>
|
|
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<% unless planning_element.new_record? %>
|
|
<h3><%= l(:field_notes) %></h3>
|
|
<label for="planning_element_note" class="hidden-for-sighted">
|
|
<%= l(:field_notes) %>
|
|
</label>
|
|
<%= f.text_area 'note', :cols => 60, :rows => 3, :class => 'wiki-edit' %>
|
|
<%= wikitoolbar_for 'planning_element_note' %>
|
|
<% end %>
|
|
|
|
<%= submit_tag l(:button_save) %>
|
|
|
|
<% if planning_element.new_record? %>
|
|
<%= link_to l(:button_cancel), project_planning_elements_path(project),
|
|
:name => "cancelButton" %>
|
|
<% else %>
|
|
<%= link_to l(:button_cancel), project_planning_element_path(project,
|
|
planning_element),
|
|
:name => "cancelButton" %>
|
|
<% end %>
|
|
|