Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1ddebaf1

Von Tamino Steinert vor 6 Tagen hinzugefügt

  • ID 1ddebaf1d00e7cd077424737e0c22de7b3ad5ca6
  • Vorgänger 8ed9bbf1
  • Nachfolger a807c82b

Varianten: Ausprägung löschen

Unterschiede anzeigen:

SL/Controller/VariantProperty.pm
114 114
  );
115 115
}
116 116

  
117
sub action_delete_variant_property_value {
118
  my ($self) = @_;
119

  
120
  die "'variant_property_value.id' is needed" unless $::form->{variant_property_value}->{id};
121

  
122
  my $variant_property_value = SL::DB::Manager::VariantPropertyValue->find_by(
123
    id => $::form->{variant_property_value}->{id}
124
  ) or die t8("Could not find Variant Property Value");
125

  
126
  SL::DB->client->with_transaction(sub {
127
      $variant_property_value->delete;
128
      flash_later('info',
129
        t8(
130
          'The Variant Property Value \'#1\' has been deleted.',
131
          $variant_property_value->displayable_name
132
        )
133
      );
134
      1;
135
    }
136
  ) or flash_later('error',
137
    t8(
138
      'The Variant Property Value \'#1\' is in use and cannot be deleted.',
139
      $variant_property_value->displayable_name
140
    )
141
  );
142

  
143
  $self->redirect_to(
144
    action => 'edit_variant_property',
145
    id     => $variant_property_value->variant_property_id,
146
  );
147
}
148

  
117 149
sub action_add_variant_property_value {
118 150
  my ($self) = @_;
119 151

  

Auch abrufbar als: Unified diff