/[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 67 - (show annotations)
Tue Apr 8 23:22:22 2008 UTC (12 years, 1 month ago) by dpavlin
File size: 588 byte(s)
bunch of changes:
- added bulk create link (which still doesn't work all that well)
- 
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 };
35
36 1;

  ViewVC Help
Powered by ViewVC 1.1.26