From: Moritz Bunkus Date: Wed, 15 May 2013 07:44:36 +0000 (+0200) Subject: Zeitabschätzung auch in Vorlagen bearbeiten können X-Git-Tag: release-3.2.0beta~467^2~153 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a7db9b362855bd38046dd5d55c1f2cfcba4a26b1;p=kivitendo-erp.git Zeitabschätzung auch in Vorlagen bearbeiten können --- diff --git a/js/requirement_spec.js b/js/requirement_spec.js index 3bfa69d6e..cfd56ef30 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -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 diff --git a/templates/webpages/requirement_spec/_show_time_and_cost_estimate.html b/templates/webpages/requirement_spec/_show_time_and_cost_estimate.html index 1c51e052f..c4a2baecb 100644 --- a/templates/webpages/requirement_spec/_show_time_and_cost_estimate.html +++ b/templates/webpages/requirement_spec/_show_time_and_cost_estimate.html @@ -17,7 +17,9 @@ [%- LxERP.t8("Complexity") %] [%- LxERP.t8("Risk") %] [%- LxERP.t8("Time estimate") %] - [%- LxERP.t8("Cost") %] + [%- UNLESS SELF.requirement_spec.is_template %] + [%- LxERP.t8("Cost") %] + [%- END %] @@ -35,7 +37,9 @@ [%- LxERP.t8("Sum for section") -%]: [%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%] - [%- LxERP.format_amount(section.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- UNLESS SELF.requirement_spec.is_template %] + [%- LxERP.format_amount(section.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- END %] [%- END -%] [%- END -%] @@ -45,7 +49,9 @@ [%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]: [%- P.format_man_days(SELF.requirement_spec.time_estimation) -%] - [%- LxERP.format_amount(SELF.requirement_spec.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- UNLESS SELF.requirement_spec.is_template %] + [%- LxERP.format_amount(SELF.requirement_spec.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- END %] diff --git a/templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html b/templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html index 844afd0b7..f12cf5743 100644 --- a/templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html +++ b/templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html @@ -7,7 +7,9 @@ [%- HTML.escape(item.risk.description) -%] [%- IF !item.children.size -%] [%- P.format_man_days(item.time_estimation, skip_zero=1) -%] - [%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- UNLESS SELF.requirement_spec.is_template %] + [%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- END %] [%- ELSE -%]     @@ -24,6 +26,8 @@ [%- LxERP.t8("Sum for #1", item.fb_number) -%]: [%- P.format_man_days(item.time_estimation, skip_zero=1) -%] - [%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- UNLESS SELF.requirement_spec.is_template %] + [%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate, 2) -%] EUR + [%- END %] [%- END -%] diff --git a/templates/webpages/requirement_spec/show.html b/templates/webpages/requirement_spec/show.html index 28222b9d6..072c6255a 100644 --- a/templates/webpages/requirement_spec/show.html +++ b/templates/webpages/requirement_spec/show.html @@ -10,8 +10,8 @@