Revision 9f6a981f
Von Werner Hahn vor 11 Monaten hinzugefügt
SL/Controller/VariantProperty.pm | ||
---|---|---|
23 | 23 |
my ($self) = @_; |
24 | 24 |
|
25 | 25 |
$self->_setup_list_action_bar; |
26 |
$self->render('variant_property/list', |
|
26 |
$self->render('variant_property/variant_property_list',
|
|
27 | 27 |
title => t8('Variant Property'), |
28 | 28 |
VARIANTPROPERTIES => SL::DB::Manager::VariantProperty->get_all_sorted, |
29 | 29 |
); |
... | ... | |
34 | 34 |
|
35 | 35 |
my $is_new = !$self->variant_property->id; |
36 | 36 |
$self->_setup_form_action_bar; |
37 |
$self->render('variant_property/variant_propertie_form', title => ($is_new ? t8('Add Variant Property') : t8('Edit Variant Property')));
|
|
37 |
$self->render('variant_property/variant_property_form', title => ($is_new ? t8('Add Variant Property') : t8('Edit Variant Property')));
|
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
sub action_save_property { |
41 | 41 |
my ($self) = @_; |
42 | 42 |
|
43 |
$self->create_or_update; |
|
43 |
$self->create_or_update_property;
|
|
44 | 44 |
} |
45 | 45 |
|
46 | 46 |
sub action_delete_property { |
... | ... | |
51 | 51 |
} else { |
52 | 52 |
flash_later('error', $::locale->text('The shop is in use and cannot be deleted.')); |
53 | 53 |
}; |
54 |
$self->redirect_to(action => 'list'); |
|
54 |
$self->redirect_to(action => 'list_properties');
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
sub action_reorder_properties { |
... | ... | |
66 | 66 |
# |
67 | 67 |
|
68 | 68 |
sub init_variant_property { |
69 |
SL::DB::Manager::VariantProperty::find_by_or_create(id => $::form->{id} || 0)->assign_attributes(%{ $::form->{variant_property} });
|
|
69 |
SL::DB::Manager::VariantProperty->find_by_or_create(id => $::form->{id} || 0)->assign_attributes(%{ $::form->{variant_property} });
|
|
70 | 70 |
} |
71 | 71 |
|
72 | 72 |
# |
... | ... | |
81 | 81 |
my @errors = $self->variant_property->validate; |
82 | 82 |
if (@errors) { |
83 | 83 |
flash('error', @errors); |
84 |
$self->action_edit(); |
|
84 |
$self->action_edit_property();
|
|
85 | 85 |
return; |
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
$self->variant_property->save; |
89 | 89 |
|
90 | 90 |
flash_later('info', $is_new ? t8('The Variant Property has been created.') : t8('The Variant Property has been saved.')); |
91 |
$self->redirect_to(action => 'list_property');
|
|
91 |
$self->redirect_to(action => 'list_properties');
|
|
92 | 92 |
} |
93 | 93 |
|
94 | 94 |
sub _setup_form_action_bar { |
Auch abrufbar als: Unified diff
VariantProperty: EIgenschaft anlegen