Source

ratemyflight / ratemyflight / project_template / templates / index.html

Full commit
{% extends "base.html" %}


{% block extra_head %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/map_base.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/layout.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/map_tips.js"></script>


<script type="text/javascript">
    //window.onload = loadGMapScript;
    $(window).load(function() {
        loadGMapScript();
    });
</script>
{% endblock %}


{% block main %}

<div id="map_holder">
	<div id="map_canvas"></div>
	<div id="form_rater">
	    <a class="close" href="#" onclick="$(this).parent().hide(); return false;">X</a>
		<h2>Rate a flight</h2>
		<form method="post" class="rate">
			<table>{{ form.as_table }}</table>
			<input type="submit" value="Rate it" />
		</form>
	</div>
</div>

<!--<div id="search_bar">
	<h2>Change the view</h2>
</div>-->

<div id="rankings">
<ul>
    <li><img src="{{ MEDIA_URL }}img/icon-plane.gif" alt="" class="ranking-icon" /><h3>Top Airlines</h3></li>
    {% for airline in top_airlines %}
    <li>{{forloop.counter}}. {{ airline.name }} [Rating: {{ airline.rating }}]</li>
    {% endfor %}
</ul>
<ul>
    <li><img src="{{ MEDIA_URL }}img/icon-star.gif" alt="" class="ranking-icon" /><h3>Top Destinations</h3></li>
    {% for airport in top_destinations %}
    <li>{{forloop.counter}}. {{ airport.name }} [Rating: {{ airport.rating }}]</li>
    {% endfor %}
</ul>
<ul class="last">
    <li><img src="{{ MEDIA_URL }}img/icon-thumbup.gif" alt="" class="ranking-icon" /><h3>Top Fliers</h3></li>
    {% for flyer in top_flyers %}
    <li><img src="{{ flyer.avatar_url|default:"/site_media/img/default_avatar.png" }}" class="topflyer-avatar" />{{ flyer.name }} [Flights: {{ flyer.flights }}]</li>
    {% endfor %}
</ul>
<br clear="all" />
</div>
{% endblock %}