app/soc/templates/soc/role/edit.html
author Mario Ferraro <fadinlight@gmail.com>
Sun, 15 Nov 2009 22:12:20 +0100
changeset 3093 d1be59b6b627
parent 2939 415a7c2866fd
permissions -rw-r--r--
GMaps related JS changed to use new google namespace. Google is going to change permanently in the future the way to load its services, so better stay safe. Also this commit shows uses of the new melange.js module. Fixes Issue 634.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 %}
3093
d1be59b6b627 GMaps related JS changed to use new google namespace.
Mario Ferraro <fadinlight@gmail.com>
parents: 2939
diff changeset
    20
	<script src="http://www.google.com/jsapi?key={{ gmaps_api_key }}" type="text/javascript"></script>
d1be59b6b627 GMaps related JS changed to use new google namespace.
Mario Ferraro <fadinlight@gmail.com>
parents: 2939
diff changeset
    21
	<script type="text/javascript" src="/soc/content/js/templates/soc/role/edit-091027.js"></script>
1152
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 %}
3093
d1be59b6b627 GMaps related JS changed to use new google namespace.
Mario Ferraro <fadinlight@gmail.com>
parents: 2939
diff changeset
    26
{{ block.super }}
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    27
{% endblock %}
1359
582661519e5d Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1358
diff changeset
    28
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    29
{% block instructions %}
1359
582661519e5d Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1358
diff changeset
    30
{{ block.super }}
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    31
{% if not gmaps_api_key %}
1455
623858110d93 Added a link to "Site Settings" for the GMaps API Key missing msg
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1359
diff changeset
    32
<br /><span class="error">Google Maps API key not present.
623858110d93 Added a link to "Site Settings" for the GMaps API Key missing msg
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1359
diff changeset
    33
Please insert your key in <a href="/site/edit">Site Settings</a>, Google Maps field.
623858110d93 Added a link to "Site Settings" for the GMaps API Key missing msg
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1359
diff changeset
    34
</span>
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    35
{% endif %}
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    36
{% endblock %}
1359
582661519e5d Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1358
diff changeset
    37
582661519e5d Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1358
diff changeset
    38
{% block form_table %}
582661519e5d Refactor various django templates to reuse other templates where possible
Sverre Rabbelier <srabbelier@gmail.com>
parents: 1358
diff changeset
    39
{{ block.super }}
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    40
    {% if gmaps_api_key %}
2698
5783338b2c8d Edited the role form to clarify the intention of the checkbox+marker.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2697
diff changeset
    41
    <tr title="My Location">
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    42
      <td class="formfieldlabel">
2698
5783338b2c8d Edited the role form to clarify the intention of the checkbox+marker.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2697
diff changeset
    43
        <label for="id_location">Public Location:</label>
1152
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    44
      </td>
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    45
      <td>
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    46
        <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
    47
      </td>
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    48
      <td></td>
2698
5783338b2c8d Edited the role form to clarify the intention of the checkbox+marker.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2697
diff changeset
    49
      <td>Drag the marker to the location you want to be displayed</td>
1152
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
    </tr>
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    52
    {% endif %}
b82caf7bb17c Add Google Maps integration for Role profiles create/edit views.
Pawel Solyga <Pawel.Solyga@gmail.com>
parents:
diff changeset
    53
{% endblock %}