annotate gpp/templates/membermap/index.html @ 46:0140ff687d49

Membermap bug: in the signal handler, if the user isn't on the map, just bail out.
author Brian Neal <bgneal@gmail.com>
date Sat, 20 Jun 2009 03:23:54 +0000
parents f408971657b9
children 7f199c85a07c
rev   line source
gremmie@1 1 {% extends 'base.html' %}
gremmie@1 2 {% block title %}Member Map{% endblock %}
gremmie@1 3 {% block custom_js %}
gremmie@1 4 <script type="text/javascript" src="{{ MEDIA_URL }}js/membermap.js"></script>
gremmie@1 5 <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAql_1Xw9MGW3mOxzo8gLb3hStsp1UIpjYO7Py4hlJXjRzAdyQtBTt5uM4QCgXtTKcuwba8HA9TL9LgQ" type="text/javascript"></script>
gremmie@1 6 {{ form.media }}
gremmie@1 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/membermap.css" />
gremmie@1 8 <script type="text/javascript">
gremmie@1 9 //<![CDATA[
gremmie@1 10 var mmapUser = {
gremmie@1 11 {% if user.is_authenticated %}
gremmie@1 12 userName : "{{ user.username }}",
gremmie@1 13 userId : "{{ user.id }}"
gremmie@1 14 {% else %}
gremmie@1 15 userName : null,
gremmie@1 16 userId : null
gremmie@1 17 {% endif %}
gremmie@1 18 };
gremmie@1 19 //]]>
gremmie@1 20 </script>
gremmie@1 21 {% endblock %}
gremmie@1 22 {% block content %}
gremmie@1 23 <h2>Member Map</h2>
gremmie@1 24 <div id="member_map_main">
gremmie@1 25 {% if user.is_authenticated %}
gremmie@1 26 <div id="member_map_top">
gremmie@1 27 Members on the map: <span id="member_map_count">0</span> &bull; Recent updates:
gremmie@1 28 <select id="member_map_recent"><option value="0" selected="selected">(select)</option></select>
gremmie@1 29 </div>
gremmie@1 30 {% endif %}
gremmie@1 31 <div>
gremmie@1 32 {% if user.is_authenticated %}
gremmie@1 33 <div id="member_map_members_column">
gremmie@1 34 Members:<br />
gremmie@1 35 <select id="member_map_members" multiple="multiple">
gremmie@1 36 </select>
gremmie@1 37 </div>
gremmie@1 38 {% endif %}
gremmie@1 39 <div id="member_map_map">
gremmie@1 40 </div>
gremmie@1 41 </div>
gremmie@1 42 <div id="member_map_info">
gremmie@1 43 {% if user.is_authenticated %}
gremmie@1 44 <p id="member_map_directions"></p>
gremmie@1 45 <p>
gremmie@1 46 The location you enter below will not be shown to others, but can be determined from the map.
gremmie@1 47 For privacy reasons, we don't recommend you enter your exact address. Use a nearby intersection,
gremmie@1 48 landmark, or just keep it city and state.
gremmie@1 49 </p>
gremmie@1 50 <p>
gremmie@1 51 Example locations:
gremmie@1 52 </p>
gremmie@1 53 <ul>
gremmie@1 54 <li>3rd and Main, Chicago, IL</li>
gremmie@1 55 <li>Tucson, Arizona</li>
gremmie@1 56 <li>Rome, Italy</li>
gremmie@1 57 <li>5018EA, Tilburg, Netherlands</li>
gremmie@1 58 </ul>
gremmie@1 59 <form action="" method="post">
gremmie@1 60 {{ form.as_p }}
gremmie@1 61 <p>
gremmie@1 62 <input type="submit" id="member_map_submit" name="submit" value="Submit" />
gremmie@1 63 <input type="submit" id="member_map_delete" name="delete" value="Delete" />
gremmie@1 64 </p>
gremmie@1 65 </form>
gremmie@1 66 {% else %}
gremmie@1 67 <p>
gremmie@1 68 The member map allows members to place themselves on a google map along with a short message.
gremmie@1 69 This feature is only for registered users of SurfGuitar101.com. Please
gremmie@1 70 <a href="{% url accounts-login %}">login</a> or
gremmie@1 71 <a href="{% url accounts-register %}">register</a> to use the member map.
gremmie@1 72 </p>
gremmie@1 73 {% endif %}
gremmie@1 74 </div>
gremmie@1 75 </div>
gremmie@1 76 {% endblock %}