1. Alex Ulianytskyi
  2. botanic_apartments

Source

botanic_apartments / templates / partials / apartment.html

{% load i18n %}
<div class="apartment-widget ui-widget ui-corner-all">
    {% if wizard %}
    <a href="{% url admin:wizard:apartment:select street_id=street.id, building_id=building.id, id=apartment.id %}">{{ apartment }}</a>
    <ul class="object-tools">
        <li><a class="action" href="{% url admin:wizard:apartment:edit street_id=street.id, building_id=building.id, id=apartment.id %}">{% trans 'edit' %}</a></li>
    </ul>
    {% else %}
    <div class="apartment-thumb">{% include 'partials/apartment_thumb.html' %}</div>
    <div class="apartment-field">
        <a href="{{ apartment.get_absolute_url }}">{{ apartment.building|capfirst }}</a>
        <p class="apartment_value">ID {{ apartment.code }}</p>
        <!-- p class="apartment_value">{% blocktrans count apartment.rooms as rooms %}one room{% plural %}{{ rooms }} rooms{% endblocktrans %}</p -->
        <p class="apartment_value">{{ apartment.description_any|default_if_none:""|truncatewords:10 }}</p>
        <p class="apartment_value">
        {% trans 'Price per day'%}:
        {% ifequal currency 'usd' %}
            <span class="apartment-value">{{ apartment.price_usd|default_if_none:"??" }}$</span>
        {% endifequal %}
        {% ifequal currency 'euro' %}
            <span class="apartment-value">{{ apartment.price_euro|default_if_none:"??" }}&euro;</span>
        {% endifequal %}
        {% ifequal currency 'uah' %}
            <span class="apartment-value">{{ apartment.price_uah|default_if_none:"??" }} грн.<!--&#8372;--></span>
        {% endifequal %}
        {% ifequal currency 'rur' %}
            <span class="apartment-value">{{ apartment.price_rur|default_if_none:"??" }} руб.</span>
        {% endifequal %}
        </p>
    </div>
    {% endif %}
</div>