Updated breadcrumbs interface and base adapters
authorThierry Florac <tflorac@ulthar.net>
Wed, 12 Sep 2018 16:42:47 +0200
changeset 401 5220ef7b83d6
parent 400 05770515a7d7
child 402 1a528021075b
Updated breadcrumbs interface and base adapters
src/pyams_skin/interfaces/viewlet.py
src/pyams_skin/viewlet/breadcrumb/__init__.py
--- a/src/pyams_skin/interfaces/viewlet.py	Wed Sep 12 15:45:27 2018 +0200
+++ b/src/pyams_skin/interfaces/viewlet.py	Wed Sep 12 16:42:47 2018 +0200
@@ -224,8 +224,7 @@
 
     label = TextLine(title="Item label")
 
-    view_name = TextLine(title="Link view name",
-                         default='admin')
+    view_name = TextLine(title="Link view name")
 
     css_class = TextLine(title="CSS class")
 
--- a/src/pyams_skin/viewlet/breadcrumb/__init__.py	Wed Sep 12 15:45:27 2018 +0200
+++ b/src/pyams_skin/viewlet/breadcrumb/__init__.py	Wed Sep 12 16:42:47 2018 +0200
@@ -42,6 +42,12 @@
         return absolute_url(self.context, self.request, self.view_name)
 
 
+class BreadcrumbAdminLayerItem(BreadcrumbItem):
+    """Breadcrumb item for admin layer"""
+
+    view_name = 'admin'
+
+
 @contentprovider_config(name='pyams.breadcrumbs', layer=IPyAMSLayer, view=Interface)
 @template_config(template='breadcrumbs.pt', layer=IPyAMSLayer)
 class BreadcrumbsContentProvider(ViewContentProvider):