/
location_view.pt
131 lines (110 loc) · 5.04 KB
/
location_view.pt
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
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en"
lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone">
<head>
<metal:links_macro metal:define-macro="links"
tal:define="url context/absolute_url;
place context/@@place;
baseline place/@@iterate/baseline">
<link
rel="where"
type="application/json"
tal:attributes="href place/@@json/data_uri" />
<link tal:condition="baseline"
rel="baseline-where"
type="application/json"
tal:attributes="href baseline/@@json/data_uri|nothing" />
<link rel="nofollow alternate" type="application/atom+xml" tal:attributes="href string:${url}/atom"/>
<link rel="nofollow alternate" type="application/json" tal:attributes="href string:${url}/@@json?sm=1"/>
<link rel="canonical" tal:attributes="href url"/>
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<style>
#map { height: 480px; float: right; }
#below-map { width: 480px;}
#below-map > p { font-size: 11px; color: #555; font-style: italic; margin: 0px; margin-top: 0.3em; padding-right: 0.5em; text-align: right;}
.leaflet-control-zoom-reset {
background-image: url(zoom-reset.png);
margin-bottom: 5px; }
#fields-continued { padding-right: 1em; }
</style>
</metal:links_macro>
<metal:js_macro metal:define-macro="js">
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
</metal:js_macro>
</head>
<body>
<metal:header_macro define-macro="header"
tal:define="kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable">
<div itemscope itemtype="http://schema.org/Place">
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h1 itemprop="name" tal:content="here/title_or_id">
Title or id
</h1>
<div tal:replace="structure provider:plone.belowcontenttitle" />
<p itemprop="description"
class="documentDescription"
tal:content="python:here.Description() or 'Description missing, please check out and add one.'">
Description</p>
<div><div tal:replace="structure provider:plone.abovecontentbody" /></div>
</div>
</metal:header_macro>
<metal:body_macro
metal:define-macro="body"
tal:define="field_macro field_macro | here/widgets/field/macros/view;
kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
templateId template/getId;
portal_state context/@@plone_portal_state;
where context/@@where;
place context/@@place;
placeurl place/absolute_url" >
<div id="map-block" title="Locations of this particular place are shown in blue.">
<div id="map"></div>
<div id="below-map">
<p tal:condition="where">Show place in
<a href=""
tal:attributes="href string:http://awmc.unc.edu/awmc/applications/alacarte/?pid=${place/getId}">
AWMC's Antiquity À-la-carte</a>,
<a href=""
tal:attributes="href string:$placeurl/kml">
Google Earth</a>, or
<a href=""
tal:attributes="href string:http://pelagios.org/peripleo/map#places=http%3A%2F%2Fpleiades.stoa.org%2Fplaces%2F${place/getId}">Pelagios' Peripleo</a>.
</p>
<p tal:condition="where"
tal:define="mlon python:where['reprPt'][0]; mlat python:where['reprPt'][1]; underscore string:_">Show area in
<a href=""
tal:attributes="href string:http://www.geonames.org/maps/google_$mlat$underscore$mlon.html">
GeoNames</a>,
<a href=""
tal:attributes="href string:http://maps.google.com/?q=$mlat,$mlon">
Google Maps</a>, or
<a href=""
tal:attributes="href string:http://openstreetmap.org/?mlat=$mlat&mlon=$mlon&zoom=12&layers=M">
OpenStreetMap</a>.
</p> </div>
</div>
<div id="fields-continued">
<tal:repeat
repeat="field python:here.Schema().filterFields(isMetadata=0)">
<tal:if_visible
define="mode string:view; visState python:field.widget.isVisible(here, mode); visCondition python:field.widget.testCondition(here, portal, template);"
condition="python:visState == 'visible' and visCondition">
<metal:use_field use-macro="field_macro"/>
</tal:if_visible>
</tal:repeat>
</div>
<script src="location_map.js"></script>
</metal:body_macro>
<metal:folderlisting_macro define-macro="folderlisting">
<!-- nothing -->
</metal:folderlisting_macro>
</body>
</html>