/[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

Annotation of /lib/Arh/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (hide annotations)
Tue Apr 8 23:22:22 2008 UTC (16 years ago) by dpavlin
File size: 588 byte(s)
bunch of changes:
- added bulk create link (which still doesn't work all that well)
- 
1 dpavlin 6 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 dpavlin 47 $top->child( _('Units') => url => '/units' );
18 dpavlin 67 $top->child( _('Bulk create') => url => '/units/bulk' );
19 dpavlin 47
20 dpavlin 37 if ( $user->id ) {
21 dpavlin 55 # only for logged users
22 dpavlin 37 }
23    
24 dpavlin 6 };
25    
26 dpavlin 67 on qr{^/pictures/show/(.+)$} => run {
27 dpavlin 51 warn "## showing raw_pic $1\n";
28     set filename => $1;
29     show 'raw_pic';
30     };
31    
32 dpavlin 67 under qr{^/units/bulk} => run {
33     set per_page => 1;
34     };
35    
36 dpavlin 6 1;

  ViewVC Help
Powered by ViewVC 1.1.26