{# Macros to show the page navigation URLs. Ideally we'd somehow highlight the current location, but this is good enough for now: #} {% macro display_nav() -%} {# First - login OR logout link: #} {% if identity is none %} {{ h.link_to('Login', '/auth/login', class='login') }} {% else %} {{ h.link_to('Logout', '/auth/logout', class='login') }} {# Then the user portal link: #} {{ h.link_to(identity['user'].name, '/me', class='portal') }} {# User is logged in. If they're an admin, show the admin links: #} {% if h.has_site_role(h.USER_ADMIN) %} {{ h.link_to('Manage Users', '/a/person/index') }} {%endif%} {% if h.has_site_role(h.PROJECT_ADMIN) %} {{ h.link_to('Manage Projects', '/a/project/manage') }} {% endif %} {% endif %} {%- endmacro %}