summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/individualform.html.ep6
-rw-r--r--templates/individuallist.html.ep7
2 files changed, 12 insertions, 1 deletions
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
<div class="row">
- <div class="input-field col s12">
+ <div class="input-field col s6">
<label class="active">Sortierung</label>
%= select_field order_by => [['Zeit ↓', 'scheduled_time.d'], ['Zeit ↑', 'scheduled_time.a'], ['Verspätung ↓', 'delay.d'], ['Verspätung ↑', 'delay.a']]
</div>
+ <div class="input-field col s6 checkbox">
+ %= check_box 'with_messages' => 1, id => 'with_messages'
+ <label for="with_messages">Meldungen anzeigen</label>
+ </div>
</div>
%= 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 {
<div class="individuallist">
<table>
+% if (param('with_messages')) {
<tr><th>Bahnhof</th><th>Zeit</th><th>Zug</th><th>Nummer</th><th>Richtung</th><th>Meldungen</th></tr>
+% }
+% else {
+<tr><th>Bahnhof</th><th>Zeit</th><th>Zug</th><th>Nummer</th><th>Richtung</th></tr>
+% }
% for my $entry (@{ stash('list') // [] }) {
% my ($station, $time, $delay, $canceled, $dest, $train_type, $train_no, $line_no, $platform, $messages) = @{$entry};
<tr>
@@ -42,11 +47,13 @@ Keine Daten mit diesen Parametern gefunden.
<td class="destination">
%= $dest
</td>
+% if (param('with_messages')) {
<td class="messages">
% for my $msg (@{$messages // []}) {
<%= $msg %><br/>
% }
</td>
+% }
</tr>
% }
</table>