<div id="data-list">
{% if rooms %}
    <div class="row">
        <div class="col col-2 text-center">名称/号室/賃料</div>
        <div class="col col-5 text-center">住所/最寄駅</div>
        <div class="col col-5 text-center">その他</div>
    </div>
{% for item in rooms %}
    <div class="row">
        <div class="col col-2">
            <div>
                {% if item.building.management_type %}<span class="small">【{{ item.building.management_type.name }}】</span>{% endif %}
                {% if item.building.build_year > 0 %}<span class="small">{{ item.building.build_year }}年築</span>{% endif %}
            </div>
            <div><a href="{% url 'property_building' item.building.oid %}" target="_blank" rel="noopener noreferrer">{{ item.building.building_name | default_if_none:''}}</a></div>
            <div class="text-center">
                <a href="{% url 'property_room' item.oid %}" class="btn btn-sm btn-outline-primary" target="_blank" rel="noopener noreferrer">{{ item.room_no | default_if_none:''}}号室</a>
            </div>
        </div>
        <div class="col col-5">
            <div class="small">{{ item.building.address }}</div>
            {% if item.building.nearest_station1 %}<div class="small">{{ item.building.nearest_station1 }}</div>{% endif %}
            {% if item.building.nearest_station2 %}<div class="small">{{ item.building.nearest_station2 }}</div>{% endif %}
            {% if item.building.nearest_station3 %}<div class="small">{{ item.building.nearest_station3 }}</div>{% endif %}
        </div>
        <div class="col col-5">
            <div>
                <span class="small">賃料:{{ item.rent_text | default_if_none:'---' }}</span>
                {% if item.room_status %}<span class="small">【{{ item.room_status.name }}】</span>{% endif %}
                {% if item.rental_type %}<span class="small">【{{ item.rental_type.name }}】</span>{% endif %}
                {% if item.condo_management_text %}<span class="small">【{{ item.condo_management_text }}】</span>{% endif %}
            </div>
            <div>
                <span class="small">間取り:{{ item.layout_type.name | default_if_none:'---' }}</span>
                {% if item.building.is_hidden_vacancy %}<span class="small">空室:建物非掲載</span>{% endif %}
                {% if item.building.is_vacancy_recommend %}<span class="small">空室:建物おすすめ</span>{% endif %}
                {% if item.building.is_hidden_web %}<span class="small">WEB:建物非掲載</span>{% endif %}
                {% if not item.is_publish_vacancy %}<span class="small">空室:部屋非掲載</span>{% endif %}
                {% if not item.is_publish_web %}<span class="small">WEB:部屋非掲載</span>{% endif %}
                <span class="small">閲覧:{{ item.room_auth_level.name | default_if_none:'---' }}</span>
            </div>
            <div>
                <span class="small">{{ condo_fees_name }}:{{ item.condo_fees_text | default_if_none:'---' }}</span>
                {% if item.deposit_text1 %}<span class="small">{{ item.deposit_text1 }}</span>{% endif %}
                {% if item.deposit_text2 %}<span class="small">{{ item.deposit_text2 }}</span>{% endif %}
                {% if item.key_money_text1 %}<span class="small">{{ item.key_money_text1 }}</span>{% endif %}
                {% if item.key_money_text2 %}<span class="small">{{ item.key_money_text2 }}</span>{% endif %}
            </div>
            <div>
                <span class="small">駐車場:{{ item.building.garage_type.name | default_if_none:'---' }}</span>
                <span class="small">駐輪場:{{ item.building.bike_parking_type.name | default_if_none:'---' }}</span>
            </div>
        </div>
    </div>
{% endfor %}
{% else %}
    <p>該当する建物はありません。</p>
{% endif %}
</div>
