Skip to content
Snippets Groups Projects
Commit 4d0b5f39 authored by Magnus Giesbert's avatar Magnus Giesbert
Browse files

Merge branch '230-wiki-kategorie-fuer-dokuwiki' into 'master'

Füge Kategorien für DokuWiki via namensräume hinzu.

Closes #230

See merge request protokollsystem/proto3!23
parents 40f80ad0 5c1c4f38
No related branches found
No related tags found
No related merge requests found
...@@ -333,6 +333,15 @@ class Protocol(DatabaseModel): ...@@ -333,6 +333,15 @@ class Protocol(DatabaseModel):
return "Protokoll:{}-{:%Y-%m-%d}".format( return "Protokoll:{}-{:%Y-%m-%d}".format(
self.protocoltype.short_name, self.date) self.protocoltype.short_name, self.date)
def get_dokuwiki_pagetitle(self):
""" Uses dokuwiki namespaces in the pagetitle as a standin for a categories
The default namespace 'protokoll', is used if protocoltype.wiki_category is empty.
"""
category = self.protocoltype.wiki_category or "protokoll"
return "{}:{}-{:%Y-%m-%d}".format(
category, self.protocoltype.short_name, self.date)
def get_etherpad_link(self): def get_etherpad_link(self):
if self.pad_identifier is None: if self.pad_identifier is None:
identifier = self.get_identifier() identifier = self.get_identifier()
......
...@@ -639,7 +639,7 @@ def push_to_dokuwiki_async(protocol_id, content, summary): ...@@ -639,7 +639,7 @@ def push_to_dokuwiki_async(protocol_id, content, summary):
with xmlrpc.client.ServerProxy(config.WIKI_API_URL) as proxy: with xmlrpc.client.ServerProxy(config.WIKI_API_URL) as proxy:
try: try:
if not proxy.wiki.putPage( if not proxy.wiki.putPage(
protocol.get_wiki_title(), content, protocol.get_dokuwiki_pagetitle(), content,
{"sum": {"sum":
"Automatisch generiert vom Protokollsystem 3."}): "Automatisch generiert vom Protokollsystem 3."}):
return _make_error( return _make_error(
......
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
<p> <p>
Zu beachten ist, dass der Anzeigename des Sitzungstyps nur im Protokolltyp angepasst werden kann und im Protokoll ein Teil der Überschrift ist. Zu beachten ist, dass der Anzeigename des Sitzungstyps nur im Protokolltyp angepasst werden kann und im Protokoll ein Teil der Überschrift ist.
{% if config.WIKI_ACTIVE %} {% if config.WIKI_ACTIVE %}
Je Typ kann angegeben werdem, ob das Protokoll im Status veröffentlicht in das Wiki exportiert werden soll, wobei eien Kategorie anzugeben ist. Je Typ kann angegeben werden, ob das Protokoll im Status veröffentlicht in das Wiki exportiert werden soll, wobei eine Kategorie anzugeben ist.
Wenn ein Dokuwiki genutzt wird, wird die Kategorie als <a href="https://www.dokuwiki.org/de:namespaces">Namensraum</a> verwendet (default Kategorie ist "Protokoll").
{% endif %} {% endif %}
{% if config.PRINTING_ACTIVE %} {% if config.PRINTING_ACTIVE %}
Auch kann der Standarddrucker festgelegt werden, der für den Protokolltyp genutzt werden soll. Auch kann der Standarddrucker festgelegt werden, der für den Protokolltyp genutzt werden soll.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment