From e07063c52c51569b5f252a202f5d71b5f70a73e7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 26 Apr 2019 19:53:01 +0200 Subject: Add manual journey entry Closes #3 --- templates/journey.html.ep | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'templates/journey.html.ep') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 4af9694..4d0f3fd 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -121,15 +121,27 @@ % } - - Meldungen - - % for my $message (@{$journey->{messages} // []}) { - % my ($ts, $msg) = @{$message}; - <%= $ts->strftime('%d.%m.%Y %H:%M') %> : <%= $msg %>
- % } - - + % if ($journey->{edited} == 0x3fff) { + + Kommentar + + % for my $message (@{$journey->{messages} // []}) { + <%= $message->[1] %>
+ % } + + + % } + % else { + + Meldungen + + % for my $message (@{$journey->{messages} // []}) { + % my ($ts, $msg) = @{$message}; + <%= $ts->strftime('%d.%m.%Y %H:%M') %> : <%= $msg %>
+ % } + + + % } Route @@ -172,6 +184,7 @@ %= form_for '/journey/edit' => (method => 'POST') => begin %= hidden_field 'journey_id' => param('journey_id') %= end -- cgit v1.2.3