From 539b45fd2112ab27148e7e7d5b9f17132c5f6a4c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 21 Mar 2016 21:34:30 +0100 Subject: individual list: do not show messages by default --- templates/individualform.html.ep | 6 +++++- templates/individuallist.html.ep | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/individualform.html.ep b/templates/individualform.html.ep index 6db815c..6e08ac0 100644 --- a/templates/individualform.html.ep +++ b/templates/individualform.html.ep @@ -2,10 +2,14 @@ Details zu individuellen Zugfahrten. Es werden maximal 100 Ergebnisse angezeigt. %= form_for individual => begin
-
+
%= select_field order_by => [['Zeit ↓', 'scheduled_time.d'], ['Zeit ↑', 'scheduled_time.a'], ['Verspätung ↓', 'delay.d'], ['Verspätung ↑', 'delay.a']]
+
+ %= check_box 'with_messages' => 1, id => 'with_messages' + +
%= include 'filterform'; % end diff --git a/templates/individuallist.html.ep b/templates/individuallist.html.ep index f7912b2..06bab3d 100644 --- a/templates/individuallist.html.ep +++ b/templates/individuallist.html.ep @@ -8,7 +8,12 @@ Keine Daten mit diesen Parametern gefunden. % else {
+% if (param('with_messages')) { +% } +% else { + +% } % for my $entry (@{ stash('list') // [] }) { % my ($station, $time, $delay, $canceled, $dest, $train_type, $train_no, $line_no, $platform, $messages) = @{$entry}; @@ -42,11 +47,13 @@ Keine Daten mit diesen Parametern gefunden. +% if (param('with_messages')) { +% } % }
BahnhofZeitZugNummerRichtungMeldungen
BahnhofZeitZugNummerRichtung
%= $dest % for my $msg (@{$messages // []}) { <%= $msg %>
% }
-- cgit v1.2.3