rentalerts / rentalerts / apps / apartments / templates / apartments / apartment_detail.html

{% extends "base.html" %}

{% block content %}
    {% if not apartment.is_available %}
    <div class="alert alert-error">
        Sorry, this apartment is no longer available.
    </div>
    {% endif %}

<div class="row">
    <div class="span4">
        <h2>{{ apartment.area }}, {{ apartment.area.city }}</h2>
    </div>
    <div class="span8">

        <div class="btn-toolbar">
            {% if is_editable %}
            <div class="btn-group">
                <a class="btn" href="{% url apartments:edit apartment.id %}">Edit details</a>
            </div>
            <div class="btn-group">
                {% if apartment.is_available %}
                <a class="btn" href="{% url apartments:remove apartment.id %}">Remove this apartment</a>
                {% else %}
                <a class="btn" href="{% url apartments:add apartment.id %}">Add this apartment</a>
                {% endif %}
            </div>
            {% endif %}
            {% if not is_owner %}
            <div class="btn-group">
                {% if bookmark %}
                <a onclick="return confirm('Are you sure you want to delete this bookmark?');" class="btn" href="{% url bookmarks:delete bookmark.id %}">Delete bookmark</a>
                {% elif apartment.is_available %}
                <a class="btn" href="{% url bookmarks:create apartment.id %}">Bookmark this apartment</a>
                {% endif %}
            </div>
            <div class="btn-group">
                <a class="btn" href="{% url pm:create apartment.id %}">Contact the occupant</a>
            </div>
            {% endif %}
        </div>

    </div>
</div>

<h3>
    {{ apartment.get_full_address }}
</h3>

{% if apartment.description %}
<div>
    <p>{{ apartment.description|linebreaksbr }}</p>
</div>
{% endif %}


<div class="row">

    <div class="span4">


        <table class="table table-condensed table-striped">

            <tr>
                <td>Landlord</td>
                <td><strong>
                {% if apartment.is_agency_landlord and apartment.agency %}
                    {% if apartment.agency_website %}
                    <a target="_blank" href="{{ apartment.agency_website }}">{{ apartment.agency }}</a>
                    {% else %}
                    {{ apartment.agency }}
                    {% endif %}
                {% else %}
                {{ apartment.get_landlord_display }}
                {% endif %}
                </strong></td>
            </tr>

            <tr>
                <td>Rooms</td><td><strong>{{ apartment.num_rooms }}{% if apartment.is_shared %} (SHARED){% endif %}</strong></td>
            </tr>

            <tr>
                <td>Area</td><td><strong>{{ apartment.size }} sqm</strong></td>
            </tr>

            <tr>
                <td>Floor</td><td><strong>{{ apartment.floor }}/{{ apartment.num_floors|default:"-" }}{% if not apartment.lift %} NO LIFT {% endif %}</strong></td>
            </tr>

            <tr>
                <td>Available from</td><td><strong>{{ apartment.available_from|date:"d/m/Y" }}{% if apartment.available_to %} - {{ apartment.available_to|date:"d/m/y" }}{% endif %}</strong></td>
            </tr>

            <tr>
                <td>Rent</td><td><strong>{{ apartment.rent_pcm }}&euro; per month</strong></td>
            </tr>

            <tr>
                <td>Deposit</td><td><strong>{% if apartment.deposit %}{{ apartment.deposit }}&euro;{% else %}Not specified{% endif %}</strong></td>
            </tr>


        </table>

        <h3>What's allowed</h3>


        <table class="table table-striped table-bordered table-condensed">
            <tr>
                <td>Smoking</td>
                <td><b>{{ apartment.smoking|yesno|upper }}</b></td>
            </tr>
 
            <tr>
                <td>Pets</td>
                <td><b>{{ apartment.pets|yesno|upper }}</b></td>
            </tr>
 
        </table>

        <h3>Amenities</h3>

        <div class="row">

        <div class="span2">

        <table class="table table-striped table-bordered table-condensed">
            <tr>
                <td>Furnished</td>
                <td><input disabled type="checkbox"{% if apartment.furnished %} checked{% endif %}></td>
            </tr>
 
            <tr>
                <td>Cable</td>
                <td><input disabled type="checkbox"{% if apartment.cable %} checked{% endif %}></td>
            </tr>
        
            <tr>
                <td>Broadband</td>
                <td><input disabled type="checkbox"{% if apartment.broadband %} checked{% endif %}></td>
            </tr>
        
            <tr>
                <td>Satellite</td>
                <td><input disabled type="checkbox"{% if apartment.satellite %} checked{% endif %}></td>
            </tr>

             <tr>
                <td>Balcony</td>
                <td><input disabled type="checkbox"{% if apartment.balcony %} checked{% endif %}></td>
            </tr>
        
        </table>
        
        </div>

        <div class="span2">
        <table class="table table-striped table-bordered table-condensed">

            <tr>
                <td>Free parking</td>
                <td><input disabled type="checkbox"{% if apartment.parking %} checked{% endif %}></td>
            </tr>
        
            <tr>
                <td>Garage</td>
                <td><input disabled type="checkbox"{% if apartment.garage %} checked{% endif %}></td>
            </tr>
        
            <tr>
                <td>Bike storage</td>
                <td><input disabled type="checkbox"{% if apartment.bike_storage %} checked{% endif %}></td>
            </tr>

             <tr>
                <td>Laundry facilities</td>
                <td><input disabled type="checkbox"{% if apartment.laundry %} checked{% endif %}></td>
            </tr>
        
        </table>
 

        </div>
    </div>

    </div>

    <div class="span-8">
        <div id="map"></div>
    </div>

</div>

<div>

    <h3>Other amenities</h3>

    <table class="table table-bordered table-striped">
        
        <tr>
            <td>Sauna</td><td><strong>{{ apartment.get_sauna_display }}</strong</td>
        </tr>

        <tr>
            <td>Kitchen</td><td><strong>{{ apartment.kitchen_amenities }}</strong</td>
        </tr>

        {% if apartment.furnished %}
        <tr>
            <td>Furniture</td><td><strong>{{ apartment.furniture|default:"Not specified" }}</strong</td>
        </tr>
        {% endif %}

        <tr>
            <td>Heating</td><td><strong>{{ apartment.heating|default:"Not specified" }}</strong</td>
        </tr>

        <tr>
            <td>Other</td><td><strong>{{ apartment.other_amenities|default:"Not specified" }}</strong</td>
        </tr>


    </table>
    
</div>

<style>
    #map { height: 300px; width: 760px; }
</style>
<script type="text/javascript" src="{{ STATIC_URL }}bootstrap/js/jquery.js"></script>
  <script type="text/javascript"
      src="http://maps.googleapis.com/maps/api/js?key={{ GOOGLE_API_KEY }}&sensor=false">
    </script>
    <script type="text/javascript">
      function initialize() {
        var location = new google.maps.LatLng({{ apartment.latitude }}, {{ apartment.longitude }});
        var mapOptions = {
          center: location,
          zoom: 12,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map"), mapOptions);
        var marker = new google.maps.Marker({
            position: location
        });
        marker.setMap(map);
      }
        $(document).ready(function(){ initialize(); });

</script>
{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.