summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm1
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm14
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index c11f175..63faafd 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -1505,6 +1505,7 @@ sub startup {
);
$authed_r->get('/account')->to('account#account');
+ $authed_r->get('/ajax/status_card.html')->to('traveling#status_card');
$authed_r->get('/cancelled')->to('traveling#cancelled');
$authed_r->get('/change_password')->to('account#password_form');
$authed_r->get('/export.json')->to('account#json_export');
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index d8e5e03..73a079c 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -19,6 +19,20 @@ sub homepage {
}
}
+sub status_card {
+ my ($self) = @_;
+ my $status = $self->get_user_status;
+
+ delete $self->stash->{layout};
+
+ if ( $status->{checked_in} ) {
+ $self->render( '_checked_in', status => $status );
+ }
+ else {
+ $self->render( '_checked_out', status => $status );
+ }
+}
+
sub geolocation {
my ($self) = @_;