/[SVNBrowser]/trunk/lib/SVNBrowser/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

Diff of /trunk/lib/SVNBrowser/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5 by dpavlin, Tue Dec 5 15:08:46 2006 UTC revision 73 by dpavlin, Thu Jan 31 20:03:43 2008 UTC
# Line 8  use Jifty::Dispatcher -base; Line 8  use Jifty::Dispatcher -base;
8    
9  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
10    
11  on '/' => run {  under 'rev' => [
         show '/list';  
12    
13            on qr{rev/(\d+)(/*.*)} => run {
14                    set revision => $1;
15                    set path => $2;
16            },
17    
18            run {
19                    show '/rev'
20            },
21    ];
22    
23    under 'filter' => [
24    
25            on qr{path(/.+)} => run {
26                    set rel_path => $1;
27            },
28    
29            on qr{author/([^/]+)} => run {
30                    set author => $1;
31            },
32    
33            on qr{actions} => run {
34                    set show_actions => 1;
35            },
36    
37            on qr{page/(\d+)} => run {
38                    set per_page => $1;
39            },
40    
41            on qr{from/([^/]+)} => run {
42                    set from_date => $1;
43            },
44    
45            on qr{to/([^/]+)} => run {
46                    set to_date => $1;
47            },
48    
49            on qr{search/([^/]+)} => run {
50                    set search => $1;
51            },
52    
53            run {
54                    my $next = Jifty->web->request->continuation;
55    
56                    if (Jifty->web->response->results) {
57                            $next = Jifty::Continuation->new(
58                                    request => Jifty->web->request,
59                                    response => Jifty->web->response,
60                            );
61    #                       warn "created continuation: ", dump($next);
62                    } elsif ($next) {
63    #                       warn "next = ", dump( $next );
64                            $next->call;
65                    }
66    
67                    set 'next' => $next;
68    
69                    show '/x-list';
70            },
71    
72    ];
73    
74    on '' => run {
75            redirect '/filter';
76  };  };
77    
78  1;  1;

Legend:
Removed from v.5  
changed lines
  Added in v.73

  ViewVC Help
Powered by ViewVC 1.1.26