Revision 6ebacae9
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/fu.pl | ||
---|---|---|
1 | 1 |
use POSIX qw(strftime); |
2 | 2 |
|
3 | 3 |
use SL::FU; |
4 |
use SL::Locale::String qw(t8); |
|
4 | 5 |
use SL::ReportGenerator; |
5 | 6 |
|
6 | 7 |
require "bin/mozilla/reportgenerator.pl"; |
... | ... | |
99 | 100 |
$params{trans_id} = $form->{LINKS}->[0]->{trans_id} if (@{ $form->{LINKS} }); |
100 | 101 |
$form->{FOLLOW_UPS} = FU->follow_ups(%params); |
101 | 102 |
|
103 |
setup_fu_display_form_action_bar() unless $::form->{POPUP_MODE}; |
|
104 |
|
|
102 | 105 |
$form->header(no_layout => $::form->{POPUP_MODE}); |
103 | 106 |
print $form->parse_html_template('fu/add_edit'); |
104 | 107 |
|
... | ... | |
232 | 235 |
|
233 | 236 |
$form->{title} = $locale->text('Follow-Ups'); |
234 | 237 |
|
238 |
setup_fu_search_action_bar(); |
|
235 | 239 |
$form->header(); |
236 | 240 |
print $form->parse_html_template('fu/search'); |
237 | 241 |
|
... | ... | |
347 | 351 |
$report->add_data($row); |
348 | 352 |
} |
349 | 353 |
|
354 |
setup_fu_report_action_bar(); |
|
350 | 355 |
$report->generate_with_headers(); |
351 | 356 |
|
352 | 357 |
$main::lxdebug->leave_sub(); |
... | ... | |
409 | 414 |
|
410 | 415 |
$form->{title} = $locale->text('Edit Access Rights for Follow-Ups'); |
411 | 416 |
|
417 |
setup_fu_edit_access_rights_action_bar(); |
|
418 |
|
|
412 | 419 |
$form->header(); |
413 | 420 |
print $form->parse_html_template('fu/edit_access_rights'); |
414 | 421 |
|
... | ... | |
475 | 482 |
$form->error($locale->text('No action defined.')); |
476 | 483 |
} |
477 | 484 |
|
485 |
sub setup_fu_search_action_bar { |
|
486 |
my %params = @_; |
|
487 |
|
|
488 |
for my $bar ($::request->layout->get('actionbar')) { |
|
489 |
$bar->add( |
|
490 |
action => [ |
|
491 |
t8('Show'), |
|
492 |
submit => [ '#form', { action => "report" } ], |
|
493 |
accesskey => 'enter', |
|
494 |
], |
|
495 |
); |
|
496 |
} |
|
497 |
} |
|
498 |
|
|
499 |
sub setup_fu_display_form_action_bar { |
|
500 |
my %params = @_; |
|
501 |
|
|
502 |
for my $bar ($::request->layout->get('actionbar')) { |
|
503 |
$bar->add( |
|
504 |
action => [ |
|
505 |
t8('Save'), |
|
506 |
submit => [ '#form', { action => "save" } ], |
|
507 |
accesskey => 'enter', |
|
508 |
], |
|
509 |
action => [ |
|
510 |
t8('Finish'), |
|
511 |
submit => [ '#form', { action => "finish" } ], |
|
512 |
disabled => !$::form->{id} ? t8('The object has not been saved yet.') : undef, |
|
513 |
], |
|
514 |
action => [ |
|
515 |
t8('Delete'), |
|
516 |
submit => [ '#form', { action => "delete" } ], |
|
517 |
disabled => !$::form->{id} ? t8('The object has not been saved yet.') : undef, |
|
518 |
confirm => t8('Do you really want to delete this object?'), |
|
519 |
], |
|
520 |
); |
|
521 |
} |
|
522 |
} |
|
523 |
|
|
524 |
sub setup_fu_report_action_bar { |
|
525 |
my %params = @_; |
|
526 |
|
|
527 |
for my $bar ($::request->layout->get('actionbar')) { |
|
528 |
$bar->add( |
|
529 |
action => [ |
|
530 |
t8('Finish'), |
|
531 |
submit => [ '#form', { action => "finish" } ], |
|
532 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ], |
|
533 |
], |
|
534 |
action => [ |
|
535 |
t8('Delete'), |
|
536 |
submit => [ '#form', { action => "delete" } ], |
|
537 |
checks => [ [ 'kivi.check_if_entries_selected', '[name^=selected_]' ] ], |
|
538 |
confirm => t8('Do you really want to delete the selected objects?'), |
|
539 |
], |
|
540 |
); |
|
541 |
} |
|
542 |
} |
|
543 |
|
|
544 |
sub setup_fu_edit_access_rights_action_bar { |
|
545 |
my %params = @_; |
|
546 |
|
|
547 |
for my $bar ($::request->layout->get('actionbar')) { |
|
548 |
$bar->add( |
|
549 |
action => [ |
|
550 |
t8('Save'), |
|
551 |
submit => [ '#form', { action => "save_access_rights" } ], |
|
552 |
accesskey => 'enter', |
|
553 |
], |
|
554 |
); |
|
555 |
} |
|
556 |
} |
|
557 |
|
|
478 | 558 |
1; |
locale/de/all | ||
---|---|---|
989 | 989 |
'Do you really want to delete GL transaction #1?' => 'Wollen Sie wirklich die Dialogbuchung #1 löschen?', |
990 | 990 |
'Do you really want to delete the selected documents?' => 'Wollen Sie wirklich diese Dateien löschen?', |
991 | 991 |
'Do you really want to delete the selected links?' => 'Wollen Sie wirklich die ausgewählten Verknüpfungen löschen?', |
992 |
'Do you really want to delete the selected objects?' => 'Wollen Sie die ausgewählten Objekte wirklich löschen?', |
|
992 | 993 |
'Do you really want to delete this draft?' => 'Wollen Sie diesen Entwurf wirklich löschen?', |
993 | 994 |
'Do you really want to delete this object?' => 'Wollen Sie dieses Objekt wirklich löschen?', |
994 | 995 |
'Do you really want to delete this record template?' => 'Wollen Sie diese Belegvorlage wirklich löschen?', |
templates/webpages/fu/add_edit.html | ||
---|---|---|
7 | 7 |
$(function(){ document.Form.subject.focus(); }); |
8 | 8 |
</script> |
9 | 9 |
|
10 |
<form action="fu.pl" method="post" name="Form"> |
|
10 |
<form action="fu.pl" method="post" name="Form" id="form">
|
|
11 | 11 |
|
12 | 12 |
[%- IF SAVED_MESSAGE %] |
13 | 13 |
<p>[% SAVED_MESSAGE %]</p> |
... | ... | |
51 | 51 |
</table> |
52 | 52 |
</p> |
53 | 53 |
|
54 |
[%- IF POPUP_MODE %] |
|
54 | 55 |
<p> |
55 | 56 |
<input type="hidden" name="action" value="dispatcher"> |
56 | 57 |
<input type="submit" class="submit" name="action_save" value="[% 'Save' | $T8 %]"> |
... | ... | |
58 | 59 |
<input type="submit" class="submit" name="action_finish" value="[% 'Finish' | $T8 %]"> |
59 | 60 |
<input type="submit" class="submit" name="action_delete" value="[% 'Delete' | $T8 %]"> |
60 | 61 |
[%- END %] |
61 |
[%- IF POPUP_MODE %] |
|
62 | 62 |
<input type="submit" class="submit" onclick="window.close()" value="[% 'Cancel' | $T8 %]"> |
63 |
[%- END %] |
|
64 | 63 |
</p> |
65 | 64 |
|
66 |
[%- IF POPUP_MODE %] |
|
67 | 65 |
[%- IF FOLLOW_UPS.size %] |
68 | 66 |
<hr height="3" noshade> |
69 | 67 |
|
... | ... | |
99 | 97 |
|
100 | 98 |
<input type="hidden" name="trans_rowcount" value="[% LINKS.size %]"> |
101 | 99 |
</form> |
102 |
|
templates/webpages/fu/edit_access_rights.html | ||
---|---|---|
9 | 9 |
|
10 | 10 |
<p>[% 'Allow the following users access to my follow-ups:' | $T8 %]</p> |
11 | 11 |
|
12 |
<form action="fu.pl" method="post" name="Form"> |
|
12 |
<form action="fu.pl" method="post" name="Form" id="form">
|
|
13 | 13 |
<p> |
14 | 14 |
<table> |
15 | 15 |
<tr> |
... | ... | |
36 | 36 |
</p> |
37 | 37 |
|
38 | 38 |
<input type="hidden" name="rowcount" value="[% EMPLOYEES.size %]"> |
39 |
<input type="hidden" name="save_nextsub" value="save_access_rights"> |
|
40 |
|
|
41 |
<p> |
|
42 |
<input type="submit" class="submit" name="action" value="[% 'Save' | $T8 %]"> |
|
43 |
</p> |
|
44 |
|
|
45 | 39 |
</form> |
templates/webpages/fu/report_bottom.html | ||
---|---|---|
4 | 4 |
[%- FOREACH item = HIDDEN %] |
5 | 5 |
<input type="hidden" name="[% HTML.escape(item.key) %]" value="[% HTML.escape(item.value) %]"> |
6 | 6 |
[%- END %] |
7 |
|
|
8 |
<p> |
|
9 |
[% 'Follow-Ups' | $T8 %]<br> |
|
10 |
<input type="hidden" name="action" value="dispatcher"> |
|
11 |
<input type="submit" name="action_finish" value="[% 'Finish' | $T8 %]"> |
|
12 |
<input type="submit" name="action_delete" value="[% 'Delete' | $T8 %]"> |
|
13 |
</p> |
|
14 | 7 |
</form> |
templates/webpages/fu/report_top.html | ||
---|---|---|
10 | 10 |
</p> |
11 | 11 |
[%- END %] |
12 | 12 |
|
13 |
<form action="fu.pl" method="post" name="Form"> |
|
14 |
|
|
13 |
<form action="fu.pl" method="post" name="Form" id="form"> |
templates/webpages/fu/search.html | ||
---|---|---|
7 | 7 |
$(function(){ document.Form.subject.focus(); }); |
8 | 8 |
</script> |
9 | 9 |
|
10 |
<form action="fu.pl" method="post" name="Form"> |
|
11 |
<input type="hidden" name="nextsub" value="report"> |
|
12 |
|
|
10 |
<form action="fu.pl" method="post" name="Form" id="form"> |
|
13 | 11 |
<p> |
14 | 12 |
<table> |
15 | 13 |
<tr> |
... | ... | |
100 | 98 |
|
101 | 99 |
</table> |
102 | 100 |
</p> |
103 |
|
|
104 |
<p> |
|
105 |
<input type="submit" name="action" value="[% 'Continue' | $T8 %]"> |
|
106 |
</p> |
|
107 | 101 |
</form> |
108 |
|
Auch abrufbar als: Unified diff
ActionBar: Verwendung bei Wiedervorlagen