summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-10 16:30:27 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-10 16:30:27 +0200
commit62ed936de5b54f72e4a94b553ecddaee34be1268 (patch)
treea56933070416d36e9ab4fc9abb51e42478e78d0e
parent27875acbc95f3b0365a4483710da422a0de9963a (diff)
app: link to main page when options are hidden
-rw-r--r--lib/DBInfoscreen/Controller/Wagenreihung.pm2
-rw-r--r--templates/layouts/app.html.ep7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm
index fa501a8..99c6bce 100644
--- a/lib/DBInfoscreen/Controller/Wagenreihung.pm
+++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm
@@ -30,6 +30,8 @@ sub wagenreihung {
$self->render(
'wagenreihung',
+ title =>
+ join( ' / ', map { $wr->train_type . ' ' . $_ } $wr->train_numbers ),
wr => $wr,
hide_opts => 1,
);
diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep
index 6189c9c..9d32bf7 100644
--- a/templates/layouts/app.html.ep
+++ b/templates/layouts/app.html.ep
@@ -38,7 +38,12 @@
%= stash('title') || 'DBF'
</span>
<ul id="nav-mobile" style="float: right;">
- <li><a href="#stationinput"><i class="material-icons">edit</i></a></li>
+ % if (stash('hide_opts')) {
+ <li><a href="/"><i class="material-icons">edit</i></a></li>
+ % }
+ % else {
+ <li><a href="#stationinput"><i class="material-icons">edit</i></a></li>
+ % }
<li><a href="/_auto"><i class="material-icons">my_location</i></a></li>
</ul>
</div>