summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep25
-rw-r--r--templates/account.html.ep15
-rw-r--r--templates/use_external_links.html.ep82
3 files changed, 4 insertions, 118 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index b42792e..19a94bb 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -111,12 +111,7 @@
% }
</div>
<div style="float: right; text-align: right;">
- % if ($user->{sb_template}) {
- <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/>
- % }
- % else {
- <b><%= $journey->{arr_name} %></b><br/>
- % }
+ <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/>
% if ($journey->{real_arrival}->epoch) {
<b><%= $journey->{real_arrival}->strftime('%H:%M') %></b>
% if ($journey->{real_arrival}->epoch != $journey->{sched_arrival}->epoch) {
@@ -358,12 +353,7 @@
<div class="card-content">
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title">Ziel ändern?</span>
- % if ($user->{sb_template}) {
- <div class="targetlist">
- % }
- % else {
- <p>
- % }
+ <div class="targetlist">
% for my $station (@{$journey->{route_after}}) {
% my $is_dest = ($journey->{arr_name} and $station->[0] eq $journey->{arr_name});
<a class="action-checkout tablerow" style="<%= $is_dest? 'font-weight: bold;' : '' %>" data-station="<%= $station->[1] // $station->[0] %>">
@@ -387,16 +377,9 @@
% }
</span>
</a>
- % if ($user->{sb_template}) {
- <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1], tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>"><i class="material-icons tiny">train</i></a>
- % }
- % }
- % if ($user->{sb_template}) {
- </div>
- % }
- % else {
- </p>
+ <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1], tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}, hafas => $journey->{is_hafas} ? $journey->{backend_name} : q{}) %>"><i class="material-icons tiny"><%= $journey->{is_hafas} ? 'directions' : 'train' %></i></a>
% }
+ </div>
</div>
<div class="card-action">
<a class="action-undo blue-text" data-id="in_transit" data-checkints="<%= $journey->{timestamp}->epoch %>" style="margin-right: 0;">
diff --git a/templates/account.html.ep b/templates/account.html.ep
index 7f689c2..036fb35 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -28,9 +28,6 @@
% elsif ($success eq 'use_history') {
<span class="card-title">Einstellungen zu vorgeschlagenen Verbindungen geändert</span>
% }
- % elsif ($success eq 'external') {
- <span class="card-title">Einstellungen zu externen Diensten geändert</span>
- % }
% elsif ($success eq 'webhook') {
<span class="card-title">Web Hook aktualisiert</span>
% }
@@ -152,18 +149,6 @@
</tr>
% }
<tr>
- <th scope="row">Externe Dienste</th>
- <td>
- <a href="/account/services"><i class="material-icons">edit</i></a>
- % if ($acc->{sb_name}) {
- Abfahrtstafel: <%= $acc->{sb_name} %>
- % }
- % else {
- <span style="color: #999999;">Keine</span>
- % }
- </td>
- </tr>
- <tr>
<th scope="row">Registriert am</th>
<td><%= $acc->{registered_at}->strftime('%d.%m.%Y %H:%M') %></td>
</tr>
diff --git a/templates/use_external_links.html.ep b/templates/use_external_links.html.ep
deleted file mode 100644
index 77dfd44..0000000
--- a/templates/use_external_links.html.ep
+++ /dev/null
@@ -1,82 +0,0 @@
-<h1>Externe Dienste</h1>
-<div class="row">
- <div class="col s12">
- <p>
- Travelynx kann an geeigneten Stellen Links zu externen Diensten
- (z.B. Abfahrstafeln oder Informationen zum gerade genutzten Zug)
- einbinden. Hier lässt sich konfigurieren, welcher Dienst für welche
- Art von Informationen genutzt wird.
- <p/>
- </div>
-</div>
-<h2>Abfahrtstafel</h2>
-%= form_for '/account/services' => (method => 'POST') => begin
- %= csrf_field
- <div class="row">
- <div class="col s12">
- Angaben zu anderen an einer Station verkehrenden Verkehrsmitteln
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <div>
- <label>
- %= radio_button stationboard => '0'
- <span>Keine</span>
- </label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <div>
- <label>
- %= radio_button stationboard => '1'
- <span><a href="https://dbf.finalrewind.org/">DBF</a> (Schienenverkehr)</span>
- </label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <div>
- <label>
- %= radio_button stationboard => '2'
- <span><a href="https://bahn.expert/">bahn.expert</a> (Schienenverkehr)</span>
- </label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <div>
- <label>
- %= radio_button stationboard => '3'
- <span><a href="https://dbf.finalrewind.org/?hafas=DB">DBF</a> (Nahverkehr)</span>
- </label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="input-field col s12">
- <div>
- <label>
- %= radio_button stationboard => '4'
- <span><a href="https://bahn.expert/regional">bahn.expert/regional</a> (Nahverkehr)</span>
- </label>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col s3 m3 l3">
- </div>
- <div class="col s6 m6 l6 center-align">
- <button class="btn waves-effect waves-light" type="submit" name="action" value="save">
- Speichern
- <i class="material-icons right">send</i>
- </button>
- </div>
- <div class="col s3 m3 l3">
- </div>
- </div>
-%= end