This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
forked from GeoNode/geonode
-
Notifications
You must be signed in to change notification settings - Fork 7
/
mapinfo.html
193 lines (179 loc) · 6.93 KB
/
mapinfo.html
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
{% extends "page_layout.html" %}
{% load i18n %}
{% load geonode_auth %}
{% load dialogos_tags %}
{% load agon_ratings_tags %}
{% block extra_head %}
{% include "geonode/ext_header.html" %}
{% include "geonode/app_header.html" %}
{% include "geonode/geo_header.html" %}
{{ block.super }}
<script type="text/javascript">
var app;
Ext.onReady(function() {
{% has_obj_perm user map "maps.change_map_permissions" as can_change_permissions %}
{% autoescape off %}
var config = Ext.apply({
//useToolbar: false,
proxy: "/proxy/?url=",
rest: "/maps/",
// tell the map viewer where and how to be rendered
portalConfig: {
height: 300,
renderTo: "embedded_map"
}
}, {{ config }});
app = new GeoExplorer.Viewer(config);
{% if can_change_permissions %}
new GeoNode.PermissionsEditor({
levels: {
'admin': 'map_admin',
'readwrite': 'map_readwrite',
'readonly': 'map_readonly',
'_none': '_none'
},
renderTo: "permissions_form",
userLookup: "{% url geonode.views.ajax_lookup %}",
permissions: {{ permissions_json }},
listeners: {
updated: function(perms) {
var submitTo = "{% url geonode.maps.views.ajax_map_permissions map.id %}";
Ext.Ajax.request({ url: submitTo, jsonData: perms.writePermissions() });
}
}
});
var hasThumb = {% if map.get_thumbnail %}true{% else %}false{% endif %};
var thumbURL = "{% url geonode.maps.views.map_controller map.id %}?thumbnail";
{% include "maps/thumbnail_help.js" %}
{% endif %}
{% endautoescape %}
});
</script>
{% endblock %}
{% block start_body_js %}
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
{% endblock %}
{% block main %}
<div class="twocol">
{% overall_rating map "map" as map_rating %}
<h3>{{map.title}}</h3>
<div class="overall_rating" data-rating="{{ map_rating }}"></div>
<h3>{{map.title}}</h3>
<g:plusone size="small" href="http://{{ request.get_host }}{{ request.get_full_path }}"></g:plusone>
<div class="fb-like" data-href="http://{{ request.get_host }}{{ request.get_full_path }}" data-send="false" data-width="50" data-layout="button_count" data-show-faces="false"></div>
<p><strong>{% trans "Abstract:" %}</strong> {{map.abstract}}</p>
<div id="embedded_map">
</div>
<p><strong>{% trans "Contact:" %}</strong> <a href="{{ map.owner.get_profile.get_absolute_url }}">{{ map.owner }}</a></a></p>
<h3>{% trans "Comments" %}</h1>
<div class="comments_container">
{% comments map as comments %}
{% for comment in comments %}
<div class="comment">
<p class="comment_author">{{ comment.author.get_full_name|default:comment.author|capfirst }}</p>
<div class="comment_content">
{{ comment.comment|escape|urlize|safe }} —
<span class="comment_ago">
{% blocktrans with comment.submit_date|timesince as age %}
{{ age }} ago
{% endblocktrans %}
</span>
</div>
</div>
{% endfor %}
{% if request.user.is_authenticated %}
<h3>{% trans "Post a comment" %}</h3>
{% comment_form map as comment_form %}
<form method="POST" action="{% comment_target map %}">
{% csrf_token %}
<div class="comment_box">
{{ comment_form.comment }}
</div>
<div class="comment_post">
<input type="submit" value="{% trans "Submit" %}" />
</div>
<input type="hidden" name="next" value="{{ request.path }}" />
</form>
{% else %}
<p><a href="{% url auth_login %}">{% trans "Login to add a comment" %}</a></p>
{% endif %}
</div>
{% if request.user.is_authenticated %}
<h3>{% trans "Rate this map" %}</h3>
{% user_rating request.user map "map" as user_map_rating %}
<div id="user_rating" class="category-map"></div>
{% endif %}
=======
<h3>Social</h3>
>>>>>>> 8211953377229cb55e9536d85ff7fe01e825ef4f
</div>
{% endblock %}
{% block sidebar %}
<div id="sidebar" class="threecol">
<h3>{% trans "Download" %}</h3>
<p><a href="{% url geonode.maps.views.map_download map.id %}">{% trans "Download all layers included in this map" %}</a></p>
<h3>{% trans "Layers" %}</h3>
<p>{% trans "This map uses the following layers" %} </p>
<ul>
{% for layer in layers %}
{% if not layer.group == "background" %}
<li>{% autoescape off %}{{layer.local_link}}{% endautoescape %}</li>
{% endif %}
{% endfor %}
</ul>
<h3>{% trans "Manage" %}</h3>
<ul>
{% has_obj_perm user map "maps.change_map" as can_change %}
{% has_obj_perm user map "maps.delete_map" as can_delete %}
<li><a href="{% url geonode.maps.views.view map.id %}">{% trans "View or edit this map" %}</a></li>
{% if can_change %}
<li><a href="{% url geonode.maps.views.map_controller map.id %}?describe">{% trans "Edit metadata" %}</a></li>
<li><a id="set_thumbnail" href="{% url geonode.maps.views.map_controller map.id %}?thumbnail">{% trans "Set thumbnail" %}</a></li>
{% endif %}
{% if can_change_permissions %}
<li><a href="{% url edit_map_permissions map.id %}">{% trans "Edit permissions" %}</a></li>
{% endif %}
{% if can_delete %}
<li><a href="{% url geonode.maps.views.map_controller map.id %}?remove">{% trans "Delete map" %}</a></li>
{% endif %}
<li><a href="{% url geonode.maps.views.newmap %}?copy={{map.id}}">{% trans "Duplicate map" %}</a></li>
</ul>
{% has_obj_perm user map "maps.change_map_permissions" as can_change_permissions %}
{% if can_change_permissions %}
<h3>{% trans "Permissions" %}</h3>
<p>{% trans "Select what kind of privileges to allow." %}</p>
<div id="permissions_form"></div>
{% endif %}
</div>
{% endblock %}
{% block end_body_js %}
{% if request.user.is_authenticated %}
{% user_rating_js request.user map "map" %}
{% else %}
<script src="{{ STATIC_URL }}agon_ratings/js/jquery.raty.js"></script>
{% endif %}
<script>
$(function() {
$('div.overall_rating').raty({
half: true,
readOnly: true,
start: $('div.overall_rating').data('rating'),
path: "{{ STATIC_URL }}agon_ratings/img/"
});
});
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
>>>>>>> 8211953377229cb55e9536d85ff7fe01e825ef4f
</script>
{% endblock %}