Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 99908669

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID 99908669eeb1a545af796d11589b54a91c62e446
  • Vorgänger 9cf32c2d
  • Nachfolger cc177bfe

EmailJournal: Belegtype übersetzt anzeigen

Unterschiede anzeigen:

SL/Controller/EmailJournal.pm
181 181
  return @record_types_with_info;
182 182
}
183 183

  
184
# has do be done at runtime for translation to work
185
sub get_record_types_to_text {
186
  my @record_types_with_info = get_record_types_with_info();
187

  
188
  my %record_types_to_text = ();
189
  $record_types_to_text{$_->{record_type}} = $_->{text} for @record_types_with_info;
190
  $record_types_to_text{'catch_all'} = t8("Catch-all");
191

  
192
  return %record_types_to_text;
193
}
194

  
184 195
sub record_types_for_customer_vendor_type_and_action {
185 196
  my ($self, $customer_vendor_type, $action) = @_;
186 197
  return [
......
217 228
  }
218 229
  $self->setup_list_action_bar;
219 230
  my @record_types_with_info = $self->get_record_types_with_info();
231
  my %record_types_to_text   = $self->get_record_types_to_text();
220 232
  $self->render('email_journal/list',
221 233
                title   => $::locale->text('Email journal'),
222 234
                ENTRIES => $self->models->get,
223 235
                MODELS  => $self->models,
224 236
                RECORD_TYPES_WITH_INFO => \@record_types_with_info,
237
                RECORD_TYPES_TO_TEXT   => \%record_types_to_text,
225 238
              );
226 239
}
227 240

  
......
239 252
  }
240 253

  
241 254
  my @record_types_with_info = $self->get_record_types_with_info();
255
  my %record_types_to_text   = $self->get_record_types_to_text();
242 256

  
243 257
  my $customer_vendor = $self->find_customer_vendor_from_email($self->entry);
244 258
  my $cv_type = $customer_vendor && $customer_vendor->is_vendor ? 'vendor' : 'customer';
......
255 269
    CUSTOMER_VENDOR => , $customer_vendor,
256 270
    CV_TYPE_FOUND => $cv_type_found,
257 271
    RECORD_TYPES_WITH_INFO => \@record_types_with_info,
258
    back_to  => $back_to
272
    RECORD_TYPES_TO_TEXT   => \%record_types_to_text,
273
    back_to  => $back_to,
259 274
  );
260 275
}
261 276

  
......
764 779
  push @filter_strings, $status{ $filter->{'status:eq_ignore_empty'} } if $filter->{'status:eq_ignore_empty'};
765 780

  
766 781

  
767
  my %record_type = map { $_->{record_type} => $_->{text} } $self->get_record_types_with_info();
768
  push @filter_strings, $record_type{ $filter->{'record_type:eq_ignore_empty'} } if $filter->{'record_type:eq_ignore_empty'};
782
  my %record_type_to_text = $self->get_record_types_to_text();
783
  push @filter_strings, $record_type_to_text{ $filter->{'record_type:eq_ignore_empty'} } if $filter->{'record_type:eq_ignore_empty'};
769 784

  
770 785
  push @filter_strings, $::locale->text('Obsolete')     if $filter->{'obsolete:eq_ignore_empty'} eq '1';
771 786
  push @filter_strings, $::locale->text('Not obsolete') if $filter->{'obsolete:eq_ignore_empty'} eq '0';
templates/design40_webpages/email_journal/list.html
46 46
      <td>[% HTML.escape(entry.sent_on.to_lxoffice('precision' => 'second')) %]</td>
47 47
      <td> [% P.email_journal.entry_status(entry) %] </td>
48 48
      <td>[% HTML.escape(entry.extended_status) %]</td>
49
      <td>[% HTML.escape(entry.record_type) %]</td>
49
      <td>[% HTML.escape(RECORD_TYPES_TO_TEXT.${entry.record_type}) %]</td>
50 50
      <td>[% HTML.escape(entry.obsolete_as_bool_yn) %]</td>
51 51
      <td>
52 52
        [% P.record.simple_grouped_record_list(entry.linked_records) %]
templates/design40_webpages/email_journal/tabs/basic_data.html
40 40
    </tr>
41 41
    <tr>
42 42
      <th>[% 'For Record Type' | $T8 %]</th>
43
      <td>[% L.input_tag('record_type', SELF.entry.record_type, style="color:black", class="wi-verywide", disabled=1) %]</td>
43
      <td>[% L.input_tag('record_type', RECORD_TYPES_TO_TEXT.${SELF.entry.record_type}, style="color:black", class="wi-verywide", disabled=1) %]</td>
44 44
    </tr>
45 45
    <tr>
46 46
      <th>[% 'Headers' | $T8 %]</th>
templates/webpages/email_journal/list.html
52 52
   <td>[%- HTML.escape(entry.sent_on.to_lxoffice('precision' => 'second')) %]</td>
53 53
   <td> [% P.email_journal.entry_status(entry) %] </td>
54 54
   <td>[%- HTML.escape(entry.extended_status) %]</td>
55
   <td>[% HTML.escape(entry.record_type) %]</td>
55
   <td>[% HTML.escape(RECORD_TYPES_TO_TEXT.${entry.record_type}) %]</td>
56 56
   <td>[% HTML.escape(entry.obsolete_as_bool_yn) %]</td>
57 57
   <td>
58 58
     [% P.record.simple_grouped_record_list(entry.linked_records) %]
templates/webpages/email_journal/tabs/basic_data.html
38 38
  
39 39
  <tr class="listrow">
40 40
   <th>[%- LxERP.t8("For Record Type") %]</th>
41
   <td>[%- HTML.escape(SELF.entry.record_type) %]</td>
41
   <td>[%- HTML.escape(RECORD_TYPES_TO_TEXT.${SELF.entry.record_type}) %]</td>
42 42
  </tr>
43 43

  
44 44
  <tr class="listrow">

Auch abrufbar als: Unified diff