{% extends "base.html" %}

{% block head_extras %}
<link rel="stylesheet" href="{{ settings.root_path }}/portal-table.css">
<script type="module" src="{{ settings.root_path }}/js_dist/table-viewer.webc.mjs"></script>
<script type="module" src="{{ settings.root_path }}/js_dist/filter-menu.webc.mjs"></script>
{% endblock %}

{% block main %}
<div class="page-grid">
  <div class="page-grid__toolbar">
    <div class="page-grid__toolbar-utilities">
      <a class="button button--secondary" href="settings" role="button">
        Portal Settings
      </a>
      <filter-menu
        identifier-hints="{{ attr_names | json }}"
        initial-value="{{ filter | json }}"
      ></filter-menu>
    </div>
    {% include "toolbar_user.html" %}
  </div>
  <div class="page-grid__sidebar">
    <div style="padding: 1rem;">
      {{ navbar | safe }}
    </div>
  </div>
  <main class="page-grid__main">
    <table-viewer
      columns="{{ columns | json }}"
      {%- if subfilter_str != "" %}
      subfilter="{{ subfilter_str }}"
      {% endif -%}
    ></table-viewer>
  </main>
</div>
{% endblock %}
