author | Sverre Rabbelier <srabbelier@gmail.com> |
Sun, 15 Feb 2009 20:27:56 +0000 | |
changeset 1359 | 582661519e5d |
parent 1358 | 6be502a1bcc6 |
child 1455 | 623858110d93 |
permissions | -rw-r--r-- |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
1 |
{% extends "soc/models/edit.html" %} |
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
2 |
{% comment %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
3 |
Licensed under the Apache License, Version 2.0 (the "License"); |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
4 |
you may not use this file except in compliance with the License. |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
5 |
You may obtain a copy of the License at |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
6 |
|
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
7 |
http://www.apache.org/licenses/LICENSE-2.0 |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
8 |
|
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
9 |
Unless required by applicable law or agreed to in writing, software |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
10 |
distributed under the License is distributed on an "AS IS" BASIS, |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
12 |
See the License for the specific language governing permissions and |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
13 |
limitations under the License. |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
14 |
{% endcomment %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
15 |
{% load forms_helpers %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
16 |
|
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
17 |
{% block scripts %} |
1358
6be502a1bcc6
Be modular when loading the various JS modules
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1155
diff
changeset
|
18 |
{{ block.super }} |
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
19 |
{% if gmaps_api_key %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
20 |
<script src="http://maps.google.com/maps?file=api&v=2&key={{ gmaps_api_key }}" type="text/javascript"></script> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
21 |
<script type="text/javascript" src="/soc/content/js/map-090201.js"></script> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
22 |
{% endif %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
23 |
{% endblock %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
24 |
|
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
25 |
{% block body_tag %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
26 |
{% if gmaps_api_key %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
27 |
<body onLoad="role_profile_gmap.map_load()" onunload="GUnload()"> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
28 |
{% else %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
29 |
{{ block.super }} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
30 |
{% endif %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
31 |
{% endblock %} |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
32 |
|
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
33 |
{% block instructions %} |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
34 |
{{ block.super }} |
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
35 |
{% if not gmaps_api_key %} |
1155
44dcc941e199
Update error message that shows when Google Maps API key is missing.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
1152
diff
changeset
|
36 |
<br /><span class="error">Google Maps API key not present. Please login as administrator and insert your key in Site Settings, Google Maps field.</span> |
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
37 |
{% endif %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
38 |
{% endblock %} |
1359
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
39 |
|
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
40 |
{% block form_table %} |
582661519e5d
Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents:
1358
diff
changeset
|
41 |
{{ block.super }} |
1152
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
42 |
{% if gmaps_api_key %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
43 |
<tr title="your location"> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
44 |
<td class="formfieldlabel"> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
45 |
<label for="id_location">Location:</label> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
46 |
</td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
47 |
<td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
48 |
<div id="role_profile_map"></div> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
49 |
</td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
50 |
<td></td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
51 |
<td></td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
52 |
<td></td> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
53 |
</tr> |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
54 |
{% endif %} |
b82caf7bb17c
Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff
changeset
|
55 |
{% endblock %} |