summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-06 21:42:26 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-06 21:44:31 +0100
commitfb126c69289abf7174f53b0d04f56f195e0fbd12 (patch)
tree7e80d49575891f90132b05a95ab5a242260de53e /templates
parent094c536eb475b02a26f65769d6ff460d270ef454 (diff)
optionally show journey comment in public user status
Closes #19
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep2
-rw-r--r--templates/_public_status_card.html.ep3
-rw-r--r--templates/account.html.ep3
-rw-r--r--templates/privacy.html.ep16
-rw-r--r--templates/user_status.html.ep2
5 files changed, 24 insertions, 2 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 5631e12..f915769 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -4,7 +4,7 @@
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title">Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %></span>
% if ($journey->{comment}) {
- <p><%= $journey->{comment} %>.</p>
+ <p><%= $journey->{comment} %></p>
% }
<p>
<div class="center-align countdown"
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 0bed878..4a846af 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -3,6 +3,9 @@
<div class="card-content">
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
<span class="card-title"><%= $name %> ist unterwegs</span>
+ % if ($public_level & 0x04 and $journey->{comment}) {
+ <p>„<%= $journey->{comment} %>“</p>
+ % }
<p>
% if ($journey->{train_line}) {
<div class="center-align"><b><%= $journey->{train_type} %> <%= $journey->{train_line} %></b> <%= $journey->{train_no} %></div>
diff --git a/templates/account.html.ep b/templates/account.html.ep
index 627be85..7ad48b5 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -69,6 +69,9 @@
% if ($acc->{is_public} & 0x02) {
Aktueller Status
% }
+ % if (($acc->{is_public} & 0x06) == 0x06) {
+ mit Kommentar
+ % }
</td>
</tr>
<tr>
diff --git a/templates/privacy.html.ep b/templates/privacy.html.ep
index 4469154..b16ee44 100644
--- a/templates/privacy.html.ep
+++ b/templates/privacy.html.ep
@@ -28,6 +28,22 @@
</div>
</div>
<div class="row">
+ <div class="input-field col s12">
+ <label>
+ %= check_box public_comment => 1
+ <span>Checkin-Kommentar</span>
+ </label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ Wenn aktiv, wird in deinem aktuellen Status auch der optionale
+ Freitext-Kommentar der Zugfahrt gezeigt. Wenn du gerade nicht
+ eingecheckt bist oder dein aktueller Status nicht öffentlich ist,
+ hat dieses Feld keine Auswirkungen.
+ </div>
+ </div>
+ <div class="row">
<div class="col s3 m3 l3">
</div>
<div class="col s6 m6 l6 center-align">
diff --git a/templates/user_status.html.ep b/templates/user_status.html.ep
index 2a6be03..78ef547 100644
--- a/templates/user_status.html.ep
+++ b/templates/user_status.html.ep
@@ -1,5 +1,5 @@
<div class="row">
<div class="col s12 publicstatuscol" data-user="<%= $name %>">
- %= include '_public_status_card', name => $name, journey => $journey
+ %= include '_public_status_card', name => $name, public_level => $public_level, journey => $journey
</div>
</div>