summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-08 21:20:04 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-08 21:20:04 +0200
commitc0c7b1a589b51b9fe27980ff7b5c80e56a77eb01 (patch)
tree7aec58d2d32418578e0e785f19f787629e5a27c1 /templates
parentbeb17acb8440bb44f1070c2fb3b2e6cf7521f800 (diff)
Work-in-progress journey editor. Not ready for deployment.
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_journey.html.ep19
-rw-r--r--templates/journey.html.ep5
2 files changed, 14 insertions, 10 deletions
diff --git a/templates/edit_journey.html.ep b/templates/edit_journey.html.ep
index 8fdc5b6..d36fc65 100644
--- a/templates/edit_journey.html.ep
+++ b/templates/edit_journey.html.ep
@@ -1,3 +1,4 @@
+<h1>Zugfahrt bearbeiten</h1>
% if ($error and $error eq 'notfound') {
<div class="row">
<div class="col s12">
@@ -25,6 +26,7 @@
% }
%= form_for '/journey/edit' => (method => 'POST') => begin
%= csrf_field
+ %= hidden_field 'journey_id' => param('journey_id')
<div class="row">
<div class="col s12">
<p>
@@ -35,6 +37,10 @@
am
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
</p>
+ <p>
+ Nach einer Änderung können die ursprünglich eingetragenen
+ Zeiten nicht mehr wiederhergestellt werden.
+ </p>
<table class="striped">
<tr>
<th scope="row">Zug</th>
@@ -69,17 +75,14 @@
%= text_field 'rt_arrival', id => 'real_arrival', class => 'validate', pattern => '[0-9][0-9]?[.][0-9][0-9]?[.][0-9][0-9][0-9][0-9] +[0-9][0-9]:[0-9][0-9]'
</td>
</tr>
- <tr>
- <th scope="row">Route</th>
- <td>
- %= text_area 'route', id => 'route', cols => 40, rows => 20
- </td>
- </tr>
</table>
</div>
</div>
<div class="row">
- <div class="col s3 m3 l3">
+ <div class="col s6 m6 l6 center-align">
+ <button class="btn waves-effect waves-light" type="submit" name="action" value="cancel">
+ Abbrechen
+ </button>
</div>
<div class="col s6 m6 l6 center-align">
<button class="btn waves-effect waves-light" type="submit" name="action" value="save">
@@ -87,8 +90,6 @@
<i class="material-icons right">send</i>
</button>
</div>
- <div class="col s3 m3 l3">
- </div>
</div>
%= end
% }
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index 3b84d67..b5c24a7 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -26,6 +26,9 @@
am
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
</p>
+ % if ($journey->{edited}) {
+ <p>Die Ankunfts- und Abfahrtsdaten wurden nachträglich bearbeitet.</p>
+ % }
<table class="striped">
<tr>
<th scope="row">Zug</th>
@@ -141,7 +144,7 @@
<div class="col s6 m6 l6 center-align">
%= form_for '/journey/edit' => (method => 'POST') => begin
%= hidden_field 'journey_id' => param('journey_id')
- <button class="btn waves-effect waves-light" type="submit" name="action" value="edit" disabled="disabled">
+ <button class="btn waves-effect waves-light" type="submit" name="action" value="edit">
Bearbeiten
</button>
%= end