diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-15 19:20:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-15 19:20:37 +0200 |
commit | 1cca278baac0f50012e524eac7c441c998f4d8c3 (patch) | |
tree | ae292c5aef5c86e92d255e97010507c67daa02c6 /lib/Travelynx/Controller/Profile.pm | |
parent | bee67f096a5732fed5cb9c3e716012b536950022 (diff) |
add timeline / current checkins
Diffstat (limited to 'lib/Travelynx/Controller/Profile.pm')
-rwxr-xr-x | lib/Travelynx/Controller/Profile.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Profile.pm b/lib/Travelynx/Controller/Profile.pm index b8812f8..03f3b0d 100755 --- a/lib/Travelynx/Controller/Profile.pm +++ b/lib/Travelynx/Controller/Profile.pm @@ -546,4 +546,28 @@ sub status_card { ); } +sub checked_in { + my ($self) = @_; + + my $uid = $self->current_user->{id}; + my @journeys = $self->in_transit->get_timeline( + uid => $uid, + with_data => 1 + ); + + if ( $self->param('ajax') ) { + delete $self->stash->{layout}; + $self->render( + '_timeline-checked-in', + journeys => [@journeys], + ); + } + else { + $self->render( + 'timeline-checked-in', + journeys => [@journeys], + ); + } +} + 1; |