Zeitabschätzung auch in Vorlagen bearbeiten können
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 15 May 2013 07:44:36 +0000 (09:44 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 1 Apr 2014 11:03:23 +0000 (13:03 +0200)
js/requirement_spec.js
templates/webpages/requirement_spec/_show_time_and_cost_estimate.html
templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html
templates/webpages/requirement_spec/show.html

index 3bfa69d..cfd56ef 100644 (file)
@@ -398,15 +398,6 @@ ns.create_context_menus = function(is_template) {
       , paste_template:     { name: kivi.t8('Paste template'),     icon: "paste",  callback: kivi.requirement_spec.paste_template }
     };
 
-    $.contextMenu({
-      selector: '.edit-time-cost-estimate-context-menu',
-      items:    $.extend({
-          heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' }
-        , save:    { name: kivi.t8('Save'),   icon: "save",  callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
-        , cancel:  { name: kivi.t8('Cancel'), icon: "close", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
-      }, general_actions)
-    });
-
     $.contextMenu({
       selector: '.versioned-copy-context-menu',
       items:    $.extend({
@@ -452,6 +443,15 @@ ns.create_context_menus = function(is_template) {
     }, general_actions)
   });
 
+  $.contextMenu({
+    selector: '.edit-time-cost-estimate-context-menu',
+    items:    $.extend({
+        heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' }
+      , save:    { name: kivi.t8('Save'),   icon: "save",  callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
+      , cancel:  { name: kivi.t8('Cancel'), icon: "close", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
+    }, general_actions)
+  });
+
   $.contextMenu({
     selector: '#content',
     items:    general_actions
index 1c51e05..c4a2bae 100644 (file)
@@ -17,7 +17,9 @@
       <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>
+      [%- UNLESS SELF.requirement_spec.is_template %]
+       <th align="right">[%- LxERP.t8("Cost") %]</th>
+      [%- END %]
      </tr>
 
      <tr class="listrow section">
@@ -35,7 +37,9 @@
       <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>
+       [%- UNLESS SELF.requirement_spec.is_template %]
+        <td align="right" nowrap>[%- LxERP.format_amount(section.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+       [%- END %]
       </tr>
      [%- END -%]
     [%- END -%]
@@ -45,7 +49,9 @@
     <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>
+     [%- UNLESS SELF.requirement_spec.is_template %]
+      <td align="right" nowrap>[%- LxERP.format_amount(SELF.requirement_spec.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+     [%- END %]
     </tr>
    </tfoot>
   </table>
index 844afd0..f12cf57 100644 (file)
@@ -7,7 +7,9 @@
  <td>[%- HTML.escape(item.risk.description) -%]</td>
  [%- IF !item.children.size -%]
   <td align="right" nowrap>[%- P.format_man_days(item.time_estimation, skip_zero=1) -%]</td>
-  <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+  [%- UNLESS SELF.requirement_spec.is_template %]
+   <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+  [%- END %]
  [%- ELSE -%]
   <td>&nbsp;</td>
   <td>&nbsp;</td>
@@ -24,6 +26,8 @@
  <tr class="listrow subtotal">
   <td style="padding-left: [%- (level + 1) * 50 -%]px" colspan="3">[%- LxERP.t8("Sum for #1", item.fb_number) -%]:</td>
   <td align="right" nowrap>[%- P.format_man_days(item.time_estimation, skip_zero=1) -%]</td>
-  <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+  [%- UNLESS SELF.requirement_spec.is_template %]
+   <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR</td>
+  [%- END %]
  </tr>
 [%- END -%]
index 28222b9..072c625 100644 (file)
@@ -10,8 +10,8 @@
  <ul>
   <li><a href="#function-blocks-tab">[%- LxERP.t8("Content") %]</a></li>
   <li><a href="controller.pl?action=RequirementSpec/ajax_edit&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Basic settings") %]</a></li>
+  <li><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Time and cost estimate") %]</a></li>
   [%- UNLESS SELF.requirement_spec.is_template %]
-   <li><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Time and cost estimate") %]</a></li>
    <li><a href="controller.pl?action=RequirementSpecVersion/list&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Versions") %]</a></li>
   [%- END %]
  </ul>