25 lines
1.0 KiB
Django/Jinja
25 lines
1.0 KiB
Django/Jinja
{# author: Marius Hofmann #}
|
|
|
|
{% macro get_sidebar(realms, realm=None) -%}
|
|
{# <div class="col-2 col-xl-3 sidebar">#}
|
|
<div class="bg-light border-right sidebar-wrapper">
|
|
<h2 class="sidebar-heading">Realms</h2>
|
|
<div class="list-group list-group-flush">
|
|
<a href="#" class="list-group-item list-group-item-action bg-light">Dashboard</a>
|
|
{% for realm_item in realms %}
|
|
<a href="{{ url('realm-detail', args=[realm_item.id]) }}">{{ realm_item.name }}</a>
|
|
{# {% if request.user.is_superuser %}#}
|
|
{# <a href="{{ url('realm-delete', args=[realm_item.id]) }}">Delete</a>#}
|
|
{# {% endif %}#}
|
|
{% endfor %}
|
|
{% if realm %}
|
|
<h2>{{ realm.name }}</h2>
|
|
{# <a href="{{ }}">Users</a>#}
|
|
{# <a href="{{ }}">Groups</a>#}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{# </div>#}
|
|
{% endmacro %}
|
|
|