forked from kartoza/flask_user_map
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbase.html
More file actions
104 lines (91 loc) · 4.42 KB
/
base.html
File metadata and controls
104 lines (91 loc) · 4.42 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<link rel="shortcut icon" href="{{ project_favicon_file }}">
<title>{% block title %}{{ project_name | safe }} User Map{% endblock %}</title>
{% block head_resources %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.css') }}" type="text/css" static="screen, projection"/>
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome-4.1.0/css/font-awesome.min.css') }}" type="text/css" static="screen, projection"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.css') }}"/>
<!--[if lte IE 8]>
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.ie.css') }}"/>
<![endif]-->
<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.label.css') }}"/>
<link rel="stylesheet" href="{{ url_for('static', filename='css/user-map.css') }}" />
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/jquery.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/leaflet.label.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/user-map.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/user-map-component.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/user-map-state.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/user-map-utilities.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ url_for('static', filename='js/validate.js') }}"></script>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<script>
function showCaptcha(element) {
Recaptcha.create(
"{{ config['RECAPTCHA_PUBLIC_KEY'] }}",
element,
{
theme: "custom",
custom_theme_widget: "recaptcha-widget"
}
);
}
</script>
{% endblock head_resources %}
</head>
<body>
{% block body %}
{% endblock %} <!--endblock of body -->
<!-- Map block -->
<div id="map">
</div>
<!--endblock of map -->
<!-- All the templates should go here -->
{{ user_menu_button | safe }}
{{ information_modal | safe }}
{{ data_privacy_content | safe }}
{{ user_form_template | safe }}
<!-- endblock of all the template -->
<script type="text/javascript">
var map, base_map, data_privacy_content, data_privacy_control,
user_menu_control, user_icon, estimated_location_circle, current_mode;
// Set current_mode to default one
current_mode = DEFAULT_MODE;
//Initialize Basemap Layer
base_map = createBasemap();
//Create Map with prepared base_map
map = L.map('map', {
center: [-3, 120],
zoom: 5,
layers: [base_map]
});
// Initialize all icons for marker
var icons = createAllIcons(
'{{ user_icons.user }}',
'{{ user_icons.shadow }}'
);
user_icon = icons.user_icon;
// Create Data Privacy Control
data_privacy_control = createDataPrivacyControl();
map.addControl(new data_privacy_control);
// Create User Menu Control and add some tooltips
user_menu = {
"add-user-menu": '{{ user_menu.add_user }}' === 'True',
"edit-user-menu": '{{ user_menu.edit_user }}' === 'True',
"delete-user-menu": '{{ user_menu.delete_user }}' === 'True',
"download-menu": '{{ user_menu.download }}' === 'True',
"reminder-menu": '{{ user_menu.reminder }}' === 'True'
};
user_menu_control = createUserMenuControl(user_menu);
map.addControl(new user_menu_control);
$(".user-menu-control").tooltip({placement: 'right', container: 'body'});
</script>
{% block js_container %}
{% endblock %} <!--endblock of js_container -->
</body>
</html>