/[transports]/trunk/lib/Transports/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/Transports/Dispatcher.pm

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

revision 89 by dpavlin, Mon Jun 19 15:15:54 2006 UTC revision 90 by dpavlin, Wed Jun 21 13:06:11 2006 UTC
# Line 15  create new stransport Line 15  create new stransport
15    
16  =cut  =cut
17    
18  under '/transports/create/' => [  under '/transports/create' => [
19    
         on '' => redirect('/transports/create/landscape'),  
20          on 'landscape' => run {          on 'landscape' => run {
21    
22                          my $landscapes = Transports::Model::UserOnLandscapeCollection->new();                          my $landscapes = Transports::Model::UserOnLandscapeCollection->new();
# Line 33  under '/transports/create/' => [ Line 32  under '/transports/create/' => [
32                          } elsif ($landscapes->count == 1) {                          } elsif ($landscapes->count == 1) {
33                                  $landscape_id = $landscapes->first->id;                                  $landscape_id = $landscapes->first->id;
34                                  set 'landscape_id' => $landscape_id;                                  set 'landscape_id' => $landscape_id;
35                                  dispatch('/transports/create/new');                                  dispatch('/transports/create/');
36                          } else {                          } else {
37                                  set landscapes => $landscapes;                                  set landscapes => $landscapes;
38                                  show '/transports/create/landscape';                                  show '/transports/create/landscape';
39                          };                          };
40    
41          },          },
42          on 'new' => run {          on '' => run {
43    
44                  my $landscape_id = get('landscape_id');                  my $landscape_id = get('landscape_id');
45                  Jifty->web->tangent('/transports/create/landscape') unless ($landscape_id);                  redirect('/transports/create/landscape') unless ($landscape_id);
46    
47                  my $transport = get('transport') || Jifty->web->new_action(                  my $transport = Jifty->web->new_action(
48                          class => 'CreateTransport',                          class => 'CreateTransport',
49                          monkier => 'create',                          moniker => 'transports_create',
50                  );                  );
51    
52                  my $l = Transports::Model::Landscape->new();                  my $l = Transports::Model::Landscape->new();
# Line 111  before '*', run { Line 110  before '*', run {
110    
111          my $url = Jifty->web->request->path;          my $url = Jifty->web->request->path;
112    
113          warn "before url: $url";          #warn "before url: $url";
114    
115          next_rule if ($url eq '/' || $url =~ m#^/(?:login|logout|__jifty)/*#);          next_rule if ($url eq '/' || $url =~ m#^/(?:login|logout|__jifty)/*#);
116    

Legend:
Removed from v.89  
changed lines
  Added in v.90

  ViewVC Help
Powered by ViewVC 1.1.26