diff --git a/models/database.py b/models/database.py index 411ad1b88097cd2a1f80da0ebe5acb16e84b85b2..b8e8855385abcbb51528a7f7db7c7c5786d99c21 100644 --- a/models/database.py +++ b/models/database.py @@ -332,6 +332,15 @@ class Protocol(DatabaseModel): def get_wiki_title(self): return "Protokoll:{}-{:%Y-%m-%d}".format( 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): if self.pad_identifier is None: diff --git a/tasks.py b/tasks.py index 5612ca2f0b71f170a33af478e15d3eed3f238538..5976b989bd2dd2dab85dc33e2e8f1d9ead76d407 100644 --- a/tasks.py +++ b/tasks.py @@ -639,7 +639,7 @@ def push_to_dokuwiki_async(protocol_id, content, summary): with xmlrpc.client.ServerProxy(config.WIKI_API_URL) as proxy: try: if not proxy.wiki.putPage( - protocol.get_wiki_title(), content, + protocol.get_dokuwiki_pagetitle(), content, {"sum": "Automatisch generiert vom Protokollsystem 3."}): return _make_error( diff --git a/templates/documentation-configuration-types.html b/templates/documentation-configuration-types.html index aefef37ce6f17eef89b21da76aafda4d19d67485..bf920c76601aed3fab64a7ce6e8a9663821e561a 100644 --- a/templates/documentation-configuration-types.html +++ b/templates/documentation-configuration-types.html @@ -61,7 +61,8 @@ <p> 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 %} - 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 %} {% if config.PRINTING_ACTIVE %} Auch kann der Standarddrucker festgelegt werden, der für den Protokolltyp genutzt werden soll.