Minor changes, fixes and todos added

This commit is contained in:
Dirk Alders 2024-10-07 00:44:22 +02:00
parent cd3335a30a
commit 36071e4de0
4 changed files with 11 additions and 5 deletions

@ -1 +1 @@
Subproject commit 2abea3c4aec4716a2609828faddcd6b6e4c7728e Subproject commit 68e89f85a1a9ea0cd9140ebe8c31ecd0583b0a3a

View File

@ -9,8 +9,10 @@ def write_page(request, rel_path):
def read_attachment(request, rel_path): def read_attachment(request, rel_path):
return read_page(request, rel_path) # TODO: /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
return True
def modify_attachment(request, rel_path): def modify_attachment(request, rel_path):
return write_page(request, rel_path) # TODO: /!\ rel_path is the filsystem rel_path - caused by the flat folder structure /!\
return request.user.is_authenticated and request.user.username in ['root', 'dirk']

View File

@ -31,7 +31,6 @@ def context_adaption(context, request, **kwargs):
context.set_additional_title(kwargs.pop('title')) context.set_additional_title(kwargs.pop('title'))
except KeyError: except KeyError:
pass # no title in kwargs pass # no title in kwargs
menubar_users(context[context.MENUBAR], request)
menubar(context, request, caller_name, **kwargs) menubar(context, request, caller_name, **kwargs)
actionbar(context, request, caller_name, **kwargs) actionbar(context, request, caller_name, **kwargs)
navigationbar(context, request, caller_name, **kwargs) navigationbar(context, request, caller_name, **kwargs)
@ -74,6 +73,7 @@ def navigation_entry_parameters(request, path):
def menubar(context, request, caller_name, **kwargs): def menubar(context, request, caller_name, **kwargs):
bar = context[context.MENUBAR] bar = context[context.MENUBAR]
menubar_users(bar, request)
add_help_menu(request, bar) add_help_menu(request, bar)
finalise_bar(request, bar) finalise_bar(request, bar)

View File

@ -1,5 +1,9 @@
from django.conf import settings from django.conf import settings
# TODO: PRIO: BugFix if subpages filter is used without parameters
# TODO: PRIO: Add wildcards for subpages filter
# TODO: Add whoosh and search
import fstools import fstools
from pages import messages from pages import messages
import mycreole import mycreole
@ -69,7 +73,7 @@ class creol_page(object):
macros = { macros = {
"subpages": self.macro_subpages "subpages": self.macro_subpages
} }
return mycreole.render(request, txt, self.attachment_path, "next_anchor", macros=macros) return mycreole.render(request, txt, self.attachment_path, macros=macros)
def macro_subpages(self, *args, **kwargs): def macro_subpages(self, *args, **kwargs):
def parse_depth(s: str): def parse_depth(s: str):