Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
travelynx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
travelynx
Commits
8daf885a
Unverified
Commit
8daf885a
authored
1 year ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
indicate whether current journey has realtime data
parent
10dc685d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/Travelynx/Model/InTransit.pm
+9
-3
9 additions, 3 deletions
lib/Travelynx/Model/InTransit.pm
templates/_checked_in.html.ep
+5
-2
5 additions, 2 deletions
templates/_checked_in.html.ep
templates/_public_status_card.html.ep
+4
-1
4 additions, 1 deletion
templates/_public_status_card.html.ep
with
18 additions
and
6 deletions
lib/Travelynx/Model/InTransit.pm
+
9
−
3
View file @
8daf885a
...
...
@@ -96,8 +96,7 @@ sub add {
'
in_transit
',
{
user_id
=>
$uid
,
cancelled
=>
$train
->
departure_is_cancelled
?
1
cancelled
=>
$train
->
departure_is_cancelled
?
1
:
0
,
checkin_station_id
=>
$checkin_station_id
,
checkin_time
=>
DateTime
->
now
(
time_zone
=>
'
Europe/Berlin
'
),
...
...
@@ -111,7 +110,13 @@ sub add {
route
=>
$json
->
encode
(
$route
),
messages
=>
$json
->
encode
(
[
map
{
[
$_
->
[
0
]
->
epoch
,
$_
->
[
1
]
]
}
$train
->
messages
]
)
),
data
=>
JSON
->
new
->
encode
(
{
rt
=>
$train
->
departure_has_realtime
?
1
:
0
}
),
}
);
}
...
...
@@ -152,6 +157,7 @@ sub add {
sched_departure
=>
$stop
->
{
sched_dep
},
real_departure
=>
$stop
->
{
rt_dep
}
//
$stop
->
{
sched_dep
},
route
=>
$json
->
encode
(
[
@route
]
),
data
=>
JSON
->
new
->
encode
(
{
rt
=>
$stop
->
{
rt_dep
}
?
1
:
0
}
),
}
);
}
...
...
This diff is collapsed.
Click to expand it.
templates/_checked_in.html.ep
+
5
−
2
View file @
8daf885a
...
...
@@ -2,7 +2,7 @@
<div class="autorefresh">
<div class="card">
<div class="card-content">
<i class="material-icons
small
right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<i class="material-icons right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
% if (not $journey->{arr_name}) {
<span class="card-title center-align">Ziel wählen</span>
% }
...
...
@@ -180,9 +180,12 @@
Bitte wähle ein neues Reiseziel.
</p>
% }
% if (@{$journey->{messages} // []} or @{$journey->{extra_data}{qos_msg} // []}) {
% if (@{$journey->{messages} // []} or @{$journey->{extra_data}{qos_msg} // []}
or not $journey->{extra_data}{rt}
) {
<p style="margin-bottom: 2ex;">
<ul>
% if (not $journey->{extra_data}{rt}) {
<li><i class="material-icons tiny">gps_off</i> Keine Echtzeitdaten vorhanden
% }
% for my $message (reverse @{$journey->{messages} // []}) {
% if ($journey->{sched_departure}->epoch - $message->[0]->epoch < 1800) {
<li> <i class="material-icons tiny">warning</i> <%= $message->[0]->strftime('%H:%M') %>: <%= $message->[1] %></li>
...
...
This diff is collapsed.
Click to expand it.
templates/_public_status_card.html.ep
+
4
−
1
View file @
8daf885a
...
...
@@ -2,7 +2,7 @@
% if ($journey->{checked_in}) {
<div class="card">
<div class="card-content">
<i class="material-icons
small
right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<i class="material-icons right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title">
% if (stash('from_profile')) {
Unterwegs mit <%= include '_format_train', journey => $journey %>
...
...
@@ -14,6 +14,9 @@
<a href="/p/<%= $name %>"><%= $name %></a> ist unterwegs
% }
<i class="material-icons right"><%= visibility_icon($journey->{effective_visibility_str}) %></i>
% if (not $journey->{extra_data}{rt}) {
<i class="material-icons right grey-text">gps_off</i>
% }
</span>
% if ($privacy->{comments_visible} and $journey->{comment}) {
<p>„<%= $journey->{comment} %>“</p>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment