CatalystX-ListFramework

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/Root.pm  view on Meta::CPAN

    my $lf = CatalystX::ListFramework->new($kind, $c);
    $lf->stash_infoboxes({'me.id' => [{'=' => $id}]}); 
    $c->stash->{kind} = $kind;
    $c->stash->{id} = $id;  # so that the update form knows what URL to call
    $c->stash->{template} = 'detail.tt';

    if ($kind eq 'album') {
        my $fb2 = CatalystX::ListFramework->new('track', $c);
        $fb2->stash_listing('default', 'myprefix', {'me.fromalbum' => [{'=' => $id}]});
        # $c->stash->{add_to_create} = $id;
        # In one project, we used this to make the create-new userprefs_* link /create/userprefs*/userid so that
        # the newly created thing would be associated with the user we were looking at (&create() took an extra arg).
        # So, TODO We need a proper way of telling the /create form to set 'fromalbum' to the album we're editing.
        $c->stash->{"myprefixoptions"}->{deletable} = 1;
    }

    $c->view('TT')->process($c);
}

sub update :Path('/update') {
    my ($self, $c, $kind, $id) = @_;



( run in 0.807 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )