Bladeren bron

Moved navigationbar path adaption to pages

master
Dirk Alders 3 maanden geleden
bovenliggende
commit
a5a3b8626e
2 gewijzigde bestanden met toevoegingen van 9 en 2 verwijderingen
  1. 1
    1
      mycreole
  2. 8
    1
      pages/context.py

+ 1
- 1
mycreole

@@ -1 +1 @@
1
-Subproject commit 68e89f85a1a9ea0cd9140ebe8c31ecd0583b0a3a
1
+Subproject commit e093c48e91aa378ac87bb32e90bc391a81024acb

+ 8
- 1
pages/context.py Bestand weergeven

@@ -41,7 +41,14 @@ def context_adaption(context, request, **kwargs):
41 41
 
42 42
 def navigationbar(context, request, caller_name, **kwargs):
43 43
     bar = context[context.NAVIGATIONBAR]
44
-    path = kwargs.get("rel_path", "")
44
+    if caller_name == "mycreole-attachments":
45
+        next = kwargs.get("next")
46
+        if next.count("/") >= 2:
47
+            path = next[next.find("/", 2) + 1:]
48
+        else:
49
+            path = ""
50
+    else:
51
+        path = kwargs.get("rel_path", "")
45 52
     while len(path) > 0 and path != os.path.sep:
46 53
         bar.append_entry(*navigation_entry_parameters(request, path))
47 54
         path = os.path.dirname(path)

Laden…
Annuleren
Opslaan