From 9d5559dbd2208e8cd0bceac48f3d6a68269baa4a Mon Sep 17 00:00:00 2001
From: Markus Scheller <scheller_m@live.de>
Date: Sun, 18 Mar 2018 10:54:08 +0100
Subject: [PATCH] Added documentation about the system settings

protokollsystem/proto3#172
---
 server.py                                     |  6 +-
 templates/documentation-base.html             |  2 +-
 .../documentation-configuration-settings.html | 57 ++++++++++++++++++-
 templates/documentation.html                  |  2 +-
 4 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/server.py b/server.py
index 6085d1d..11c1b46 100755
--- a/server.py
+++ b/server.py
@@ -352,8 +352,10 @@ def todomails_configuration_documentation():
 @back.anchor
 @login_required
 def settings_configuration_documentation():
-    return render_template(
-        "documentation-configuration-settings.html")
+	user = current_user()
+	return render_template(
+        "documentation-configuration-settings.html",
+		system_administrator=(user is not None and config.ADMIN_GROUP in user.groups))
 
 @app.route("/types/list")
 @back.anchor
diff --git a/templates/documentation-base.html b/templates/documentation-base.html
index 94b8777..e2b61ff 100644
--- a/templates/documentation-base.html
+++ b/templates/documentation-base.html
@@ -18,7 +18,7 @@
     ('configuration_documentation', '/documentation/configuration', 'Einrichtung', [
         ('types_configuration_documentation', '/documentation/configuration/types', 'Typen'),
         ('todomails_configuration_documentation', '/documentation/configuration/todomails', 'Todo Mails'),
-        ('settings_configuration_documentation', '/documentation/configuration/settings', 'Einstellungen')
+        ('settings_configuration_documentation', '/documentation/configuration/settings', 'Systemeinstellungen')
     ])
 ] -%}
 {% set active_page = active_page|default('documentation') -%}
diff --git a/templates/documentation-configuration-settings.html b/templates/documentation-configuration-settings.html
index 4480d73..c115ee6 100644
--- a/templates/documentation-configuration-settings.html
+++ b/templates/documentation-configuration-settings.html
@@ -1,6 +1,61 @@
 {% extends "documentation-base.html" %}
 {% set active_page = "settings_configuration_documentation" %}
+{% block title %}Einrichtung: Systemeinstellungen{% endblock %}
 
 {% block documentation_content %}
-    <h3>Einstellungen</h3>
+    <h3>Einrichtung: Systemeinstellungen</h3>
+	<p>
+	Einige Features des Protokollsystem müssen bei der Installation und Einrichtung durch die <a href="mailto:{{config.ADMIN_MAIL}}">Admins</a> aktiviert werden. Eine Übersicht über die mit diesen Systemeinstellungen verbundenen Features soll hier gegeben werden. Sollten einige der angegeben Funktionalitäten aktiviert werden, so wende dich an die <a href="mailto:{{config.ADMIN_MAIL}}">Admins</a>. Bedenke vor deiner Anfrage, dass einige Features eventuell aus wichtigen Gründen bisher noch nicht aktiviert wurden.
+	</p>
+	<table class="table table-striped">
+		<thead>
+			<tr>
+				<th>Feature</th>
+				<th>Aktiviert</th>
+				<th>Kurzbeschreibung</th>
+			</tr>
+		</thead>
+        <tbody>
+			<tr>
+				<td>E-Mailversand</td>
+				<td><span class="glyphicon glyphicon-{% if config.MAIL_ACTIVE %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System kann selbstständig E-Mails versenden, um über nächste Sitzungen, neue Protokolle oder Todos zu informieren.</td>
+			</tr>
+			<tr>
+				<td>Druckeranbindung</td>
+				<td><span class="glyphicon glyphicon-{% if config.PRINTING_ACTIVE %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System kann Druckaufträge starten, um Beschlüsse oder Protokolle direkt über das Webinterface zu drucken.</td>
+			</tr>
+			<tr>
+				<td>Etherpadanbindung</td>
+				<td><span class="glyphicon glyphicon-{% if config.ETHERPAD_ACTIVE %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System kann mit einem Etherpad interagieren, um das Schreiben von Protokollen dort zu ermöglichen.</td>
+			</tr>
+			<tr>
+				<td>Wikianbindung</td>
+				<td><span class="glyphicon glyphicon-{% if config.WIKI_ACTIVE %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System kann veröffentlichte Protokolle in ein Wiki übertragen.</td>
+			</tr>
+			<tr>
+				<td>Kalenderanbindung</td>
+				<td><span class="glyphicon glyphicon-{% if config.CALENDAR_ACTIVE %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System kann eingetragene Sitzungstermine in einen Kalender übertragen.</td>
+			</tr>
+			<tr>
+				<td>Angepasste Standardvorlage</td>
+				<td><span class="glyphicon glyphicon-{% if (config.LATEX_LOCAL_TEMPLATES and config.LATEX_LOGO_TEMPLATE) or config.LATEX_GEOMETRY or config.LATEX_PAGESTYLE or config.LATEX_ADDITIONAL_PACKAGES or config.LATEX_HEADER_FOOTER %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System nutzt die Standardprotokollvorlage in einer angepassten Form.</td>
+			</tr>
+			<tr>
+				<td>Individuelle Protokollvorlagen</td>
+				<td><span class="glyphicon glyphicon-{% if config.LATEX_LOCAL_TEMPLATES and config.LATEX_TEMPLATES %}ok{% else %}remove{% endif %}" aria-hidden="true"></span></td>
+				<td>Das System stellt zusätzlich zur Standardvorlage individuelle Protokollvorlagen zur Verfügung.</td>
+			</tr>
+		</tbody>
+	</table>
+	{% if system_administrator and git_revision %}
+	<p>
+	Eine Beschreibung der Einrichtung des einzelnen Features kann der Projektseite der Software <a href="{{git_revision.url}}">„Protokollsystem 3“</a> entnommen werden. Bitte lies dir die <code>README.md</code> aufmerksam durch und entnimm bei Bedarf Konfigurationsbeispiele aus <code>config.py.example</code>. Bei schwerwiegenden Problemen kontaktiere die <a href="{{git_revision.url}}/project_members">Entwickler</a>.
+	</p>
+	{% endif %}
 {% endblock %}
diff --git a/templates/documentation.html b/templates/documentation.html
index f94a8b0..48a58cd 100644
--- a/templates/documentation.html
+++ b/templates/documentation.html
@@ -28,7 +28,7 @@
 			<li><a href="/documentation/configuration">Einrichtung</a><ul>
 				<li><a href="/documentation/configuration/types">Typen</a></li>
 				<li><a href="/documentation/configuration/todomails">Todo Mails</a></li>
-				<li><a href="/documentation/configuration/settings">Einstellungen</a></li>
+				<li><a href="/documentation/configuration/settings">Systemeinstellungen</a></li>
 			</ul></li>
 		</ul>
 		<p>
-- 
GitLab