Browse Source

Minor changes, fixes and todos added

master
Dirk Alders 3 months ago
parent
commit
36071e4de0
4 changed files with 11 additions and 5 deletions
  1. 1
    1
      mycreole
  2. 4
    2
      pages/access.py
  3. 1
    1
      pages/context.py
  4. 5
    1
      pages/page.py

+ 1
- 1
mycreole

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

+ 4
- 2
pages/access.py View File

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

+ 1
- 1
pages/context.py View File

31
         context.set_additional_title(kwargs.pop('title'))
31
         context.set_additional_title(kwargs.pop('title'))
32
     except KeyError:
32
     except KeyError:
33
         pass    # no title in kwargs
33
         pass    # no title in kwargs
34
-    menubar_users(context[context.MENUBAR], request)
35
     menubar(context, request, caller_name, **kwargs)
34
     menubar(context, request, caller_name, **kwargs)
36
     actionbar(context, request, caller_name, **kwargs)
35
     actionbar(context, request, caller_name, **kwargs)
37
     navigationbar(context, request, caller_name, **kwargs)
36
     navigationbar(context, request, caller_name, **kwargs)
74
 
73
 
75
 def menubar(context, request, caller_name, **kwargs):
74
 def menubar(context, request, caller_name, **kwargs):
76
     bar = context[context.MENUBAR]
75
     bar = context[context.MENUBAR]
76
+    menubar_users(bar, request)
77
     add_help_menu(request, bar)
77
     add_help_menu(request, bar)
78
     finalise_bar(request, bar)
78
     finalise_bar(request, bar)
79
 
79
 

+ 5
- 1
pages/page.py View File

1
 from django.conf import settings
1
 from django.conf import settings
2
 
2
 
3
+# TODO: PRIO: BugFix if subpages filter is used without parameters
4
+# TODO: PRIO: Add wildcards for subpages filter
5
+# TODO: Add whoosh and search
6
+
3
 import fstools
7
 import fstools
4
 from pages import messages
8
 from pages import messages
5
 import mycreole
9
 import mycreole
69
         macros = {
73
         macros = {
70
             "subpages": self.macro_subpages
74
             "subpages": self.macro_subpages
71
         }
75
         }
72
-        return mycreole.render(request, txt, self.attachment_path, "next_anchor", macros=macros)
76
+        return mycreole.render(request, txt, self.attachment_path, macros=macros)
73
 
77
 
74
     def macro_subpages(self, *args, **kwargs):
78
     def macro_subpages(self, *args, **kwargs):
75
         def parse_depth(s: str):
79
         def parse_depth(s: str):

Loading…
Cancel
Save