line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CatalystX::Resource::TraitFor::Controller::Resource::Edit; |
2
|
|
|
|
|
|
|
$CatalystX::Resource::TraitFor::Controller::Resource::Edit::VERSION = '0.03'; |
3
|
9
|
|
|
9
|
|
13700
|
use MooseX::MethodAttributes::Role; |
|
9
|
|
|
|
|
26
|
|
|
9
|
|
|
|
|
77
|
|
4
|
9
|
|
|
9
|
|
85266
|
use namespace::autoclean; |
|
9
|
|
|
|
|
29
|
|
|
9
|
|
|
|
|
75
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: a edit action for your resource |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
requires qw/ |
9
|
|
|
|
|
|
|
form |
10
|
|
|
|
|
|
|
/; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'activate_fields_edit' => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
isa => 'ArrayRef', |
17
|
|
|
|
|
|
|
default => sub { [] }, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub edit : Method('GET') Method('POST') Chained('base_with_id') PathPart('edit') Args(0) { |
22
|
26
|
|
|
26
|
1
|
11786
|
my ( $self, $c ) = @_; |
23
|
26
|
|
|
|
|
136
|
$c->stash( set_update_msg => 1 ); |
24
|
26
|
|
|
|
|
3010
|
$self->form( $c, $self->activate_fields_edit ); |
25
|
9
|
|
|
9
|
|
1938
|
} |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
74
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=pod |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=encoding UTF-8 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 NAME |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
CatalystX::Resource::TraitFor::Controller::Resource::Edit - a edit action for your resource |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 VERSION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
version 0.03 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 activate_fields_edit |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
arrayref of form fields to activate in the edit form |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Can be overriden with $c->stash->{activate_form_fields} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
(default = []). |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ACTIONS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 edit |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
edit a specific resource |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
David Schmidt <davewood@cpan.org> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2011 by David Schmidt. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |