/[Arh]/lib/Arh/Dispatcher.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/Arh/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 68 - (show annotations)
Tue Apr 8 23:36:02 2008 UTC (16 years ago) by dpavlin
File size: 687 byte(s)
go to last unit by default in bulk update
1 package Arh::Dispatcher;
2
3 use strict;
4 use warnings;
5
6 use Jifty::Dispatcher -base;
7
8 use Data::Dump qw/dump/;
9
10 before '*' => run {
11 my $top = Jifty->web->navigation;
12 my $user = Jifty->web->current_user;
13
14 #set user => $user;
15 #warn "##### ",dump( $user );
16
17 $top->child( _('Units') => url => '/units' );
18 $top->child( _('Bulk create') => url => '/units/bulk' );
19
20 if ( $user->id ) {
21 # only for logged users
22 }
23
24 };
25
26 on qr{^/pictures/show/(.+)$} => run {
27 warn "## showing raw_pic $1\n";
28 set filename => $1;
29 show 'raw_pic';
30 };
31
32 under qr{^/units/bulk} => run {
33 set per_page => 1;
34 my $u = Arh::Model::UnitCollection->new;
35 $u->unlimit;
36 set page => $u->count unless get('page');
37 };
38
39 1;

  ViewVC Help
Powered by ViewVC 1.1.26