--- /dev/null
+[%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
+[%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
+
+<div id="time_cost_estimate">
+ [%- IF !SELF.requirement_spec.sections.size %]
+ <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
+
+ [%- ELSE %]
+
+ [%- SET at_least_one_function_block = 0 %]
+
+ <table class="time-cost-estimate time-cost-estimate-context-menu">
+ <tbody>
+ [%- FOREACH section = SELF.requirement_spec.sections %]
+ <tr class="listheading">
+ <th>[%- LxERP.t8("Function block") %]</th>
+ <th>[%- LxERP.t8("Complexity") %]</th>
+ <th>[%- LxERP.t8("Risk") %]</th>
+ <th align="right">[%- LxERP.t8("Time estimate") %]</th>
+ <th align="right">[%- LxERP.t8("Cost") %]</th>
+ </tr>
+
+ <tr class="listrow section">
+ <td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td>
+ </tr>
+
+ [%- IF section.children.size %]
+ [%- SET at_least_one_function_block = 1 %]
+ [%- FOREACH child = section.children %]
+ [%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
+ item = child
+ level = 1 %]
+ [%- END %]
+
+ <tr class="listrow subtotal">
+ <td style="padding-left: 50px" colspan="3" class="sum">[%- LxERP.t8("Sum for section") -%]:</td>
+ <td align="right" nowrap>[%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%]</td>
+ <td align="right" nowrap>[%- LxERP.format_amount(section.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+ </tr>
+ [%- END -%]
+ [%- END -%]
+ </tbody>
+
+ <tfoot>
+ <tr>
+ <td colspan="3">[%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]:</td>
+ <td align="right" nowrap>[%- P.format_man_days(SELF.requirement_spec.time_estimation) -%]</td>
+ <td align="right" nowrap>[%- LxERP.format_amount(SELF.requirement_spec.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+ </tr>
+ </tfoot>
+ </table>
+ [%- END %]
+</div>