瀏覽代碼

Moved navigationbar path adaption to pages

master
Dirk Alders 3 月之前
父節點
當前提交
a5a3b8626e
共有 2 個文件被更改,包括 9 次插入2 次删除
  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 查看文件

@@ -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)

Loading…
取消
儲存