{% extends "base.html" %}

{% block main %}
<main>
  <h1>Workspaces</h1>
  <form method="post" action="add">
    <button class="button--primary" type="submit">+</button>
  </form>
  <ul>
    {% for workspace_perm in workspace_perms %}
    <li>
      <a href="{{ navigator.workspace_page().workspace_id(*workspace_perm.workspace_id).build()?.get_path() }}">
        {% if workspace_perm.workspace_display_name.is_empty() %}
        [Untitled Workspace]
        {% else %}
        {{ workspace_perm.workspace_display_name }}
        {% endif %}
      </a>
    </li>
    {% endfor %}
  </ul>
</main>
{% endblock %}
