Revision d9131c17
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
bin/mozilla/ic.pl | ||
---|---|---|
95 | 95 |
$form->{lastsort} = ""; # memory for which table was sort at last time |
96 | 96 |
$form->{ndxs_counter} = 0; # counter for added entries to top100 |
97 | 97 |
|
98 |
my $is_service = $form->{searchitems} eq 'service'; |
|
99 |
my $is_assembly = $form->{searchitems} eq 'assembly'; |
|
98 |
my %is_xyz = map { +"is_$_" => ($form->{searchitems} eq $_) } qw(part service assembly); |
|
100 | 99 |
|
101 | 100 |
$form->{title} = (ucfirst $form->{searchitems}) . "s"; |
102 | 101 |
$form->{title} = $locale->text($form->{title}); |
103 |
$form->{title} = $locale->text('Assemblies') if $is_assembly;
|
|
102 |
$form->{title} = $locale->text('Assemblies') if ($is_xyz{assembly});
|
|
104 | 103 |
|
105 | 104 |
$form->{jsscript} = 1; |
106 | 105 |
|
107 | 106 |
$form->header; |
108 | 107 |
|
109 |
print $form->parse_html_template('ic/search', { is_assembly => $is_assembly, |
|
110 |
is_service => $is_service, |
|
111 |
dateformat => $myconfig{dateformat}, }); |
|
108 |
print $form->parse_html_template('ic/search', { %is_xyz, |
|
109 |
dateformat => $myconfig{dateformat}, }); |
|
112 | 110 |
|
113 | 111 |
$lxdebug->leave_sub(); |
114 | 112 |
} #end search() |
Auch abrufbar als: Unified diff
Doppelter-Code-Vermeidung