Bladeren bron

Minor changes, fixes and todos added

master
Dirk Alders 2 maanden geleden
bovenliggende
commit
36071e4de0
4 gewijzigde bestanden met toevoegingen van 11 en 5 verwijderingen
  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 +1 @@
1
-Subproject commit 2abea3c4aec4716a2609828faddcd6b6e4c7728e
1
+Subproject commit 68e89f85a1a9ea0cd9140ebe8c31ecd0583b0a3a

+ 4
- 2
pages/access.py Bestand weergeven

@@ -9,8 +9,10 @@ def write_page(request, rel_path):
9 9
 
10 10
 
11 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 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 Bestand weergeven

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

+ 5
- 1
pages/page.py Bestand weergeven

@@ -1,5 +1,9 @@
1 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 7
 import fstools
4 8
 from pages import messages
5 9
 import mycreole
@@ -69,7 +73,7 @@ class creol_page(object):
69 73
         macros = {
70 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 78
     def macro_subpages(self, *args, **kwargs):
75 79
         def parse_depth(s: str):

Laden…
Annuleren
Opslaan