Revision 9f687789
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/RequirementSpec.pm | ||
---|---|---|
83 | 83 |
$self->requirement_spec->$_($self->copy_source->$_) for qw(type_id status_id customer_id title hourly_rate) |
84 | 84 |
} |
85 | 85 |
|
86 |
$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'));
|
|
86 |
$self->render('requirement_spec/new', title => $self->requirement_spec->is_template ? t8('Create a new requirement spec template') : t8('Create a new requirement spec')); |
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
sub action_ajax_edit { |
... | ... | |
277 | 277 |
|
278 | 278 |
$self->requirement_spec->assign_attributes(%{ $params }); |
279 | 279 |
|
280 |
my $title = $is_new && $self->requirement_spec->is_template ? t8('Create a new requirement spec section template')
|
|
280 |
my $title = $is_new && $self->requirement_spec->is_template ? t8('Create a new requirement spec template') |
|
281 | 281 |
: $is_new ? t8('Create a new requirement spec') |
282 |
: $self->requirement_spec->is_template ? t8('Edit section template')
|
|
282 |
: $self->requirement_spec->is_template ? t8('Edit requirement spec template')
|
|
283 | 283 |
: t8('Edit requirement spec'); |
284 | 284 |
|
285 | 285 |
my @errors = $self->requirement_spec->validate; |
... | ... | |
309 | 309 |
return $self->render('requirement_spec/new', title => $title); |
310 | 310 |
} |
311 | 311 |
|
312 |
my $info = $self->requirement_spec->is_template ? t8('The section template has been saved.') : t8('The requirement spec has been saved.');
|
|
312 |
my $info = $self->requirement_spec->is_template ? t8('The requirement spec template has been saved.') : t8('The requirement spec has been saved.');
|
|
313 | 313 |
|
314 | 314 |
if ($::request->is_ajax) { |
315 | 315 |
my $html = $self->render('requirement_spec/_header', { output => 0 }); |
... | ... | |
381 | 381 |
output_format => 'HTML', |
382 | 382 |
raw_top_info_text => $self->render('requirement_spec/report_top', { output => 0 }, is_template => $is_template), |
383 | 383 |
raw_bottom_info_text => $self->render('requirement_spec/report_bottom', { output => 0 }), |
384 |
title => $is_template ? t8('Requirement Spec Section Templates') : t8('Requirement Specs'),
|
|
384 |
title => $is_template ? t8('Requirement Spec Templates') : t8('Requirement Specs'), |
|
385 | 385 |
allow_pdf_export => 1, |
386 | 386 |
allow_csv_export => 1, |
387 | 387 |
); |
js/locale/de.js | ||
---|---|---|
7 | 7 |
"Are you sure?":"Sind Sie sicher?", |
8 | 8 |
"Copy":"Kopieren", |
9 | 9 |
"Copy requirement spec":"Pflichtenheft kopieren", |
10 |
"Copy section template":"Abschnittsvorlage kopieren",
|
|
10 |
"Copy template":"Vorlage kopieren",
|
|
11 | 11 |
"Create PDF":"PDF erzeugen", |
12 | 12 |
"Create new version":"Neue Version anlegen", |
13 | 13 |
"Database Connection Test":"Test der Datenbankverbindung", |
14 | 14 |
"Delete":"Löschen", |
15 | 15 |
"Delete requirement spec":"Pflichtenheft löschen", |
16 |
"Delete section template":"Abschnittsvorlage löschen",
|
|
16 |
"Delete template":"Vorlage löschen",
|
|
17 | 17 |
"Delete text block":"Textblock löschen", |
18 | 18 |
"Do you really want to cancel?":"Wollen Sie wirklich abbrechen?", |
19 | 19 |
"Do you really want to revert to this version?":"Wollen Sie wirklich auf diese Version zurücksetzen?", |
... | ... | |
26 | 26 |
"Part picker":"Artikelauswahl", |
27 | 27 |
"Paste":"Einfügen", |
28 | 28 |
"Requirement spec actions":"Pflichtenheftaktionen", |
29 |
"Requirement spec template actions":"Pflichtenheftvorlagen-Aktionen", |
|
29 | 30 |
"Revert to version":"Auf Version zurücksetzen", |
30 | 31 |
"Save":"Speichern", |
31 |
"Section template actions":"Abschnittsvorlagen-Aktionen", |
|
32 | 32 |
"Section/Function block actions":"Abschnitts-/Funktionsblockaktionen", |
33 | 33 |
"Text block actions":"Textblockaktionen", |
34 | 34 |
"The description is missing.":"Die Beschreibung fehlt.", |
js/requirement_spec.js | ||
---|---|---|
376 | 376 |
if (is_template) { |
377 | 377 |
var general_actions = { |
378 | 378 |
sep98: "---------" |
379 |
, general_actions: { name: kivi.t8('Section template actions'), className: 'context-menu-heading' }
|
|
379 |
, general_actions: { name: kivi.t8('Requirement spec template actions'), className: 'context-menu-heading' }
|
|
380 | 380 |
// , sep99: "---------" |
381 |
, copy_reqspec: { name: kivi.t8('Copy section template'), icon: "copy", callback: kivi.requirement_spec.copy_reqspec }
|
|
382 |
, delete_reqspec: { name: kivi.t8('Delete section template'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec }
|
|
381 |
, copy_reqspec: { name: kivi.t8('Copy template'), icon: "copy", callback: kivi.requirement_spec.copy_reqspec } |
|
382 |
, delete_reqspec: { name: kivi.t8('Delete template'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec } |
|
383 | 383 |
}; |
384 |
var events = {}; |
|
385 | 384 |
|
386 | 385 |
} else { // if (is_template) |
387 | 386 |
var general_actions = { |
... | ... | |
394 | 393 |
, delete_reqspec: { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec } |
395 | 394 |
}; |
396 | 395 |
|
397 |
var events = { |
|
398 |
show: kivi.requirement_spec.text_block_popup_menu_shown |
|
399 |
, hide: kivi.requirement_spec.text_block_popup_menu_hidden |
|
400 |
}; |
|
401 |
|
|
402 |
$.contextMenu({ |
|
403 |
selector: '.text-block-context-menu', |
|
404 |
events: { |
|
405 |
show: kivi.requirement_spec.text_block_popup_menu_shown |
|
406 |
, hide: kivi.requirement_spec.text_block_popup_menu_hidden |
|
407 |
}, |
|
408 |
items: $.extend({ |
|
409 |
heading: { name: kivi.t8('Text block actions'), className: 'context-menu-heading' } |
|
410 |
, add: { name: kivi.t8('Add text block'), icon: "add", callback: kivi.requirement_spec.standard_text_block_ajax_call } |
|
411 |
, 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 } |
|
412 |
, 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 } |
|
413 |
, sep1: "---------" |
|
414 |
, 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 } |
|
415 |
, sep2: "---------" |
|
416 |
, 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 } |
|
417 |
, paste: { name: kivi.t8('Paste'), icon: "paste", callback: kivi.requirement_spec.standard_text_block_ajax_call } |
|
418 |
}, general_actions) |
|
419 |
}); |
|
420 |
|
|
421 |
$.contextMenu({ |
|
422 |
selector: '.time-cost-estimate-context-menu', |
|
423 |
items: $.extend({ |
|
424 |
heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' } |
|
425 |
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call } |
|
426 |
}, general_actions) |
|
427 |
}); |
|
428 |
|
|
429 | 396 |
$.contextMenu({ |
430 | 397 |
selector: '.edit-time-cost-estimate-context-menu', |
431 | 398 |
items: $.extend({ |
... | ... | |
445 | 412 |
}); |
446 | 413 |
} // if (is_template) ... else ... |
447 | 414 |
|
415 |
var events = { |
|
416 |
show: kivi.requirement_spec.text_block_popup_menu_shown |
|
417 |
, hide: kivi.requirement_spec.text_block_popup_menu_hidden |
|
418 |
}; |
|
419 |
|
|
420 |
$.contextMenu({ |
|
421 |
selector: '.text-block-context-menu', |
|
422 |
events: { |
|
423 |
show: kivi.requirement_spec.text_block_popup_menu_shown |
|
424 |
, hide: kivi.requirement_spec.text_block_popup_menu_hidden |
|
425 |
}, |
|
426 |
items: $.extend({ |
|
427 |
heading: { name: kivi.t8('Text block actions'), className: 'context-menu-heading' } |
|
428 |
, add: { name: kivi.t8('Add text block'), icon: "add", callback: kivi.requirement_spec.standard_text_block_ajax_call } |
|
429 |
, 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 } |
|
430 |
, 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 } |
|
431 |
, sep1: "---------" |
|
432 |
, 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 } |
|
433 |
, sep2: "---------" |
|
434 |
, 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 } |
|
435 |
, paste: { name: kivi.t8('Paste'), icon: "paste", callback: kivi.requirement_spec.standard_text_block_ajax_call } |
|
436 |
}, general_actions) |
|
437 |
}); |
|
438 |
|
|
439 |
$.contextMenu({ |
|
440 |
selector: '.time-cost-estimate-context-menu', |
|
441 |
items: $.extend({ |
|
442 |
heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' } |
|
443 |
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call } |
|
444 |
}, general_actions) |
|
445 |
}); |
|
446 |
|
|
448 | 447 |
$.contextMenu({ |
449 | 448 |
selector: '#content', |
450 | 449 |
items: general_actions |
locale/de/all | ||
---|---|---|
152 | 152 |
'Add RFQ' => 'Preisanfrage erfassen', |
153 | 153 |
'Add Request for Quotation' => 'Anfrage erfassen', |
154 | 154 |
'Add Requirement Spec' => 'Pflichtenheft erfassen', |
155 |
'Add Requirement Spec Section Template' => 'Pflichtenheft-Abschnittsvorlage erfassen',
|
|
155 |
'Add Requirement Spec Template' => 'Pflichtenheftvorlage erfassen',
|
|
156 | 156 |
'Add Sales Delivery Order' => 'Lieferschein (Verkauf) erfassen', |
157 | 157 |
'Add Sales Invoice' => 'Rechnung erfassen', |
158 | 158 |
'Add Sales Order' => 'Auftrag erfassen', |
... | ... | |
522 | 522 |
'Copy file from #1 to #2 failed: #3' => 'Kopieren der Datei von #1 nach #2 schlug fehl: #3', |
523 | 523 |
'Copy' => 'Kopieren', |
524 | 524 |
'Copy requirement spec' => 'Pflichtenheft kopieren', |
525 |
'Copy section template' => 'Abschnittsvorlage kopieren',
|
|
525 |
'Copy template' => 'Vorlage kopieren',
|
|
526 | 526 |
'Correct taxkey' => 'Richtiger Steuerschlüssel', |
527 | 527 |
'Cost' => 'Kosten', |
528 | 528 |
'Costs' => 'Kosten', |
... | ... | |
553 | 553 |
'Create a new project' => 'Neues Projekt anlegen', |
554 | 554 |
'Create a new project type' => 'Einen neuen Projekttypen anlegen', |
555 | 555 |
'Create a new requirement spec' => 'Ein neues Pflichtenheft anlegen', |
556 |
'Create a new requirement spec section template' => 'Eine neue Pflichtenheft-Abschnittsvorlage erfassen', |
|
557 | 556 |
'Create a new requirement spec status' => 'Einen neuen Pflichtenheftstatus anlegen', |
557 |
'Create a new requirement spec template' => 'Eine neue Pflichtenheftvorlage erfassen', |
|
558 | 558 |
'Create a new requirement spec type' => 'Einen neuen Pflichtenhefttypen anlegen', |
559 | 559 |
'Create a new risk level' => 'Einen neuen Risikograd anlegen', |
560 | 560 |
'Create a new section' => 'Neuen Abschnitt erstellen', |
... | ... | |
730 | 730 |
'Delete links' => 'Verknüpfungen löschen', |
731 | 731 |
'Delete profile' => 'Profil löschen', |
732 | 732 |
'Delete requirement spec' => 'Pflichtenheft löschen', |
733 |
'Delete section template' => 'Abschnittsvorlage löschen',
|
|
733 |
'Delete template' => 'Vorlage löschen',
|
|
734 | 734 |
'Delete text block' => 'Textblock löschen', |
735 | 735 |
'Delete transaction' => 'Buchung löschen', |
736 | 736 |
'Deleted' => 'Gelöscht', |
... | ... | |
911 | 911 |
'Edit project type' => 'Projekttypen bearbeiten', |
912 | 912 |
'Edit requirement spec' => 'Pflichtenheft bearbeiten', |
913 | 913 |
'Edit requirement spec status' => 'Pflichtenheftstatus bearbeiten', |
914 |
'Edit requirement spec template' => 'Pflichtenheftvorlage bearbeiten', |
|
914 | 915 |
'Edit requirement spec type' => 'Pflichtenhefttypen bearbeiten', |
915 | 916 |
'Edit risk level' => 'Risikograd bearbeiten', |
916 | 917 |
'Edit section #1' => 'Abschnitt #1 bearbeiten', |
917 |
'Edit section template' => 'Abschnittsvorlage bearbeiten', |
|
918 | 918 |
'Edit templates' => 'Vorlagen bearbeiten', |
919 | 919 |
'Edit text block' => 'Textblock bearbeiten', |
920 | 920 |
'Edit text block \'#1\'' => 'Textblock \'#1\' bearbeiten', |
... | ... | |
1870 | 1870 |
'Requested execution date to' => 'Gewünschtes Ausführungsdatum bis', |
1871 | 1871 |
'Requests for Quotation' => 'Preisanfragen', |
1872 | 1872 |
'Required by' => 'Lieferdatum', |
1873 |
'Requirement Spec Section Templates' => 'Pflichtenheft-Abschnittsvorlagen', |
|
1874 | 1873 |
'Requirement Spec Status' => 'Pflichtenheftstatus', |
1875 | 1874 |
'Requirement Spec Statuses' => 'Pflichtenheftstatus', |
1875 |
'Requirement Spec Templates' => 'Pflichtenheftvorlagen', |
|
1876 | 1876 |
'Requirement Spec Type' => 'Pflichtenhefttyp', |
1877 | 1877 |
'Requirement Spec Types' => 'Pflichtenhefttypen', |
1878 | 1878 |
'Requirement Specs' => 'Pflichtenhefte', |
1879 | 1879 |
'Requirement spec actions' => 'Pflichtenheftaktionen', |
1880 | 1880 |
'Requirement spec function block #1 with #2 sub function blocks; description: "#3"' => 'Pflichtenheft-Funktionsblock #1 mit #2 Unterfunktionsblöcken; Beschreibung: "#3"', |
1881 | 1881 |
'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"', |
1882 |
'Requirement spec section template \'#1\'' => 'Pflichtenheft_Abschnittsvorlage \'#1\'', |
|
1883 | 1882 |
'Requirement spec sub function block #1; description: "#2"' => 'Pflichtenheft-Unterfunktionsblock #1; Beschreibung: "#2"', |
1883 |
'Requirement spec template \'#1\'' => 'Pflichtenheftvorlage \'#1\'', |
|
1884 |
'Requirement spec template actions' => 'Pflichtenheftvorlagen-Aktionen', |
|
1884 | 1885 |
'Requirement spec text block "#1"; content: "#2"' => 'Pflichtenheft-Textblock "1"; Inhalt: "#2"', |
1885 | 1886 |
'Requirement specs' => 'Pflichtenhefte', |
1886 | 1887 |
'Reset' => 'Zurücksetzen', |
... | ... | |
2387 | 2388 |
'The requirement spec status has been deleted.' => 'Der Pflichtenheftstatus wurde gelöscht.', |
2388 | 2389 |
'The requirement spec status has been saved.' => 'Der Pflichtenheftstatus wurde gespeichert.', |
2389 | 2390 |
'The requirement spec status is in use and cannot be deleted.' => 'Der Pflichtenheftstatus wird verwendet und kann nicht gelöscht werden.', |
2391 |
'The requirement spec template has been saved.' => 'Die Pflichtenheftvorlage wurde gespeichert.', |
|
2390 | 2392 |
'The requirement spec type has been created.' => 'Der Pflichtenhefttyp wurde angelegt.', |
2391 | 2393 |
'The requirement spec type has been deleted.' => 'Der Pflichtenhefttyp wurde gelöscht.', |
2392 | 2394 |
'The requirement spec type has been saved.' => 'Der Pflichtenhefttyp wurde gespeichert.', |
menus/erp.ini | ||
---|---|---|
35 | 35 |
module=controller.pl |
36 | 36 |
action=Project/new |
37 | 37 |
|
38 |
[Master Data--Add Requirement Spec Section Template]
|
|
38 |
[Master Data--Add Requirement Spec Template] |
|
39 | 39 |
ACCESS=project_edit |
40 | 40 |
module=controller.pl |
41 | 41 |
action=RequirementSpec/new |
... | ... | |
95 | 95 |
filter.active=active |
96 | 96 |
filter.valid=valid |
97 | 97 |
|
98 |
[Master Data--Reports--Requirement Spec Section Templates]
|
|
98 |
[Master Data--Reports--Requirement Spec Templates] |
|
99 | 99 |
module=controller.pl |
100 | 100 |
action=RequirementSpec/list |
101 | 101 |
is_template=1 |
templates/webpages/requirement_spec/_header.html | ||
---|---|---|
2 | 2 |
<div id="requirement-spec-header"> |
3 | 3 |
<h1> |
4 | 4 |
[%- IF SELF.requirement_spec.is_template %] |
5 |
[%- HTML.escape(LxERP.t8("Requirement spec section template '#1'", SELF.requirement_spec.title)) %]
|
|
5 |
[%- HTML.escape(LxERP.t8("Requirement spec template '#1'", SELF.requirement_spec.title)) %] |
|
6 | 6 |
[%- ELSE %] |
7 | 7 |
[%- HTML.escape(SELF.requirement_spec.displayable_name('format', 'with_customer')) %] |
8 | 8 |
[% LxERP.t8("for") %] |
templates/webpages/requirement_spec/show.html | ||
---|---|---|
47 | 47 |
<script type="text/javascript"> |
48 | 48 |
<!-- |
49 | 49 |
$(function() { |
50 |
var initially_open = ['sections' |
|
51 |
[%- FOREACH section = SELF.requirement_spec.sections -%] |
|
52 |
, "fb-[% section.id %]" |
|
53 |
[%- FOREACH function_block = section.children -%] |
|
54 |
, "fb-[% function_block.id -%]" |
|
55 |
[%- END -%] |
|
56 |
[%- END -%] |
|
57 |
]; |
|
50 |
var tree_data = [ |
|
51 |
{ data: [% JSON.json(LxERP.t8("Text blocks front")) %], |
|
52 |
metadata: { type: "text-blocks-front" }, |
|
53 |
attr: { id: "tb-front", class: "text-block-context-menu" }, |
|
54 |
children: [ |
|
55 |
[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=0) %] |
|
56 |
[% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %] |
|
57 |
[% END %] |
|
58 |
]}, |
|
58 | 59 |
|
59 |
var tree_data = [{ |
|
60 |
data: [% JSON.json(LxERP.t8("Sections")) %], |
|
60 |
{ data: [% JSON.json(LxERP.t8("Sections")) %], |
|
61 | 61 |
metadata: { type: "sections" }, |
62 | 62 |
attr: { id: "sections", class: "section-context-menu" }, |
63 | 63 |
children: [ |
64 | 64 |
[% FOREACH section = SELF.requirement_spec.sections %] |
65 | 65 |
[% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %] |
66 | 66 |
[% END %] |
67 |
]}];
|
|
67 |
]},
|
|
68 | 68 |
|
69 |
[% UNLESS SELF.requirement_spec.is_template %] |
|
70 |
tree_data.unshift({ |
|
71 |
data: [% JSON.json(LxERP.t8("Text blocks front")) %], |
|
72 |
metadata: { type: "text-blocks-front" }, |
|
73 |
attr: { id: "tb-front", class: "text-block-context-menu" }, |
|
74 |
children: [ |
|
75 |
[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=0) %] |
|
76 |
[% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %] |
|
77 |
[% END %] |
|
78 |
]}); |
|
79 |
|
|
80 |
tree_data.push({ |
|
81 |
data: [% JSON.json(LxERP.t8("Text blocks back")) %], |
|
69 |
{ data: [% JSON.json(LxERP.t8("Text blocks back")) %], |
|
82 | 70 |
metadata: { type: "text-blocks-back" }, |
83 | 71 |
attr: { id: "tb-back", class: "text-block-context-menu" }, |
84 | 72 |
children: [ |
85 | 73 |
[% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=1) %] |
86 | 74 |
[% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %] |
87 | 75 |
[% END %] |
88 |
]}); |
|
76 |
]} |
|
77 |
]; |
|
89 | 78 |
|
90 |
initially_open = initially_open.concat(['tb-front', 'tb-back']); |
|
91 |
[% END %] |
|
79 |
var initially_open = ['tb-front', 'tb-back', 'sections' |
|
80 |
[%- FOREACH section = SELF.requirement_spec.sections -%] |
|
81 |
, "fb-[% section.id %]" |
|
82 |
[%- FOREACH function_block = section.children -%] |
|
83 |
, "fb-[% function_block.id -%]" |
|
84 |
[%- END -%] |
|
85 |
[%- END -%] |
|
86 |
]; |
|
92 | 87 |
|
93 | 88 |
$('#tree').jstree({ |
94 | 89 |
core: { |
Auch abrufbar als: Unified diff
Pflichtenheftvorlagen: Textblöcke doch erfassen können; dafür Wort "Abschnitt" entfernt