mirror of
https://github.com/derf/travelynx
synced 2024-11-10 06:54:17 +00:00
frontend: add train timestamps to checkin action
(preparations for more flexible checkin time frames)
This commit is contained in:
parent
eb7000429e
commit
1ba41db376
5 changed files with 6 additions and 4 deletions
|
@ -185,6 +185,7 @@ function tvly_reg_handlers() {
|
|||
station: link.data('station'),
|
||||
train: link.data('train'),
|
||||
dest: link.data('dest'),
|
||||
ts: link.data('ts'),
|
||||
};
|
||||
tvly_run(link, req);
|
||||
});
|
||||
|
@ -223,6 +224,7 @@ function tvly_reg_handlers() {
|
|||
var req = {
|
||||
action: 'cancelled_from',
|
||||
station: link.data('station'),
|
||||
ts: link.data('ts'),
|
||||
train: link.data('train'),
|
||||
};
|
||||
tvly_run(link, req);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
% $link_class = 'action-cancelled-from';
|
||||
% }
|
||||
% if ($checkin_from) {
|
||||
<tr class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-dest="<%= $via->{name} %>">
|
||||
<tr class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>" data-dest="<%= $via->{name} %>">
|
||||
% }
|
||||
% else {
|
||||
<tr>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
% $link_class = 'action-cancelled-from';
|
||||
% }
|
||||
% if ($checkin_from) {
|
||||
<tr class="<%= $link_class %>" data-station="<%= $train->station_eva %>" data-train="<%= $train->id %>" data-dest="<%= $via->{name} %>">
|
||||
<tr class="<%= $link_class %>" data-station="<%= $train->station_eva %>" data-train="<%= $train->id %>" data-ts="<%= ($train->sched_datetime // $train->datetime)->epoch %>" data-dest="<%= $via->{name} %>">
|
||||
% }
|
||||
% else {
|
||||
<tr>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
% }
|
||||
<tr class="<%= $link_class %>" data-station="<%= $result->station_eva %>" data-train="<%= $result->id %>" data-tr="3">
|
||||
<tr class="<%= $link_class %>" data-station="<%= $result->station_eva %>" data-train="<%= $result->id %>" data-ts="<%= ($result->sched_datetime // $result->datetime)->epoch %>" data-tr="3">
|
||||
<td>
|
||||
<a>
|
||||
<%= $result->line %>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
% }
|
||||
<tr class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>" data-tr="3">
|
||||
<tr class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>" data-ts="<%= ($result->sched_departure // $result->departure)->epoch %>" data-tr="3">
|
||||
<td>
|
||||
<a>
|
||||
<%= $result->line %>
|
||||
|
|
Loading…
Reference in a new issue