summaryrefslogtreecommitdiff
path: root/design/templates/details/sighting.html
blob: 1af2433ddc6e835b8af7152dc422356a67be5707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% extends 'base.html' %}
{% load typogrify_tags %}
{% block extrahead %}
<style>
#detail-map-canvas { height: 100%;}
</style>
{% endblock %}
{% block bodyid %}class="detail"{%endblock%}
{% block primary %}
<ul class="bl" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
        <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> &rarr; </li>
        <li><a href="{% url 'sightings:list' %}" title="See all" itemprop="url"><span itemprop="title">Dialogues</span></a></li>
    </ul>

<main>
<article>
<h1>{{object.common_name}}</h1>
<h2 class="sci">{{object.scientific_name}}</h2>
<h3 class="sci">Family {{object.apclass.scientific_name}} ({{object.apclass}})</h3>
            {{object.body_html|safe|smartypants|widont}}
{%if recording %}
<div class="audio-figure">
<audio autoplay="autoplay" controls="controls">  
    <source src="/media/{{recording.audio}}" />  
</audio> 
<small>Audio recorded by {{recording.recorder}} on {{recording.pub_date|date:"F j, Y"}} in {{recording.location}}. <a href="{{recording.link}}">&copy; {{recording.copyright}}</a></small>
</div>
{%endif%}
<div class="entry-footer" id="endnode">
    <aside id="locations">
        <h5>Seen at</h5>
        <ul>{%for sight in sighting %}
            <li><a href="{{sight.location.get_absolute_url}}">{{sight.location}}</a>, {{sight.location.comma_name}}, {{sight.pub_date|date:"M Y"}}</li>
        {%endfor%}</ul>
    </aside>
</div>
</article>
</main>
{% endblock %}

{% block js %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.js"></script>
<script type="text/javascript">
sightings = [];
{% for s in sighting %}
sightings.push(['{{s.latitude}}', '{{s.longitude}}']);
{% endfor %}
window.onload = function() {
    createBirdMap({% for s in sighting %}{% if forloop.first %}{{s.latitude}},{{s.longitude}}{%endif%}{%endfor%}, 5, { type:'point', lat:'{{sighting.latitude}}', lon:'{{sighting.longitude}}'}, sightings); return false;
}
</script>
{% endblock %}