$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 {
$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;
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 });
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,
);
"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?",
"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.",
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 = {
, 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({
});
} // 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
'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',
'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',
'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',
'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',
'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',
'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',
'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.',
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
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
<div id="requirement-spec-header">
<h1>
[%- 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") %]
<script type="text/javascript">
<!--
$(function() {
- var initially_open = ['sections'
-[%- FOREACH section = SELF.requirement_spec.sections -%]
- , "fb-[% section.id %]"
- [%- FOREACH function_block = section.children -%]
- , "fb-[% function_block.id -%]"
- [%- END -%]
-[%- END -%]
- ];
+ var tree_data = [
+ { data: [% JSON.json(LxERP.t8("Text blocks front")) %],
+ metadata: { type: "text-blocks-front" },
+ attr: { id: "tb-front", class: "text-block-context-menu" },
+ children: [
+[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=0) %]
+ [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
+[% END %]
+ ]},
- var tree_data = [{
- data: [% JSON.json(LxERP.t8("Sections")) %],
+ { data: [% JSON.json(LxERP.t8("Sections")) %],
metadata: { type: "sections" },
attr: { id: "sections", class: "section-context-menu" },
children: [
[% FOREACH section = SELF.requirement_spec.sections %]
[% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
[% END %]
- ]}];
+ ]},
-[% UNLESS SELF.requirement_spec.is_template %]
- tree_data.unshift({
- data: [% JSON.json(LxERP.t8("Text blocks front")) %],
- metadata: { type: "text-blocks-front" },
- attr: { id: "tb-front", class: "text-block-context-menu" },
- children: [
-[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=0) %]
- [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
-[% END %]
- ]});
-
- tree_data.push({
- data: [% JSON.json(LxERP.t8("Text blocks back")) %],
+ { data: [% JSON.json(LxERP.t8("Text blocks back")) %],
metadata: { type: "text-blocks-back" },
attr: { id: "tb-back", class: "text-block-context-menu" },
children: [
[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=1) %]
[% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
[% END %]
- ]});
+ ]}
+ ];
- initially_open = initially_open.concat(['tb-front', 'tb-back']);
-[% END %]
+ var initially_open = ['tb-front', 'tb-back', 'sections'
+[%- FOREACH section = SELF.requirement_spec.sections -%]
+ , "fb-[% section.id %]"
+ [%- FOREACH function_block = section.children -%]
+ , "fb-[% function_block.id -%]"
+ [%- END -%]
+[%- END -%]
+ ];
$('#tree').jstree({
core: {