From 8834ca6dc337b1c11c0f531f1334c4da41af3666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20Sch=C3=BCttl=C3=B6ffel?=
 <schuettloeffel@zqs.uni-hannover.de>
Date: Tue, 29 Oct 2024 13:32:39 +0000
Subject: [PATCH] Resolve "Sichtbarkeitseinstellung: Template konfigurierbar
 oder statisch machen"

Closes #3863

Merge request studip/studip!2748
---
 locale/de/LC_HELP/visibility_decision.php | 185 +++++++++-------------
 locale/en/LC_HELP/visibility_decision.php | 153 ++++++++----------
 2 files changed, 143 insertions(+), 195 deletions(-)

diff --git a/locale/de/LC_HELP/visibility_decision.php b/locale/de/LC_HELP/visibility_decision.php
index 7d5ef51d595..918370ec771 100644
--- a/locale/de/LC_HELP/visibility_decision.php
+++ b/locale/de/LC_HELP/visibility_decision.php
@@ -1,106 +1,79 @@
-<?= MessageBox::error("DIES IST NUR EIN BEISPIELTEXT. NICHT OHNE LOKALE ANPASSUNGEN VERWENDEN!") ?>
-<table width="100%" border="0" cellspacing="10" cellpadding="10">
-    <colgroup>
-        <col style="width: 47%">
-        <col style="width: 6%">
-        <col style="width: 47%">
-    </colgroup>
-    <tr>
-        <td colspan="3">
-            <h1>Änderungen zur Sichtbarkeit in Stud.IP</h1>
-            <p>Ab sofort sind Ihre Daten für andere NutzerInnen nur
-                noch mit Ihrem Einverständnis zugänglich. Sie haben <em>jetzt</em>
-                die Möglichkeit, sich zu entscheiden, weiterhin sichtbar zu sein und Stud.IP
-                wie gewohnt zu nutzen, oder unsichtbar zu sein, dafür aber nicht mehr alle
-                Funktionen verwenden zu können.</p>
-            <p>Sie können diese Einstellung jederzeit unter &quot;Persönliche Einstellungen&quot;
-                ändern.</p>
-        </td>
-    </tr>
-    <tr>
-        <td valign="top">Wenn Sie sichtbar sind, dann</td>
-        <td></td>
-        <td valign="top">Wenn Sie unsichtbar sind, dann</td>
-    </tr>
-    <tr>
-        <td valign="top">
-            <ul>
-                <li>werden Sie in der öffentlichen "Wer-ist-online"-Liste
-                    mit Zeitpunkt ihrer letzten Aktivität erscheinen,
-                </li>
-                <li>können Sie alle Kommunikationsmöglichkeiten wie gewohnt
-                    nutzen,
-                </li>
-                <li>können Sie in Ihrem Profil trotzdem weitestgehend
-                    entscheiden, was andere über Sie erfahren können,
-                </li>
-                <li>können Sie von anderen gefunden und kontaktiert werden,</li>
-                <li>leisten Sie einen Beitrag dazu, Stud.IP weiterhin zu einer aktiven
-                    und kommunikativen Plattform zu machen.
-                </li>
-            </ul>
-        </td>
-        <td></td>
-        <td valign="top">
-            <ul>
-                <li>können Sie nicht mehr über die Personensuche gefunden werden,</li>
-                <li>können Sie nicht mehr in der "Wer-ist-online"-Liste erscheinen,</li>
-                <li>können Sie nicht mehr Ihr Profil nutzen,</li>
-                <li>können Sie nicht mehr Ihre E-Mail-Adresse, Ihr Gästebuch, Ihre Stud.IP-Punkte etc. anderen
-                    zugänglich machen,
-                </li>
-                <li>können Sie nicht mehr im Adressbuch anderer NutzerInnen stehen.</li>
-            </ul>
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            Achtung! Grundsätzlich und unabhängig davon, ob Sie sichtbar oder unsichtbar sind, gilt:
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            <ul>
-                <li>Sie können Stud.IP aktiv nutzen und sich an Veranstaltungen, Foren etc. beteiligen</li>
-                <li>Teilnehmendenliste von Veranstaltungen sind nur dann für die Teilnehmenden zugänglich, wenn alle
-                    einverstanden sind
-                </li>
-                <li>
-                    Sobald Sie im System aktiv werden - d.h. Forumsbeiträge verfassen, sich an nicht-anonymen Umfragen
-                    beteiligen, Mails verschicken etc. - wird Ihr Name dabei angegeben und es lässt sich nicht
-                    vermeiden, dass andere Nutzerinnen und Nutzer indirekt erkennen können, ob Sie sichtbar oder
-                    unsichtbar sind.
-                </li>
-            </ul>
-        </td>
-    </tr>
-    <tr>
-        <td style="background:#ddffdd; border:1px solid black;" valign="top">
-            <p><b>Ich möchte sichtbar sein und alle Möglichkeiten von Stud.IP nutzen können.</b></p>
-            <p>Ich akzeptiere damit, dass die in den <a href="<?= URLHelper::getURL('datenschutz.php') ?>"
-                                                        class="link-intern" target="_blank">Erläuterungen
-                    zum Datenschutz</a> aufgeführten Informationen
-                anderen zugänglich sind.</p>
-            <p>&nbsp;</p>
-            <p>&nbsp;</p>
-            <p>&nbsp;</p>
-            <?= \Studip\LinkButton::create('Sichtbar werden', URLHelper::getURL('?vis_state=yes&vis_cmd=apply')) ?>
-        </td>
-        <td></td>
-        <td style="background:#ffdddd; border:1px solid black;" valign="top">
-            <p><b>Ich möchte unsichtbar sein und nehme Einschränkungen in der Nutzung in Kauf.</b>
-            <p>Ich nehme damit zur Kenntnis, dass meine persönlichen Daten wie in den <a
-                        href="<?= URLHelper::getLink('datenschutz.php') ?>" class="link-intern"
-                        target="_blank">Erläuterungen zum Datenschutz</a>
-                beschrieben und begründet dennoch Administrator/-innen und, in Teilen, den
-                Lehrenden meiner Veranstaltungen zugänglich sind.</p>
-            <p>&nbsp;</p>
-            <?= \Studip\LinkButton::create('Unsichtbar werden', URLHelper::getURL('?vis_state=no&vis_cmd=apply')) ?>
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            <p>Sie können diese Entscheidung jederzeit unter "Persönliche Einstellungen" wieder ändern.
-        </td>
-    </tr>
-</table>
+<section class="contentbox">
+    <header>
+        <h1>Sichtbarkeit in Stud.IP</h1>
+    </header>
+    <section>
+        <table width="100%" border="0" cellspacing="10" cellpadding="10">
+            <colgroup>
+                <col style="width: 47%">
+                <col style="width: 6%">
+                <col style="width: 47%">
+            </colgroup>
+            <tr>
+                <td colspan="3">
+                    <p>Sie haben jetzt die Möglichkeit sich zu entscheiden in Stud.IP sichtbar oder unsichtbar zu sein. Diese Einstellung können jederzeit unter Profil->Einstellungen->Privatsphäre geändert werden.</p>
+                    <p>Grundsätzlich und unabhängig davon, ob Sie sichtbar oder unsichtbar sind, gilt:</p>
+                    <ul>
+                        <li>Sie können Stud.IP aktiv nutzen und sich an Veranstaltungen, Foren etc. beteiligen</li>
+                        <li>Teilnehmendenlisten von Veranstaltungen sind nur dann für die Teilnehmenden zugänglich, wenn alle
+                            einverstanden sind
+                        </li>
+                        <li>
+                            Sobald Sie im System aktiv werden - d.h. Forumsbeiträge verfassen, sich an nicht-anonymen Umfragen
+                            beteiligen, Mails verschicken etc. - wird Ihr Name dabei angegeben und es lässt sich nicht
+                            vermeiden, dass andere Nutzerinnen und Nutzer indirekt erkennen können, ob Sie sichtbar oder
+                            unsichtbar sind.
+                        </li>
+                    </ul>
+                </td>
+            </tr>
+            
+            <tr>
+                <td style="background:#ddffdd; border:1px solid #d0d7e3;" valign="top">
+                    <p><b>Wenn Sie sichtbar sind, dann</b></p>
+                    <ul>
+                        <li>werden Sie in der öffentlichen "Wer-ist-online"-Liste
+                            mit Zeitpunkt ihrer letzten Aktivität erscheinen,
+                        </li>
+                        <li>können Sie alle Kommunikationsmöglichkeiten wie gewohnt
+                            nutzen,
+                        </li>
+                        <li>können Sie in Ihrem Profil trotzdem weitestgehend
+                            entscheiden, was andere über Sie erfahren können,
+                        </li>
+                        <li>können Sie von anderen gefunden und kontaktiert werden,</li>
+                        <li>leisten Sie einen Beitrag dazu, Stud.IP weiterhin zu einer aktiven
+                            und kommunikativen Plattform zu machen.
+                        </li>
+                    </ul>
+                    <?= \Studip\LinkButton::create('Sichtbar werden', URLHelper::getURL('?vis_state=yes&vis_cmd=apply')) ?>
+                </td>
+                <td></td>
+                <td style="background:#ffdddd; border:1px solid #d0d7e3;" valign="top">
+                    <p><b>Wenn Sie unsichtbar sind, dann</b>
+                    <ul>
+                        <li>können Sie nicht mehr über die Personensuche gefunden werden,</li>
+                        <li>werden Sie nicht mehr in der "Wer-ist-online"-Liste erscheinen,</li>
+                        <li>können Sie nicht mehr Ihr Profil nutzen,</li>
+                        <li>können Sie nicht mehr Ihre E-Mail-Adresse, Ihr Gästebuch, Ihre Stud.IP-Punkte etc. anderen
+                            zugänglich machen,
+                        </li>
+                        <li>können Sie nicht mehr im Adressbuch anderer NutzerInnen stehen.</li>
+                    </ul>
+                    <?= \Studip\LinkButton::create('Unsichtbar werden', URLHelper::getURL('?vis_state=no&vis_cmd=apply')) ?>
+                </td>
+            </tr>
+            <? if (Config::get()->PRIVACY_URL): ?>
+            <tr>
+                <td colspan="3">
+                    <p>
+                        Weitere Informationen entnehme Sie bitte den 
+                        <a href="<?=URLHelper::getURL(Config::get()->PRIVACY_URL, ['cancel_login' => 1], true) ?>" target="_bank">Datenschutzerklärungen</a>.
+                    </p>
+                </td>
+            </tr>
+            <? endif; ?>
+        </table>
+    </section>
+</section>
+
diff --git a/locale/en/LC_HELP/visibility_decision.php b/locale/en/LC_HELP/visibility_decision.php
index 401bb33d3ff..6cbd32ce6e9 100644
--- a/locale/en/LC_HELP/visibility_decision.php
+++ b/locale/en/LC_HELP/visibility_decision.php
@@ -1,89 +1,64 @@
-<?= MessageBox::error("THIS IS JUST AN EXAMPLE TEXT. DON'T USE UNMODIFIED.") ?>
-<table width="100%" border="0" cellspacing="10" cellpadding="10">
-    <colgroup>
-        <col style="width: 47%">
-        <col style="width: 6%">
-        <col style="width: 47%">
-    </colgroup>
-    <tr>
-        <td colspan="3">
-            <h1>Changes of visibility in Stud.IP</h1>
-            <p>From now your data is only accessible for other users with your permission.<br>
-                You <em>now</em> have the possibility to decide whether to be visible as usual and to use Stud.IP like
-                before or to be invisible without being able to use all of the functions. </p>
-            <p>If you look into your personal details you can change these adjustments at any time.</p>
-        </td>
-    </tr>
-    <tr>
-        <td valign="top">If you are visible you</td>
-        <td></td>
-        <td valign="top">If you are invisible you</td>
-    </tr>
-    <tr>
-        <td valign="top">
-            <ul>
-                <li>will appear in the public "who-is-online"-list with the time of your last activity</li>
-                <li>can use any opportunity of communication</li>
-                <li>can decide most extensively what information other users are able to see on your personal homepage
-                </li>
-                <li>can be found by other users and come into contact with them</li>
-                <li>make a contribution to help making Stud.IP an active and communicative platform</li>
-            </ul>
-        </td>
-        <td></td>
-        <td valing="top">
-            <ul>
-                <li>cannot be found via "user search"</li>
-                <li>don't appear in the "who is online"-list</li>
-                <li>cannot use your Stud.IP-homepage anymore</li>
-                <li>don't give the opportunity to other users for reaching your e-mail address, your Stud.IP-score,
-                    etc.
-                </li>
-                <li>cannot be listed into the address-books of other users</li>
-            </ul>
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            Careful! In principle and regardless of being visible or invisible , some things are valid:
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            <ul>
-                <li>you can use Stud.IP actively and take part in courses, forum discussions, etc.
-                <li>participant-lists of courses are only accessible for the participants if everyone of them is in
-                    agreement with it
-                <li>as soon as you become active in the system - which means creating articles in forum discussions,
-                    taking part in non-invisible polls (votings), sending mails, etc. - your name is indicated and it
-                    isn't possible to avoid that other users can see directly whether you are visible or invisible.
-            </ul>
-        </td>
-    </tr>
-    <tr>
-        <td style="background:#ddffdd; border:1px solid black;" valign="top">
-            <p><b>I want to be visible and want to use any opportunity given by Stud.IP.</b></p>
-            <p>I accept that the information - listed in the <a
-                        href="<?= URLHelper::getURL('datenschutz.php') ?>" class="link-intern"
-                        target="_blank">explanations of data protection</a> - are accessible for others.</p>
-            <p>&nbsp;</p>
-            <p>&nbsp;</p>
-            <p>&nbsp;</p>
-            <?= \Studip\LinkButton::create('Become visible', URLHelper::getURL('?vis_state=yes&vis_cmd=apply')) ?>
-        </td>
-        <td></td>
-        <td style="background:#ffdddd; border:1px solid black;" valign="top">
-            <p><b>I want to be invisible and put up with using restrictions. </b>
-            <p>I note that my personal data - as described and well-founded in the <a
-                        href="<?= URLHelper::getLink('datenschutz.php') ?>" class="link-intern"
-                        target="_blank">explanation of data protection</a> - is nevertheless accessible for
-                administrators and partly for lecturers of my courses.</p>
-            <?= \Studip\LinkButton::create('Become invisible', URLHelper::getURL('?vis_state=no&vis_cmd=apply')) ?>
-        </td>
-    </tr>
-    <tr>
-        <td colspan="3">
-            <p>You are able to change this decision at any time if you look into your personal details.
-        </td>
-    </tr>
-</table>
+<section class="contentbox">
+    <header>
+        <h1>Changes of visibility in Stud.IP</h1>
+    </header>
+    <section>
+        <table width="100%" border="0" cellspacing="10" cellpadding="10">
+            <colgroup>
+                <col style="width: 47%">
+                <col style="width: 6%">
+                <col style="width: 47%">
+            </colgroup>
+            <tr>
+                <td colspan="3">
+                    <p>You now have the option to decide whether you want to be visible or invisible in Stud.IP. This setting can be changed at any time under Profile->Settings->Privacy.</p>
+                    <p> In principle and regardless of being visible or invisible, some things are valid:</p>
+                    <ul>
+                        <li>you can use Stud.IP actively and take part in courses, forum discussions, etc.</li>
+                        <li>participant-lists of courses are only accessible for the participants if everyone of them is in
+                            agreement with it</li>
+                        <li>as soon as you become active in the system - which means creating articles in forum discussions,
+                            taking part in non-invisible polls (votings), sending mails, etc. - your name is indicated and it
+                            isn't possible to avoid that other users can see directly whether you are visible or invisible.</li>
+                    </ul>
+                </td>
+            </tr>
+
+            <tr>
+                <td style="background:#ddffdd; border:1px solid #d0d7e3;" valign="top">
+                    <p><b>If you are visible you</b></p>
+                    <ul>
+                        <li>will appear in the public "who-is-online"-list with the time of your last activity</li>
+                        <li>can use any opportunity of communication</li>
+                        <li>can decide most extensively what information other users are able to see on your personal homepage</li>
+                        <li>can be found by other users and come into contact with them</li>
+                        <li>make a contribution to help making Stud.IP an active and communicative platform</li>
+                    </ul>
+                    <?= \Studip\LinkButton::create('Become visible', URLHelper::getURL('?vis_state=yes&vis_cmd=apply')) ?>
+                </td>
+                <td></td>
+                <td style="background:#ffdddd; border:1px solid #d0d7e3;" valign="top">
+                    <p><b>If you are invisible you</b>
+                    <ul>
+                        <li>cannot be found via "user search"</li>
+                        <li>don't appear in the "who is online"-list</li>
+                        <li>cannot use your Stud.IP-homepage anymore</li>
+                        <li>don't give the opportunity to other users for reaching your e-mail address, your Stud.IP-score, etc.</li>
+                        <li>cannot be listed into the address-books of other users</li>
+                    </ul>
+                    <?= \Studip\LinkButton::create('Become invisible', URLHelper::getURL('?vis_state=no&vis_cmd=apply')) ?>
+                </td>
+            </tr>
+            <? if (Config::get()->PRIVACY_URL): ?>
+            <tr>
+                <td colspan="3">
+                    <p>
+                        For further information, please refer to the
+                        <a href="<?=URLHelper::getURL(Config::get()->PRIVACY_URL, ['cancel_login' => 1], true) ?>" target="_bank">privacy policy</a>.
+                    </p>
+                </td>
+            </tr>
+            <? endif; ?>
+        </table>
+    </section>
+</section>
-- 
GitLab