summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/history.html.ep36
-rw-r--r--templates/passengerrights.html.ep69
2 files changed, 91 insertions, 14 deletions
diff --git a/templates/history.html.ep b/templates/history.html.ep
index a2f607a..607a356 100644
--- a/templates/history.html.ep
+++ b/templates/history.html.ep
@@ -7,20 +7,6 @@
</div>
</div>
-<div class="row">
- <div class="col s12 m12 l3 center-align">
- <a href="/cancelled" class="waves-effect waves-light btn"><i class="material-icons left">cancel</i> Zugausfälle</a>
- </div>
- <div class="col s12 m12 l1">&nbsp;</div>
- <div class="col s12 m12 l4 center-align">
- <a href="/journey/add" class="waves-effect waves-light btn"><i class="material-icons left">add</i> Neue Fahrt</a>
- </div>
- <div class="col s12 m12 l1">&nbsp;</div>
- <div class="col s12 m12 l3 center-align">
- <a href="/history.json" class="waves-effect waves-light btn"><i class="material-icons left">cloud</i> JSON-Export</a>
- </div>
-</div>
-
<h2>Nach Jahr</h2>
%= include '_history_years', current => '';
% if(0) {
@@ -41,6 +27,28 @@
</div>
% }
+<h2>Ausfälle und Verspätungen</h2>
+<div class="row">
+ <div class="col s12 m12 l5 center-align">
+ <a href="/cancelled" class="waves-effect waves-light btn"><i class="material-icons left">cancel</i> Zugausfälle</a>
+ </div>
+ <div class="col s12 m12 l2">&nbsp;</div>
+ <div class="col s12 m12 l5 center-align">
+ <a href="/fgr" class="waves-effect waves-light btn"><i class="material-icons left">feedback</i> Fahrgastrechte</a>
+ </div>
+</div>
+
+<h2>Rohdaten</h2>
+<div class="row">
+ <div class="col s12 m12 l5 center-align">
+ <a href="/history.json" class="waves-effect waves-light btn"><i class="material-icons left">cloud</i> JSON-Export</a>
+ </div>
+ <div class="col s12 m12 l2">&nbsp;</div>
+ <div class="col s12 m12 l5 center-align">
+ <a href="/journey/add" class="waves-effect waves-light btn"><i class="material-icons left">add</i> Neue Fahrt</a>
+ </div>
+</div>
+
% if (stash('statistics')) {
%= include '_history_stats', stats => stash('statistics');
% }
diff --git a/templates/passengerrights.html.ep b/templates/passengerrights.html.ep
new file mode 100644
index 0000000..09c50d9
--- /dev/null
+++ b/templates/passengerrights.html.ep
@@ -0,0 +1,69 @@
+<h1>Fahrgastrechte</h1>
+<div class="row">
+ <div class="col s12">
+ <p>
+ Gemäß der Fahrgastrechte im Eisenbahnverkehr besteht ab 60 Minuten
+ Verspätung am Ziel ein Entschädigungsanspruch gegenüber dem
+ Eisenbahnverkehrsunternehmen. Dieser kann mit dem
+ Fahrgastrechteformular geltend gemacht werden.
+ </p>
+ <p>
+ Die folgenden Zugfahrten sind wahrscheinliche Kandidaten dafür.
+ Details zur jeweiligen Zugfahrt sind bereits im Formular eingetragen.
+ </p>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col s12">
+ <table class="striped">
+ <thead>
+ <tr>
+ <th>Datum</th>
+ <th>Zug</th>
+ <th>Grund</th>
+ <th>Formular</th>
+ </tr>
+ </thead>
+ <tbody>
+ % for my $journey (@{$journeys}) {
+ % my $detail_link = '/journey/' . $journey->{id};
+ <tr>
+ <td><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></td>
+ <td><a href="<%= $detail_link %>">
+ <%= $journey->{type} %> <%= $journey->{line} // $journey->{no} %>
+ → <%= $journey->{to_name} %>
+ % if ($journey->{connection}) {
+ <br/>
+ <%= $journey->{connection}{type} %> <%= $journey->{connection}{line} // $journey->{connection}{no} %>
+ → <%= $journey->{connection}{to_name} %>
+ % }
+ </a></td>
+ <td>
+ % if ($journey->{cancelled}) {
+ Ausfall
+ % }
+ % else {
+ %= sprintf('%+d', $journey->{delay})
+ % if ($journey->{connection}) {
+ <br/>
+ %= sprintf('Mit Anschluss: %+d?', $journey->{possible_delay})
+ % }
+ % }
+ </td>
+ <td>
+ % my $form_target = sprintf('/journey/passenger_rights/FGR %s %s %s.pdf', $journey->{sched_departure}->ymd, $journey->{type}, $journey->{no});
+ %= form_for $form_target => (method => 'POST') => begin
+ %= csrf_field
+ %= hidden_field id => $journey->{id}
+ <button class="btn waves-effect waves-light grey darken-3" type="submit" name="action" value="generate">
+ <i class="material-icons">file_download</i>
+ </button>
+ %= end
+ </td>
+ </tr>
+ % }
+ </tbody>
+ </table>
+ </div>
+</div>