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.
82 lines
3.7 KiB
82 lines
3.7 KiB
<% if @deliverable.new_record? %>
|
|
<p><%= f.select :kind, [[l(:label_cost_based_deliverable), CostBasedDeliverable.name], [l(:label_fixed_deliverable), FixedDeliverable.name]], {:required => true, :prompt => true }, :autocomplete => 'off' %></p>
|
|
<%= observe_field :deliverable_kind, :url => { :action => :new },
|
|
:update => :content,
|
|
:with => "Form.serialize('deliverable-form')" %>
|
|
|
|
<hr />
|
|
<% end %>
|
|
|
|
<p><%= f.text_field :subject, :size => 80, :required => true %></p>
|
|
<p><%= f.text_area :description,
|
|
:cols => 60,
|
|
:rows => (@deliverable.description.blank? ? 10 : [[10, @deliverable.description.length / 50].max, 100].min),
|
|
:accesskey => accesskey(:edit),
|
|
:class => 'wiki-edit' %></p>
|
|
|
|
<% if @deliverable.kind == "CostBasedDeliverable" -%>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
deliverableCostsForm = new Subform('<%= escape_javascript(render(:partial => "deliverable_cost", :object => DeliverableCost.new)) %>',<%= @deliverable.deliverable_costs.length %>,'deliverable_costs_body');
|
|
deliverableHoursForm = new Subform('<%= escape_javascript(render(:partial => "deliverable_hour", :object => DeliverableHour.new)) %>',<%= @deliverable.deliverable_hours.length %>,'deliverable_hours_body');
|
|
//]]>
|
|
</script>
|
|
|
|
<div class="splitcontentleft"><div class="p">
|
|
<label><%= l(:caption_materials_budget) %></label>
|
|
<table class="list deliverable_costs" id="deliverable_costs">
|
|
<thead><tr>
|
|
<th><%= l(:caption_cost_unit_plural)%></th>
|
|
<th><%= l(:caption_cost_type) %></th>
|
|
<% if User.current.allowed_to?(:view_unit_price, @project)%><th id="deliverable_costs_price"><%= l(:caption_budget) %></th><%end%>
|
|
<th></th>
|
|
</tr></thead>
|
|
<tbody id="deliverable_costs_body">
|
|
<%- @deliverable.deliverable_costs.each_with_index do |deliverable_cost, index| -%>
|
|
<%= render :partial => 'deliverable_cost', :object => deliverable_cost, :locals => {:index => index} %>
|
|
<%- end -%>
|
|
</tbody>
|
|
</table>
|
|
<div style="text-align: right"><%= link_to_function l(:button_add_material_cost), "deliverableCostsForm.add()", {:class => "icon icon-add"} %></div>
|
|
</div></div>
|
|
|
|
<div class="splitcontentright"><div class="p">
|
|
<label><%= l(:caption_labor_budget) %></label>
|
|
<table class="list deliverable_rates" id="deliverables_rates">
|
|
<thead><tr>
|
|
<th><%= l(:field_hours)%></th>
|
|
<th><%= l(:label_user) %></th>
|
|
<% if User.current.allowed_to?(:view_all_rates, @project) || User.current.allowed_to?(:view_own_rate, @project) %>
|
|
<th id="deliverable_hours_price"><%= l(:caption_budget) %></th>
|
|
<% end %>
|
|
<th></th>
|
|
</tr></thead>
|
|
<tbody id="deliverable_hours_body">
|
|
<%- @deliverable.deliverable_hours.each_with_index do |deliverable_hour, index| -%>
|
|
<%= render :partial => 'deliverable_hour', :object => deliverable_hour, :locals => {:index => index} %>
|
|
<%- end -%>
|
|
</tbody>
|
|
</table>
|
|
<div style="text-align: right"><%= link_to_function l(:button_add_labor_cost), "deliverableHoursForm.add()", {:class => "icon icon-add"} %></div>
|
|
</div></div>
|
|
|
|
<%- end %>
|
|
|
|
<div style="clear: both;"> </div>
|
|
|
|
<div class="splitcontentleft">
|
|
<p><%= f.check_box(:project_manager_signoff) %></p>
|
|
<p><%= f.check_box(:client_signoff) %></p>
|
|
</div>
|
|
|
|
<div class="splitcontentright">
|
|
<p><%= f.text_field :fixed_date, :size => 10 %><%= calendar_for('deliverable_fixed_date') %></p>
|
|
</div>
|
|
|
|
<div style="clear: both;"> </div>
|
|
|
|
<% if @deliverable.new_record? %>
|
|
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
|
<% end %>
|
|
|
|
<%= wikitoolbar_for 'deliverable_description' %>
|
|
|