Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 36703a86

Von Bernd Blessmann vor etwa 10 Jahren hinzugefügt

  • ID 36703a86a998c7c395f110f94b3b3feebc2a3a80
  • Vorgänger 28f6dabe
  • Nachfolger cd443e24

Warengruppen-Filter f. CVars bei Waren

cherry-pick aus Kundenprojekt und Anpassungen an unstable (hauptsächlich
Umstellung auf Controller)

Conflicts:

SL/CVar.pm
SL/DB/CustomVariableConfig.pm
bin/mozilla/amcvar.pl
bin/mozilla/io.pl
templates/webpages/amcvar/display_cvar_config_form.html
templates/webpages/amcvar/render_inputs_block.html

Unterschiede anzeigen:

SL/CVar.pm
55 55
      }
56 56

  
57 57
      $self->_unpack_flags($config);
58

  
59
      my $cvar_config = SL::DB::CustomVariableConfig->new(id => $config->{id})->load;
60
      @{$config->{'partsgroups'}} = map {$_->id} @{$cvar_config->partsgroups};
61

  
58 62
    }
59 63
    $::form->{CVAR_CONFIGS}->{$params{module}} = $configs;
60 64
  }
......
279 283
  my $myconfig = \%main::myconfig;
280 284
  my $form     = $main::form;
281 285

  
282
  my %options  = ( name_prefix       => "$params{name_prefix}",
283
                   name_postfix      => "$params{name_postfix}",
284
                   hide_non_editable => $params{hide_non_editable},
286
  my %options  = ( name_prefix           => "$params{name_prefix}",
287
                   name_postfix          => "$params{name_postfix}",
288
                   hide_non_editable     => $params{hide_non_editable},
285 289
                   show_disabled_message => $params{show_disabled_message},
286 290
                 );
287 291

  
292
  # should this cvar be filtered by partsgroups?
288 293
  foreach my $var (@{ $params{variables} }) {
294
    if ($var->{flag_partsgroup_filter}) {
295
      if (!$params{partsgroup_id} || (!grep {$params{partsgroup_id} == $_} @{ $var->{partsgroups} })) {
296
        $var->{partsgroup_filtered} = 1;
297
      }
298
    }
299

  
289 300
    $var->{HTML_CODE} = $form->parse_html_template('amcvar/render_inputs',     { var => $var, %options });
290 301
    $var->{VALID_BOX} = $form->parse_html_template('amcvar/render_checkboxes', { var => $var, %options });
291 302
  }

Auch abrufbar als: Unified diff