{% extends "_frame.html" %}
{% block title -%}
Remote Party Finder
{%- endblock %}
{% block head %}
{% endblock %}
{% block body %}
{% for container in containers %}
{% let listing = container.listing.borrow() %}
{% let duty_class %}
{% if listing.is_cross_world() %}
{% let duty_class = " cross" %}
{% else %}
{% let duty_class = " local" %}
{% endif %}
{{ listing.duty_name() }}
{%- let desc = listing.description.full_text() %}
{%- if desc.is_empty() -%}
None
{%- else -%}
{{ desc }}
{%- endif -%}
{% for slot in listing.slots() %}
{% let filled %}
{% let title %}
{% let role_class %}
{% match slot %}
{% when Ok with (slot) %}
{% let filled = " filled" %}
{% match slot.role() %}
{% when Some with (role) %}
{% let role_class = " {}"|format(role.as_str().to_lowercase()) %}
{% when None %}
{% let role_class = "".to_string() %}
{% endmatch %}
{% let title = slot.code().to_string() %}
{% when Err with (tuple) %}
{% let filled = "" %}
{% let title = tuple.1.clone() %}
{% let role_class = " {}"|format(tuple.0) %}
{% endmatch %}