summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-09-24 18:53:04 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-09-24 18:53:04 +0200
commite54130ad6ea805cc04db17a3f614cb4bd25ca3f0 (patch)
tree4ffe1b52cc44a2c75c1614d5c36c244d06716609 /templates
parent1c7779e94ef6859348570b9c1b5f2f8a27e32c1f (diff)
optionally show local transit connections as well
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep7
-rw-r--r--templates/_transit_fyi.html.ep19
-rw-r--r--templates/account.html.ep2
-rw-r--r--templates/use_history.html.ep24
4 files changed, 51 insertions, 1 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 040c5de..dcf9ddc 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -200,6 +200,13 @@
% }
%= include '_connections', connections => \@connections, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_ds100} : undef;
% }
+ % if (my @transit_fyi = @{stash('transit_fyi') // []}) {
+ <span class="card-title" style="margin-top: 2ex;">Nahverkehr</span>
+ % if ($journey->{arrival_countdown} < 0) {
+ <p>Nur zur Information – kein Checkin möglich.</p>
+ % }
+ %= include '_transit_fyi', transit_fyi => \@transit_fyi;
+ % }
% if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {
<p style="margin-top: 2ex;">
Der automatische Checkout erfolgt wegen gelegentlich veralteter
diff --git a/templates/_transit_fyi.html.ep b/templates/_transit_fyi.html.ep
new file mode 100644
index 0000000..42233e5
--- /dev/null
+++ b/templates/_transit_fyi.html.ep
@@ -0,0 +1,19 @@
+<table class="striped"><tbody>
+ % for my $res (@{$transit_fyi}) {
+ % my ($info, $via, $via_arr) = @{$res};
+ % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
+ <tr>
+ <td>
+ %= $info->{line}
+ <br/>
+ %= $info->{departure}->strftime('%H:%M')
+ % if ($info->{departure_delay}) {
+ %= sprintf('(%+d)', $info->{departure_delay})
+ % }
+ </td>
+ <td>
+ <%= $via %><br/><%= $via_arr %>
+ </td>
+ </tr>
+ % }
+</tbody></table>
diff --git a/templates/account.html.ep b/templates/account.html.ep
index 7658237..418291c 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -61,7 +61,7 @@
<th scope="row">Verbindungen</th>
<td>
<a href="/account/insight"><i class="material-icons">edit</i></a>
- % if ($use_history & 0x03) {
+ % if ($use_history & 0x07) {
Vorschläge aktiv
% }
% else {
diff --git a/templates/use_history.html.ep b/templates/use_history.html.ep
index e8e129f..1632b8b 100644
--- a/templates/use_history.html.ep
+++ b/templates/use_history.html.ep
@@ -48,6 +48,30 @@
</div>
</div>
<div class="row">
+ <div class="input-field col s12">
+ <label>
+ %= check_box local_transit => 1
+ <span>Nahverkehr</span>
+ </label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ Zeige beim Reisestatus zusätzlich Anschlussmöglichkeiten an den
+ Nahverkehr. Diese dienen lediglich zur Information; ein Checkin ist
+ nicht möglich. Es werden nur Anschlussmöglichkeiten zu Zielen
+ angezeigt, die im folgenden Feld gelistet sind (ein Ziel pro
+ Zeile, z.B. „Eichlinghofen H-Bahn, Dortmund“). Falls travelynx in
+ Zukunft eine Möglichkeit für Checkins in Nahverkehrsmittel erhält,
+ wird diese Liste ggf. gelöscht.
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ %= text_area 'destinations', id => 'destinations', class => 'materialize-textarea'
+ </div>
+ </div>
+ <div class="row">
<div class="col s3 m3 l3">
</div>
<div class="col s6 m6 l6 center-align">