diff --git a/ordr2/resources/__init__.py b/ordr2/resources/__init__.py index b1455e3..784869c 100644 --- a/ordr2/resources/__init__.py +++ b/ordr2/resources/__init__.py @@ -31,6 +31,9 @@ class BaseResource(object): __name__ = None __parent__ = None + #: name of the main nav_section for template highlighting + nav_section = None + #: dict to match the next url path segment nodes = {} @@ -66,6 +69,8 @@ class RootResource(BaseResource): pyramid.request.Request ''' + nav_section = 'root' + def __init__(self, request): ''' Create the root resource ''' self.__name__ = None diff --git a/ordr2/templates/layout.jinja2 b/ordr2/templates/layout.jinja2 index 735149d..795c4b0 100644 --- a/ordr2/templates/layout.jinja2 +++ b/ordr2/templates/layout.jinja2 @@ -26,27 +26,39 @@ ordr - - + {% if request.user %} + - - + + + + + + {% else %} + + + + + {% endif %}