Changeset 403

Show
Ignore:
Timestamp:
02/04/08 19:28:23 (10 months ago)
Author:
eevee
Message:

Very simple view controller for a gallery item. Been sitting around for a while and could use committing.

Location:
veekun/trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee/Controller/Gallery.pm

    r236 r403  
    3434 
    3535    $s->{template} = 'gallery/index.tt'; 
     36} 
     37 
     38=head2 view 
     39 
     40View of a single uploaded work. 
     41 
     42=cut 
     43 
     44sub view : Path : Args(1) { 
     45    my ($self, $c, $work_id) = @_; 
     46    my $s = $c->stash; 
     47 
     48    my $row = $c->model('DBIC::Gallery')->find($work_id) 
     49        or $c->vee_abort('No work with id ', $work_id, ' exists.'); 
     50 
     51    $s->{this} = $row; 
     52 
     53    $s->{page_title}  = 'Gallery Item'; 
     54    $s->{extra_css}   = 'gallery'; 
     55    $s->{breadcrumbs} = [ 
     56        '<a href="' . $c->uri_for('/gallery') . '">Gallery</a>', 
     57        'Gallery Item' 
     58    ]; 
     59 
     60    $s->{template} = 'gallery/view.tt'; 
    3661} 
    3762