Changeset 9874
- Timestamp:
- 04/19/08 15:48:13 (5 years ago)
- Location:
- lang/perl/Chaostr/trunk
- Files:
-
- 10 added
- 8 modified
-
lib/Chaostr/DB/Schema/Links.pm (modified) (1 diff)
-
lib/Chaostr/DB/Schema/Photos.pm (modified) (1 diff)
-
lib/Chaostr/DB/Schema/Quotes.pm (modified) (1 diff)
-
lib/Chaostr/DB/Schema/Texts.pm (modified) (1 diff)
-
lib/Chaostr/DB/Schema/Timeline.pm (modified) (1 diff)
-
lib/Chaostr/DB/Schema/Videos.pm (modified) (1 diff)
-
lib/Chaostr/Web/Base (added)
-
lib/Chaostr/Web/Base/Controller.pm (added)
-
lib/Chaostr/Web/Controller/Root.pm (modified) (2 diffs)
-
lib/Chaostr/Web/Controller/Texts.pm (added)
-
root/src/error.tt (modified) (1 diff)
-
root/src/texts (added)
-
root/src/texts/create.tt (added)
-
root/src/texts/destroy.tt (added)
-
root/src/texts/list.tt (added)
-
root/src/texts/show.tt (added)
-
root/src/texts/update.tt (added)
-
t/controller_Text.t (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Links.pm
r9278 r9874 5 5 6 6 __PACKAGE__->belongs_to( 7 'timeline _id',7 'timeline', 8 8 'Chaostr::DB::Schema::Timeline', 9 { id => 'timeline ' },9 { id => 'timeline_id' }, 10 10 ); 11 11 -
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Photos.pm
r9278 r9874 5 5 6 6 __PACKAGE__->belongs_to( 7 'timeline _id',7 'timeline', 8 8 'Chaostr::DB::Schema::Timeline', 9 { id => 'timeline ' },9 { id => 'timeline_id' }, 10 10 ); 11 11 -
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Quotes.pm
r9278 r9874 5 5 6 6 __PACKAGE__->belongs_to( 7 'timeline _id',7 'timeline', 8 8 'Chaostr::DB::Schema::Timeline', 9 { id => 'timeline ' },9 { id => 'timeline_id' }, 10 10 ); 11 11 -
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Texts.pm
r9278 r9874 5 5 6 6 __PACKAGE__->belongs_to( 7 'timeline _id',7 'timeline', 8 8 'Chaostr::DB::Schema::Timeline', 9 { id => 'timeline ' },9 { id => 'timeline_id' }, 10 10 ); 11 11 -
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Timeline.pm
r9278 r9874 39 39 ); 40 40 41 sub create_from_fv { 42 my ( $self, $results, $extra ) = @_; 43 44 $extra->{timeline_id} = $self->id; 45 46 my $type = ucfirst $self->type; 47 my $schema = $self->result_source->schema; 48 49 return $schema->resultset($type)->create_from_fv($results, $extra); 50 } 51 41 52 1; 42 53 -
lang/perl/Chaostr/trunk/lib/Chaostr/DB/Schema/Videos.pm
r9278 r9874 5 5 6 6 __PACKAGE__->belongs_to( 7 'timeline _id',7 'timeline', 8 8 'Chaostr::DB::Schema::Timeline', 9 { id => 'timeline ' },9 { id => 'timeline_id' }, 10 10 ); 11 11 -
lang/perl/Chaostr/trunk/lib/Chaostr/Web/Controller/Root.pm
r8502 r9874 34 34 } 35 35 36 if ( $c->req->path !~ m{\A (?:login|logout) }xms 37 && ! $c->user_exists ) { 38 $c->res->redirect( $c->uri_for('/login') ); 39 return; 40 } 41 36 42 return 1; 43 } 44 45 sub default : Private { 46 my ( $self, $c ) = @_; 47 48 my $template = $c->req->path . '.tts'; 49 if ( -s $c->path_to( '/root/src/' . $template ) ) { 50 $c->stash->{template} = $template; 51 return; 52 } 53 54 $c->res->status(404); 55 $c->error('指定された URL にリソースが見つかりませんでした。'); 56 return; 37 57 } 38 58 … … 57 77 58 78 sub end : ActionClass('RenderView') { 79 my ( $self, $c ) = @_; 80 81 if ( scalar @ { $c->error } && ! $c->debug ) { 82 $c->stash->{error} = $c->error; 83 $c->stash->{template} = 'error.tt'; 84 $c->forward('TT'); 85 $c->error(0); 86 } 59 87 } 60 88 -
lang/perl/Chaostr/trunk/root/src/error.tt
r7658 r9874 7 7 <p> 8 8 Here's the error message, on the off-chance that it means something 9 to you: <span class="error">[% error %]</span>9 to you: 10 10 </p> 11 12 <p> 13 [% FOREACH msg = error %] 14 <span class="error">[% msg %]</span> 15 [% END %] 16 </p>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)