From 9f6877898cc76446ad4fe927075494a9789ed838 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 10 May 2013 16:17:24 +0200 Subject: [PATCH] =?utf8?q?Pflichtenheftvorlagen:=20Textbl=C3=B6cke=20doch?= =?utf8?q?=20erfassen=20k=C3=B6nnen;=20daf=C3=BCr=20Wort=20"Abschnitt"=20e?= =?utf8?q?ntfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/RequirementSpec.pm | 10 +-- js/locale/de.js | 6 +- js/requirement_spec.js | 71 +++++++++---------- locale/de/all | 16 +++-- menus/erp.ini | 4 +- .../webpages/requirement_spec/_header.html | 2 +- templates/webpages/requirement_spec/show.html | 49 ++++++------- 7 files changed, 77 insertions(+), 81 deletions(-) diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index abcfbff1e..75d80341f 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -83,7 +83,7 @@ sub action_new { $self->requirement_spec->$_($self->copy_source->$_) for qw(type_id status_id customer_id title hourly_rate) } - $self->render('requirement_spec/new', title => $self->requirement_spec->is_template ? t8('Create a new requirement spec section template') : t8('Create a new requirement spec')); + $self->render('requirement_spec/new', title => $self->requirement_spec->is_template ? t8('Create a new requirement spec template') : t8('Create a new requirement spec')); } sub action_ajax_edit { @@ -277,9 +277,9 @@ sub create_or_update { $self->requirement_spec->assign_attributes(%{ $params }); - my $title = $is_new && $self->requirement_spec->is_template ? t8('Create a new requirement spec section template') + my $title = $is_new && $self->requirement_spec->is_template ? t8('Create a new requirement spec template') : $is_new ? t8('Create a new requirement spec') - : $self->requirement_spec->is_template ? t8('Edit section template') + : $self->requirement_spec->is_template ? t8('Edit requirement spec template') : t8('Edit requirement spec'); my @errors = $self->requirement_spec->validate; @@ -309,7 +309,7 @@ sub create_or_update { return $self->render('requirement_spec/new', title => $title); } - my $info = $self->requirement_spec->is_template ? t8('The section template has been saved.') : t8('The requirement spec has been saved.'); + my $info = $self->requirement_spec->is_template ? t8('The requirement spec template has been saved.') : t8('The requirement spec has been saved.'); if ($::request->is_ajax) { my $html = $self->render('requirement_spec/_header', { output => 0 }); @@ -381,7 +381,7 @@ sub prepare_report { output_format => 'HTML', raw_top_info_text => $self->render('requirement_spec/report_top', { output => 0 }, is_template => $is_template), raw_bottom_info_text => $self->render('requirement_spec/report_bottom', { output => 0 }), - title => $is_template ? t8('Requirement Spec Section Templates') : t8('Requirement Specs'), + title => $is_template ? t8('Requirement Spec Templates') : t8('Requirement Specs'), allow_pdf_export => 1, allow_csv_export => 1, ); diff --git a/js/locale/de.js b/js/locale/de.js index bb0c3a904..b6ad2006d 100644 --- a/js/locale/de.js +++ b/js/locale/de.js @@ -7,13 +7,13 @@ namespace("kivi").setupLocale({ "Are you sure?":"Sind Sie sicher?", "Copy":"Kopieren", "Copy requirement spec":"Pflichtenheft kopieren", -"Copy section template":"Abschnittsvorlage kopieren", +"Copy template":"Vorlage kopieren", "Create PDF":"PDF erzeugen", "Create new version":"Neue Version anlegen", "Database Connection Test":"Test der Datenbankverbindung", "Delete":"Löschen", "Delete requirement spec":"Pflichtenheft löschen", -"Delete section template":"Abschnittsvorlage löschen", +"Delete template":"Vorlage löschen", "Delete text block":"Textblock löschen", "Do you really want to cancel?":"Wollen Sie wirklich abbrechen?", "Do you really want to revert to this version?":"Wollen Sie wirklich auf diese Version zurücksetzen?", @@ -26,9 +26,9 @@ namespace("kivi").setupLocale({ "Part picker":"Artikelauswahl", "Paste":"Einfügen", "Requirement spec actions":"Pflichtenheftaktionen", +"Requirement spec template actions":"Pflichtenheftvorlagen-Aktionen", "Revert to version":"Auf Version zurücksetzen", "Save":"Speichern", -"Section template actions":"Abschnittsvorlagen-Aktionen", "Section/Function block actions":"Abschnitts-/Funktionsblockaktionen", "Text block actions":"Textblockaktionen", "The description is missing.":"Die Beschreibung fehlt.", diff --git a/js/requirement_spec.js b/js/requirement_spec.js index e9f9277e8..7773575b2 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -376,12 +376,11 @@ ns.create_context_menus = function(is_template) { if (is_template) { var general_actions = { sep98: "---------" - , general_actions: { name: kivi.t8('Section template actions'), className: 'context-menu-heading' } + , general_actions: { name: kivi.t8('Requirement spec template actions'), className: 'context-menu-heading' } // , sep99: "---------" - , copy_reqspec: { name: kivi.t8('Copy section template'), icon: "copy", callback: kivi.requirement_spec.copy_reqspec } - , delete_reqspec: { name: kivi.t8('Delete section template'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec } + , copy_reqspec: { name: kivi.t8('Copy template'), icon: "copy", callback: kivi.requirement_spec.copy_reqspec } + , delete_reqspec: { name: kivi.t8('Delete template'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec } }; - var events = {}; } else { // if (is_template) var general_actions = { @@ -394,38 +393,6 @@ ns.create_context_menus = function(is_template) { , delete_reqspec: { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec } }; - var events = { - show: kivi.requirement_spec.text_block_popup_menu_shown - , hide: kivi.requirement_spec.text_block_popup_menu_hidden - }; - - $.contextMenu({ - selector: '.text-block-context-menu', - events: { - show: kivi.requirement_spec.text_block_popup_menu_shown - , hide: kivi.requirement_spec.text_block_popup_menu_hidden - }, - items: $.extend({ - heading: { name: kivi.t8('Text block actions'), className: 'context-menu-heading' } - , add: { name: kivi.t8('Add text block'), icon: "add", callback: kivi.requirement_spec.standard_text_block_ajax_call } - , edit: { name: kivi.t8('Edit text block'), icon: "edit", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } - , delete: { name: kivi.t8('Delete text block'), icon: "delete", callback: kivi.requirement_spec.ask_delete_text_block, disabled: kivi.requirement_spec.disable_edit_text_block_commands } - , sep1: "---------" - , flag: { name: kivi.t8('Toggle marker'), icon: "flag", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } - , sep2: "---------" - , copy: { name: kivi.t8('Copy'), icon: "copy", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } - , paste: { name: kivi.t8('Paste'), icon: "paste", callback: kivi.requirement_spec.standard_text_block_ajax_call } - }, general_actions) - }); - - $.contextMenu({ - selector: '.time-cost-estimate-context-menu', - items: $.extend({ - heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' } - , edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call } - }, general_actions) - }); - $.contextMenu({ selector: '.edit-time-cost-estimate-context-menu', items: $.extend({ @@ -445,6 +412,38 @@ ns.create_context_menus = function(is_template) { }); } // if (is_template) ... else ... + var events = { + show: kivi.requirement_spec.text_block_popup_menu_shown + , hide: kivi.requirement_spec.text_block_popup_menu_hidden + }; + + $.contextMenu({ + selector: '.text-block-context-menu', + events: { + show: kivi.requirement_spec.text_block_popup_menu_shown + , hide: kivi.requirement_spec.text_block_popup_menu_hidden + }, + items: $.extend({ + heading: { name: kivi.t8('Text block actions'), className: 'context-menu-heading' } + , add: { name: kivi.t8('Add text block'), icon: "add", callback: kivi.requirement_spec.standard_text_block_ajax_call } + , edit: { name: kivi.t8('Edit text block'), icon: "edit", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } + , delete: { name: kivi.t8('Delete text block'), icon: "delete", callback: kivi.requirement_spec.ask_delete_text_block, disabled: kivi.requirement_spec.disable_edit_text_block_commands } + , sep1: "---------" + , flag: { name: kivi.t8('Toggle marker'), icon: "flag", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } + , sep2: "---------" + , copy: { name: kivi.t8('Copy'), icon: "copy", callback: kivi.requirement_spec.standard_text_block_ajax_call, disabled: kivi.requirement_spec.disable_edit_text_block_commands } + , paste: { name: kivi.t8('Paste'), icon: "paste", callback: kivi.requirement_spec.standard_text_block_ajax_call } + }, general_actions) + }); + + $.contextMenu({ + selector: '.time-cost-estimate-context-menu', + items: $.extend({ + heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' } + , edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call } + }, general_actions) + }); + $.contextMenu({ selector: '#content', items: general_actions diff --git a/locale/de/all b/locale/de/all index 50f66275f..b9c589b67 100755 --- a/locale/de/all +++ b/locale/de/all @@ -152,7 +152,7 @@ $self->{texts} = { 'Add RFQ' => 'Preisanfrage erfassen', 'Add Request for Quotation' => 'Anfrage erfassen', 'Add Requirement Spec' => 'Pflichtenheft erfassen', - 'Add Requirement Spec Section Template' => 'Pflichtenheft-Abschnittsvorlage erfassen', + 'Add Requirement Spec Template' => 'Pflichtenheftvorlage erfassen', 'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen', 'Add Sales Invoice' => 'Rechnung erfassen', 'Add Sales Order' => 'Auftrag erfassen', @@ -522,7 +522,7 @@ $self->{texts} = { 'Copy file from #1 to #2 failed: #3' => 'Kopieren der Datei von #1 nach #2 schlug fehl: #3', 'Copy' => 'Kopieren', 'Copy requirement spec' => 'Pflichtenheft kopieren', - 'Copy section template' => 'Abschnittsvorlage kopieren', + 'Copy template' => 'Vorlage kopieren', 'Correct taxkey' => 'Richtiger Steuerschlüssel', 'Cost' => 'Kosten', 'Costs' => 'Kosten', @@ -553,8 +553,8 @@ $self->{texts} = { 'Create a new project' => 'Neues Projekt anlegen', 'Create a new project type' => 'Einen neuen Projekttypen anlegen', 'Create a new requirement spec' => 'Ein neues Pflichtenheft anlegen', - 'Create a new requirement spec section template' => 'Eine neue Pflichtenheft-Abschnittsvorlage erfassen', 'Create a new requirement spec status' => 'Einen neuen Pflichtenheftstatus anlegen', + 'Create a new requirement spec template' => 'Eine neue Pflichtenheftvorlage erfassen', 'Create a new requirement spec type' => 'Einen neuen Pflichtenhefttypen anlegen', 'Create a new risk level' => 'Einen neuen Risikograd anlegen', 'Create a new section' => 'Neuen Abschnitt erstellen', @@ -730,7 +730,7 @@ $self->{texts} = { 'Delete links' => 'Verknüpfungen löschen', 'Delete profile' => 'Profil löschen', 'Delete requirement spec' => 'Pflichtenheft löschen', - 'Delete section template' => 'Abschnittsvorlage löschen', + 'Delete template' => 'Vorlage löschen', 'Delete text block' => 'Textblock löschen', 'Delete transaction' => 'Buchung löschen', 'Deleted' => 'Gelöscht', @@ -911,10 +911,10 @@ $self->{texts} = { 'Edit project type' => 'Projekttypen bearbeiten', 'Edit requirement spec' => 'Pflichtenheft bearbeiten', 'Edit requirement spec status' => 'Pflichtenheftstatus bearbeiten', + 'Edit requirement spec template' => 'Pflichtenheftvorlage bearbeiten', 'Edit requirement spec type' => 'Pflichtenhefttypen bearbeiten', 'Edit risk level' => 'Risikograd bearbeiten', 'Edit section #1' => 'Abschnitt #1 bearbeiten', - 'Edit section template' => 'Abschnittsvorlage bearbeiten', 'Edit templates' => 'Vorlagen bearbeiten', 'Edit text block' => 'Textblock bearbeiten', 'Edit text block \'#1\'' => 'Textblock \'#1\' bearbeiten', @@ -1870,17 +1870,18 @@ $self->{texts} = { 'Requested execution date to' => 'Gewünschtes Ausführungsdatum bis', 'Requests for Quotation' => 'Preisanfragen', 'Required by' => 'Lieferdatum', - 'Requirement Spec Section Templates' => 'Pflichtenheft-Abschnittsvorlagen', 'Requirement Spec Status' => 'Pflichtenheftstatus', 'Requirement Spec Statuses' => 'Pflichtenheftstatus', + 'Requirement Spec Templates' => 'Pflichtenheftvorlagen', 'Requirement Spec Type' => 'Pflichtenhefttyp', 'Requirement Spec Types' => 'Pflichtenhefttypen', 'Requirement Specs' => 'Pflichtenhefte', 'Requirement spec actions' => 'Pflichtenheftaktionen', 'Requirement spec function block #1 with #2 sub function blocks; description: "#3"' => 'Pflichtenheft-Funktionsblock #1 mit #2 Unterfunktionsblöcken; Beschreibung: "#3"', 'Requirement spec section #1 "#2" with #3 function blocks and a total of #4 sub function blocks; preamble: "#5"' => 'Pflichtenheftabschnitt #1 "#2" mit #3 Funktionsblöcken und insgesamt #4 Unterfunktionsblöcken; Einleitung: "#5"', - 'Requirement spec section template \'#1\'' => 'Pflichtenheft_Abschnittsvorlage \'#1\'', 'Requirement spec sub function block #1; description: "#2"' => 'Pflichtenheft-Unterfunktionsblock #1; Beschreibung: "#2"', + 'Requirement spec template \'#1\'' => 'Pflichtenheftvorlage \'#1\'', + 'Requirement spec template actions' => 'Pflichtenheftvorlagen-Aktionen', 'Requirement spec text block "#1"; content: "#2"' => 'Pflichtenheft-Textblock "1"; Inhalt: "#2"', 'Requirement specs' => 'Pflichtenhefte', 'Reset' => 'Zurücksetzen', @@ -2387,6 +2388,7 @@ $self->{texts} = { 'The requirement spec status has been deleted.' => 'Der Pflichtenheftstatus wurde gelöscht.', 'The requirement spec status has been saved.' => 'Der Pflichtenheftstatus wurde gespeichert.', 'The requirement spec status is in use and cannot be deleted.' => 'Der Pflichtenheftstatus wird verwendet und kann nicht gelöscht werden.', + 'The requirement spec template has been saved.' => 'Die Pflichtenheftvorlage wurde gespeichert.', 'The requirement spec type has been created.' => 'Der Pflichtenhefttyp wurde angelegt.', 'The requirement spec type has been deleted.' => 'Der Pflichtenhefttyp wurde gelöscht.', 'The requirement spec type has been saved.' => 'Der Pflichtenhefttyp wurde gespeichert.', diff --git a/menus/erp.ini b/menus/erp.ini index 41a1ca652..5c8776f63 100644 --- a/menus/erp.ini +++ b/menus/erp.ini @@ -35,7 +35,7 @@ ACCESS=project_edit module=controller.pl action=Project/new -[Master Data--Add Requirement Spec Section Template] +[Master Data--Add Requirement Spec Template] ACCESS=project_edit module=controller.pl action=RequirementSpec/new @@ -95,7 +95,7 @@ action=Project/list filter.active=active filter.valid=valid -[Master Data--Reports--Requirement Spec Section Templates] +[Master Data--Reports--Requirement Spec Templates] module=controller.pl action=RequirementSpec/list is_template=1 diff --git a/templates/webpages/requirement_spec/_header.html b/templates/webpages/requirement_spec/_header.html index 5a86a22c9..a7b077865 100644 --- a/templates/webpages/requirement_spec/_header.html +++ b/templates/webpages/requirement_spec/_header.html @@ -2,7 +2,7 @@

[%- IF SELF.requirement_spec.is_template %] - [%- HTML.escape(LxERP.t8("Requirement spec section template '#1'", SELF.requirement_spec.title)) %] + [%- HTML.escape(LxERP.t8("Requirement spec template '#1'", SELF.requirement_spec.title)) %] [%- ELSE %] [%- HTML.escape(SELF.requirement_spec.displayable_name('format', 'with_customer')) %] [% LxERP.t8("for") %] diff --git a/templates/webpages/requirement_spec/show.html b/templates/webpages/requirement_spec/show.html index c4819fe2f..28222b9d6 100644 --- a/templates/webpages/requirement_spec/show.html +++ b/templates/webpages/requirement_spec/show.html @@ -47,48 +47,43 @@