summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-08-23 12:02:22 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-08-23 12:02:22 +0200
commita40aa1936bc088c76145600a2b074f8fb20079f5 (patch)
tree58be9cc212eff4196eec5b30bf5fc36de788dc02 /templates
parentf6d56d3134f6045726cb1d4ed8700382575bb686 (diff)
Allow comments to be edited
Diffstat (limited to 'templates')
-rw-r--r--templates/edit_journey.html.ep6
-rw-r--r--templates/journey.html.ep18
2 files changed, 15 insertions, 9 deletions
diff --git a/templates/edit_journey.html.ep b/templates/edit_journey.html.ep
index 06338f6..d1c1d47 100644
--- a/templates/edit_journey.html.ep
+++ b/templates/edit_journey.html.ep
@@ -75,6 +75,12 @@
%= 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">Kommentar</th>
+ <td>
+ %= text_field 'comment'
+ </td>
+ </tr>
</table>
</div>
</div>
diff --git a/templates/journey.html.ep b/templates/journey.html.ep
index 724d8ca..343c178 100644
--- a/templates/journey.html.ep
+++ b/templates/journey.html.ep
@@ -121,15 +121,7 @@
% }
</td>
</tr>
- % if ($journey->{comment}) {
- <tr>
- <th scope="row">Kommentar</th>
- <td>
- <%= $journey->{comment} %>
- </td>
- </tr>
- % }
- % else {
+ % if ($journey->{messages} and @{$journey->{messages}}) {
<tr>
<th scope="row">Meldungen</th>
<td>
@@ -140,6 +132,14 @@
</td>
</tr>
% }
+ % if ($journey->{user_data} and $journey->{user_data}{comment}) {
+ <tr>
+ <th scope="row">Kommentar</th>
+ <td>
+ <%= $journey->{user_data}{comment} %>
+ </td>
+ </tr>
+ % }
<tr>
<th scope="row">Route</th>
<td>