Revision b391b42d
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
435 | 435 |
|
436 | 436 |
my ($filename, $display_filename); |
437 | 437 |
|
438 |
if ($form->{type} eq "stylesheet") { |
|
439 |
$filename = "css/$myconfig->{stylesheet}"; |
|
440 |
$display_filename = $myconfig->{stylesheet}; |
|
438 |
$filename = $form->{formname}; |
|
441 | 439 |
|
442 |
} else { |
|
443 |
$filename = $form->{formname}; |
|
444 |
|
|
445 |
if ($form->{language}) { |
|
446 |
my ($id, $template_code) = split(/--/, $form->{language}); |
|
447 |
$filename .= "_${template_code}"; |
|
448 |
} |
|
440 |
if ($form->{language}) { |
|
441 |
my ($id, $template_code) = split(/--/, $form->{language}); |
|
442 |
$filename .= "_${template_code}"; |
|
443 |
} |
|
449 | 444 |
|
450 |
if ($form->{printer}) {
|
|
451 |
my ($id, $template_code) = split(/--/, $form->{printer});
|
|
452 |
$filename .= "_${template_code}";
|
|
453 |
}
|
|
445 |
if ($form->{printer}) { |
|
446 |
my ($id, $template_code) = split(/--/, $form->{printer}); |
|
447 |
$filename .= "_${template_code}"; |
|
448 |
} |
|
454 | 449 |
|
455 |
$filename .= "." . ($form->{format} eq "html" ? "html" : "tex"); |
|
456 |
if ($form->{"formname"} =~ m|\.\.| || $form->{"formname"} =~ m|^/|) { |
|
457 |
$filename =~ s|.*/||; |
|
458 |
} |
|
459 |
$display_filename = $filename; |
|
460 |
$filename = SL::DB::Default->get->templates . "/$filename"; |
|
450 |
$filename .= "." . ($form->{format} eq "html" ? "html" : "tex"); |
|
451 |
if ($form->{"formname"} =~ m|\.\.| || $form->{"formname"} =~ m|^/|) { |
|
452 |
$filename =~ s|.*/||; |
|
461 | 453 |
} |
454 |
$display_filename = $filename; |
|
455 |
$filename = SL::DB::Default->get->templates . "/$filename"; |
|
462 | 456 |
|
463 | 457 |
$main::lxdebug->leave_sub(); |
464 | 458 |
|
bin/mozilla/amtemplates.pl | ||
---|---|---|
95 | 95 |
|
96 | 96 |
$main::auth->assert('admin'); |
97 | 97 |
|
98 |
$form->isblank("formname", $locale->text("You're not editing a file.")) unless ($form->{type} eq "stylesheet");
|
|
98 |
$form->isblank("formname", $locale->text("You're not editing a file.")); |
|
99 | 99 |
|
100 | 100 |
my ($filename) = AM->prepare_template_filename(\%myconfig, $form); |
101 | 101 |
if (my $error = AM->save_template($filename, $form->{content})) { |
... | ... | |
126 | 126 |
|
127 | 127 |
my $format = $form->{"format"} eq "html" ? "html" : "tex"; |
128 | 128 |
|
129 |
$form->{"title"} = $form->{"type"} eq "stylesheet" ? $locale->text("Edit the stylesheet") : $locale->text("Edit templates");
|
|
129 |
$form->{"title"} = $locale->text("Edit templates"); |
|
130 | 130 |
if ($form->{"format"}) { |
131 | 131 |
$form->{"title"} = uc($form->{"format"}) . " - " . $form->{"title"}; |
132 | 132 |
} |
... | ... | |
135 | 135 |
|
136 | 136 |
my @hidden = qw(type format); |
137 | 137 |
|
138 |
if (($form->{"type"} ne "stylesheet") && !$form->{"edit"}) {
|
|
138 |
if (!$form->{"edit"}) { |
|
139 | 139 |
$options{"SHOW_EDIT_OPTIONS"} = 1; |
140 | 140 |
|
141 | 141 |
# |
... | ... | |
266 | 266 |
push(@hidden, qw(formname language printer)); |
267 | 267 |
} |
268 | 268 |
|
269 |
if ($form->{formname} || ($form->{type} eq "stylesheet")) {
|
|
269 |
if ($form->{formname}) { |
|
270 | 270 |
$options{"SHOW_CONTENT"} = 1; |
271 | 271 |
|
272 | 272 |
($options{"filename"}, $options{"display_filename"}) |
locale/de/all | ||
---|---|---|
1160 | 1160 |
'Edit the request_quotation' => 'Bearbeiten der Preisanfrage', |
1161 | 1161 |
'Edit the sales_order' => 'Bearbeiten des Auftrags', |
1162 | 1162 |
'Edit the sales_quotation' => 'Bearbeiten des Angebots', |
1163 |
'Edit the stylesheet' => 'Stilvorlage bearbeiten', |
|
1164 | 1163 |
'Edit units' => 'Einheiten bearbeiten', |
1165 | 1164 |
'Edit user signature' => 'Benutzersignatur bearbeiten', |
1166 | 1165 |
'Editable' => 'Bearbeitbar', |
menus/user/00-erp.yaml | ||
---|---|---|
1315 | 1315 |
action: display_template_form |
1316 | 1316 |
format: tex |
1317 | 1317 |
type: templates |
1318 |
- parent: system_templates |
|
1319 |
id: system_templates_stylesheet |
|
1320 |
name: Stylesheet |
|
1321 |
order: 300 |
|
1322 |
module: amtemplates.pl |
|
1323 |
params: |
|
1324 |
action: display_template_form |
|
1325 |
type: stylesheet |
|
1326 | 1318 |
- parent: system |
1327 | 1319 |
id: system_general_ledger_corrections |
1328 | 1320 |
name: General Ledger Corrections |
Auch abrufbar als: Unified diff
»System« → »Vorlagen« → »Stilvorlage« entfernt
Die Funktion funktioniert seit der Aufteilung der Stylesheets in
mehrere Unterdateien schlicht nicht mehr. Da sich bisher niemand
beschwert hat, wird die Funktion wohl auch nicht benötigt.