Skip to content

Instantly share code, notes, and snippets.

@neuman
Created March 10, 2015 20:29
Show Gist options
  • Save neuman/c087b86914e970be588c to your computer and use it in GitHub Desktop.
Save neuman/c087b86914e970be588c to your computer and use it in GitHub Desktop.
{% extends "base/theme.html" %}
{% block scripts %}
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="{{ STATIC_URL }}theme/js/gmaps.js"></script>
<script src="{{ STATIC_URL }}theme/js/maps.js"></script>
{% endblock %}
{% block maincontent %}
<div class="data-layer">
<ul>
<li class="location-data" data-latitude="{{ location.position.latitude }}" data-longitude="{{ location.position.longitude }}">{{ location.title }}</li>
</ul>
</div>
<div class="header-buffer">
</div>
<!-- Services Section -->
<section id="services">
<div class="container">
<div class="" >
<div id="details">
<div class="col-md-8">
<div class="col-md-8">
<h2>{{ location.title }}</h2>
</div>
<div class="col-md-4 text-right">
<h2>{% include 'base/stars.html' with rating=location.get_average_rating %}</h2>
</div>
</div>
<div class="col-md-8">
<div class="">
<div class="col-md-12" >
<img src="{{ location.get_image_url }}" class="img-responsive img-centered full-width" alt="">
</div>
</div>
<div>
<div class="col-md-12" >{% include 'location/specifics.html' with location=location %}
<div class="col-md-4">
{% if user.is_authenticated %}
<a type="button" href="{% url 'location_update' pk=location.id %}" class="btn btn-default pull-right">Edit</a>
{% endif %}
</div>
</div>
</div>
<div>
<div class="col-md-12">
<p class="">{{ location.description}}</p>
</div>
</div>
</div>
<div class="col-md-4 panel">
<div class="wide-map short-map" id="map"></div>
<div class="col-md-3"></div>
<div class="col-md-6 text-center">
<br>
{% if location.address %}<p>{{ location.address }}</p>{% endif %}
{% if location.phone %}<p>{{ location.phone }}</p>{% endif %}
{% if location.website %}<p><a href="{{ location.website }}">{{ location.website }}</a></p>{% endif %}
</div>
<div class="col-md-3"></div>
</div>
</div>
</div>
<div id="reviews">
<div class="col-md-12">
<hr>
{% if user.is_authenticated %}
{% if user_review %}
<a type="button" href="{% url 'review_update' pk=location.id %}" class="btn btn-default pull-right">Update Review</a>
{% else %}
<a type="button" href="{% url 'review_create' pk=location.id %}" class="btn btn-default pull-right">Add Your Review</a>
{% endif %}
{% endif %}
</div>
<div>
<div class="col-md-8">
{% if user_review %}
{% with user_review as review %}
<div>
{% include 'location/review.html' %}
</div>
{% endwith %}
{% endif %}
{% for review in reviews %}
{% include 'location/review.html' %}
<hr>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment