{# 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') }} {{ h.link_to(identity['user'].name, '/me', class='portal') }} {# User is logged in. If they're an admin, show the admin links: #} {% if identity['user'].admin %} {{ h.link_to('Manage Users', '/person/index') }} {{ h.link_to('Manage Projects', '/project/index') }} {% endif %} {% endif %} {%- endmacro %}