mirror of
https://github.com/derf/travelynx
synced 2024-11-14 00:37:16 +00:00
59 lines
1.5 KiB
Text
59 lines
1.5 KiB
Text
<h1>Fahrt kommentieren</h1>
|
|
% if ($error or not $journey->{checked_in}) {
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<div class="card caution-color">
|
|
<div class="card-content white-text">
|
|
<span class="card-title">Fehler</span>
|
|
<p>Du bist gerade nicht eingecheckt. Vergangene Fahrten
|
|
kannst du über die Editierfunktion in der History
|
|
kommentieren.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% }
|
|
% else {
|
|
%= form_for '/journey/comment' => (method => 'POST') => begin
|
|
%= csrf_field
|
|
%= hidden_field 'dep_ts' => param('dep_ts')
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<p>
|
|
Eintrag zu
|
|
<b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b>
|
|
von
|
|
<b><%= $journey->{dep_name} %></b>
|
|
nach
|
|
<b><%= $journey->{arr_name} // 'irgendwo' %></b>
|
|
am
|
|
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
|
|
</p>
|
|
% if (current_user()->{comments_visible}) {
|
|
<p>
|
|
Der hier eingetragene Text ist als Teil deines Nutzerstatus
|
|
öffentlich sichtbar.
|
|
</p>
|
|
% }
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col s12">
|
|
%= text_field 'comment'
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col s6 m6 l6 center-align">
|
|
<a href="/" class="waves-effect waves-light btn">
|
|
Abbrechen
|
|
</a>
|
|
</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>
|
|
%= end
|
|
% }
|