{% for team in data %}
#{{ (pagination.page - 1) * pagination.per_page + loop.index }}

🏢 {{ team.name|escape }}

{% if team.relationship == 'personal' %} PERSONAL {% elif team.relationship == 'owner' %} OWNER {% elif team.relationship == 'member' %} MEMBER {% elif team.relationship == 'public' %} CAN JOIN {% else %} {% if team.is_active %} ACTIVE {% else %} INACTIVE {% endif %} {% endif %} {{ team.visibility|upper }} {{ team.member_count|default(0) }} members

{% if team.relationship == 'personal' %} Your personal team • Private workspace {% elif team.relationship == 'owner' %} You own this team {% elif team.relationship == 'member' %} You are a member • Owner: {{ team.created_by|default('Unknown') }} {% elif team.relationship == 'public' %} Public team • Owner: {{ team.created_by|default('Unknown') }} {% else %} {{ (team.description | decode_html)|truncate(80) if team.description else "No description" }} {% endif %}

{% if team.relationship == 'personal' %} Personal workspace - no actions available {% elif team.relationship == 'owner' %} {% if team.visibility == 'public' %} {% endif %} {% elif team.relationship == 'member' %} {% elif team.relationship == 'public' %} {% if team.pending_request %} ⏳ Requested to Join {% else %} {% endif %} {% else %} {% endif %}
{% endfor %} {% if not data %}

No teams found. Create your first team using the button above.

{% endif %}
{% set base_url = root_path + '/admin/teams/partial' %} {% set hx_target = '#unified-teams-list' %} {% set hx_swap = 'outerHTML' %} {% set hx_indicator = '#teams-loading' %} {% set table_name = 'teams' %} {# Use query_params from context, default to empty dict if not provided #} {% if query_params is not defined %}{% set query_params = {} %}{% endif %} {% include 'pagination_controls.html' %}