{% extends 'vacancy_mgr/base.html' %}
{% load static %}
{% load humanize %}

    {% block head_title %}賃貸管理業者一覧{% endblock %}
    {% block head %}
        <link rel="stylesheet" href="{% static 'trader/css/style.css' %}">
    {% endblock %}

    {% block page_top %}{% endblock %}

    {% block header %}{% endblock %}

    {% block h1_title %}【賃貸管理業者一覧】{% endblock %}

    {% block contents %}
        <div  id="data-list-header">
            <div class="row">
                <div id="link-add-item" class="col col-6 text-left">
                    <a href="{% url 'trader_create_trader' %}">業者追加</a>
                </div>
                <div id="link-change-list" class="col col-6 text-right">
                {% if all_traders %}
                    <a href="{% url 'trader_trader_list' %}">業者一覧</a>
                {% else %}
                    <a href="{% url 'trader_all_trader_list' %}">全業者一覧</a>
                {% endif %}
                </div>
            </div>
        </div>
        <div id="data-list">
        {% if traders %}
            <div class="row">
                <div class="col col-10 text-center">賃貸管理業者名</div>
                <div class="col col-1 text-center">停止</div>
                <div class="col col-1 text-center">削除</div>
            </div>
            {% for item in traders %}
            <div class="row">
                <div class="col col-10"><a href="{% url 'trader_detail' item.idb64 %}" target="_blank">{{ item.trader_name }}</a></div>
                <div class="col col-1 text-center">{% if item.is_stopped %}×{% else %}－{% endif %}</div>
                <div class="col col-1 text-center">{% if item.is_deleted %}×{% else %}－{% endif %}</div>
            </div>
            {% endfor %}
        {% else %}
            <div class="row">
                <div class="col col-12 text-center">該当する賃貸管理業者はありません。</div>
            </div>
        {% endif %}
        </div>
    {% endblock %}

    {% block footer %}{% endblock %}

    {% block page_bottom %}{% endblock %}
