{# Extends the base layout template #} {% extends "base.html" %} {# --- Page Title Block --- #} {% block title %}{{ super() }} - Configure Permissions: {{ server_name }}{% endblock %} {# --- Head Scripts Block --- #} {# Include JavaScript files needed for this page #} {% block head_scripts %} {# Core utilities #} {# Contains savePermissions function and potentially toggle logic #} {% endblock %} {# --- Main Content Block --- #} {% block content %} {# Main heading for the page #}

Configure Player Permissions

{# Display server context and installation step if applicable #}

Server: {{ server_name }} {% if new_install %} {# Indicator for multi-step installation workflow #}
(Step 3 of 4 for New Installation) {% endif %}

{# --- Status Message Area --- #} {# Targeted by JavaScript (showStatusMessage) for general feedback #}
{# --- Validation Error Area --- #} {# Targeted by JavaScript for displaying overall validation errors from API #} {# Server-side flash messages (handled by base.html) #} {# Section containing the permissions table and actions #}

Set the permission level for each known player found in the global player list or existing permissions file.

{# **Crucial wrapper for table responsiveness** #}
{# Use standard table style #} {# Use scope="col" for table header accessibility #} {# Give level column min-width #} {# Loop through players passed from the route #} {% if players %} {% for player in players %} {# Add data-label for potential CSS stacking on mobile #} {% endfor %} {% else %} {# Displayed if the players list passed from the route is empty #} {# Using CSS classes from tables.css for consistent styling #} {# Re-use class name, style applies #} {% endif %}
Player Name XUID Permission Level
{{ player.name | default('N/A') }} {{ player.xuid | default('N/A') }} {# Dropdown select for permission level #} {# Name attribute is the player's XUID - JS reads this #} {# data-xuid is also set for easier selection in JS #} {# Placeholder for potential inline validation errors from API response #}
{# Span all columns #} No players found in global list or permissions file. Cannot set permissions.
{# --- End of .table-responsive-wrapper --- #} {# --- Form Actions / Navigation --- #}
{# Save button - disabled if no players are loaded #} {# Calls savePermissions JS function onClick #} {# Passes 'this' button, server_name, and boolean new_install flag #} {# Conditional navigation link based on install workflow #} {% if new_install %} {# Link to the next step (Service Configuration) #} Skip & Go to Service Config » {% else %} {# Standard navigation back to dashboard #} « Back to Dashboard {% endif %}
{# --- End of .permissions-config-section --- #} {% endblock %} {# --- Optional Body Scripts Block --- #} {% block body_scripts %} {# #} {% endblock %}