Skip to content

Commit e768e45

Browse files
committed
Merge branch 'config'
2 parents ef2581c + 0200482 commit e768e45

25 files changed

+555
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Custom Geotag action
2+
actions.document.geotag=Geotag
3+
message.geotag.success=''{0}'' successfully geotagged.
4+
message.geotag.failure=Couldn't geotag ''{0}''
5+
6+
# Custom View in Geohack action
7+
actions.document.view-geohack=View Location in Geohack
8+
message.view-geohack.missing-data=Could not find geolocation data for ''{0}''
9+
10+
# Custom View on OpenStreetMap action
11+
actions.document.view-osm=View on OpenStreetMap
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<extension>
2+
<modules>
3+
<module>
4+
<id>Document Geographic Details Component</id>
5+
<components>
6+
<component>
7+
<region-id>document-tags</region-id>
8+
<source-id>document-details</source-id>
9+
<scope>template</scope>
10+
<sub-components>
11+
<sub-component id="org_sharextras_document-geographic-info" index="25">
12+
<url>/extras/components/document-details/document-geographic-info</url>
13+
</sub-component>
14+
</sub-components>
15+
</component>
16+
</components>
17+
</module>
18+
<module>
19+
<id>View in OpenStreetMap Action</id>
20+
<configurations>
21+
<config evaluator="string-compare" condition="DocLibActions">
22+
<actionGroups>
23+
<actionGroup id="document-browse">
24+
<action index="996" id="org_sharextras_document-view-osm" />
25+
</actionGroup>
26+
<actionGroup id="document-details">
27+
<action index="996" id="org_sharextras_document-view-osm" />
28+
</actionGroup>
29+
</actionGroups>
30+
</config>
31+
</configurations>
32+
</module>
33+
<module>
34+
<id>View in Geohack</id>
35+
<configurations>
36+
<config evaluator="string-compare" condition="DocLibActions">
37+
<actionGroups>
38+
<actionGroup id="document-browse">
39+
<action index="997" id="org_sharextras_document-view-geohack" />
40+
</actionGroup>
41+
<actionGroup id="document-details">
42+
<action index="997" id="org_sharextras_document-view-geohack" />
43+
</actionGroup>
44+
</actionGroups>
45+
</config>
46+
</configurations>
47+
</module>
48+
<module>
49+
<id>Geotag Document Action</id>
50+
<configurations>
51+
<config evaluator="string-compare" condition="DocLibActions">
52+
<actionGroups>
53+
<actionGroup id="document-browse">
54+
<action index="998" id="org_sharextras_document-geotag" />
55+
</actionGroup>
56+
<actionGroup id="document-details">
57+
<action index="998" id="org_sharextras_document-geotag" />
58+
</actionGroup>
59+
</actionGroups>
60+
</config>
61+
</configurations>
62+
</module>
63+
</modules>
64+
</extension>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<page>
3+
<title>Geographic Map</title>
4+
<title-id>page.geographicMap.title</title-id>
5+
<description>Geographic Map</description>
6+
<description-id>page.geographicMap.description</description-id>
7+
<template-instance>osm-map</template-instance>
8+
<authentication>user</authentication>
9+
</page>
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<template-instance>
3+
<template-type>org/alfresco/geographic-map</template-type>
4+
<properties>
5+
<pageFamily>documentlibrary</pageFamily>
6+
<container>documentLibrary</container>
7+
</properties>
8+
<components>
9+
10+
<!-- Title -->
11+
<component>
12+
<region-id>title</region-id>
13+
<sub-components>
14+
<sub-component id="default">
15+
<evaluations>
16+
<!-- if in site: Site title -->
17+
<evaluation id="site">
18+
<evaluators>
19+
<evaluator type="site.component.evaluator"/>
20+
</evaluators>
21+
<url>/components/title/collaboration-title</url>
22+
</evaluation>
23+
<!-- otherwise: Repository title -->
24+
<evaluation id="repo">
25+
<url>/components/title/simple-title</url>
26+
<properties>
27+
<title>title.repository</title>
28+
<subtitle>title.browser</subtitle>
29+
</properties>
30+
</evaluation>
31+
</evaluations>
32+
</sub-component>
33+
</sub-components>
34+
</component>
35+
36+
<!-- Site Navigation -->
37+
<component>
38+
<region-id>navigation</region-id>
39+
<sub-components>
40+
<sub-component id="default">
41+
<evaluations>
42+
<!-- if in site: Site navigation -->
43+
<evaluation id="site">
44+
<evaluators>
45+
<evaluator type="site.component.evaluator"/>
46+
</evaluators>
47+
<url>/components/navigation/collaboration-navigation</url>
48+
</evaluation>
49+
</evaluations>
50+
</sub-component>
51+
</sub-components>
52+
</component>
53+
54+
<!-- Document Header -->
55+
<component>
56+
<region-id>node-header</region-id>
57+
<sub-components>
58+
<sub-component id="default">
59+
<evaluations>
60+
<!-- if in site: Site header -->
61+
<evaluation id="site">
62+
<evaluators>
63+
<evaluator type="site.component.evaluator"/>
64+
</evaluators>
65+
<url>/components/node-details/node-header</url>
66+
<properties>
67+
<nodeRef>{nodeRef}</nodeRef>
68+
<rootPage>documentlibrary</rootPage>
69+
<rootLabelId>path.documents</rootLabelId>
70+
<showComments>false</showComments>
71+
</properties>
72+
</evaluation>
73+
<!-- otherwise: Repo header -->
74+
<evaluation id="repo">
75+
<url>/components/node-details/node-header</url>
76+
<properties>
77+
<nodeRef>{nodeRef}</nodeRef>
78+
<rootPage>repository</rootPage>
79+
<rootLabelId>path.repository</rootLabelId>
80+
<showComments>false</showComments>
81+
</properties>
82+
</evaluation>
83+
</evaluations>
84+
</sub-component>
85+
</sub-components>
86+
</component>
87+
88+
<component>
89+
<region-id>map</region-id>
90+
<url>/extras/components/geographic/osm-map</url>
91+
</component>
92+
93+
</components>
94+
</template-instance>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<webscript>
2+
<shortname>document-details-geographic-info</shortname>
3+
<description>Document Details Geographic Information Component</description>
4+
<url>/extras/components/document-details/document-geographic-info</url>
5+
</webscript>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<#include "/org/alfresco/components/component.head.inc">
2+
<!-- Document Geographic Information -->
3+
<@link rel="stylesheet" type="text/css" href="${page.url.context}/res/extras/components/document-details/document-geographic-info.css" />
4+
<@script type="text/javascript" src="${page.url.context}/res/extras/components/document-details/document-geographic-info.js"></@script>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<#if documentDetailsJSON??>
2+
<#assign el=args.htmlid?js_string>
3+
<script type="text/javascript">//<![CDATA[
4+
new Extras.DocumentGeographicInfo("${args.htmlid}").setOptions({
5+
nodeRef: "${nodeRef?js_string}",
6+
siteId: <#if site??>"${site?js_string}"<#else>null</#if>,
7+
containerId: "${container?js_string}",
8+
documentDetails: ${documentDetailsJSON}
9+
}).setMessages(
10+
${messages}
11+
);
12+
//]]></script>
13+
14+
<div id="${el}-body" class="document-geographic-info document-details-panel hidden">
15+
<h2 id="${el}-heading" class="thin dark">
16+
${msg("heading")}
17+
</h2>
18+
<div id="${el}-map" class="document-geographic-map">
19+
</div>
20+
</div>
21+
22+
<script type="text/javascript">//<![CDATA[
23+
Alfresco.util.createTwister("${el}-heading", "org_sharextras_DocumentGeographicInfo");
24+
//]]></script>
25+
</#if>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
2+
<import resource="classpath:/alfresco/site-webscripts/org/alfresco/components/documentlibrary/include/documentlist.lib.js">
3+
4+
function main()
5+
{
6+
AlfrescoUtil.param('nodeRef');
7+
AlfrescoUtil.param('site', null);
8+
AlfrescoUtil.param('container', 'documentLibrary');
9+
10+
var documentDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site,
11+
{
12+
actions: true
13+
});
14+
if (documentDetails)
15+
{
16+
model.documentDetailsJSON = jsonUtils.toJSONString(documentDetails);
17+
doclibCommon();
18+
}
19+
}
20+
21+
main();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
heading=Geographic Information
2+
tooltip.gmaps=View {0} on Google Maps
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<osm-map>
2+
<!-- Either leaflet or openlayers -->
3+
<mapType>leaflet</mapType>
4+
<!-- Map zoom 0-18 (larger numbers have greater zoom level) -->
5+
<mapInitialZoom>15</mapInitialZoom>
6+
<!-- Leaflet tile URL template - see http://leaflet.cloudmade.com/reference.html#tilelayer -->
7+
<leafletTileUrl>http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png</leafletTileUrl>
8+
<!-- Whether to display the location retrieved from from reverse geocode service -->
9+
<loadLocation>true</loadLocation>
10+
</osm-map>

0 commit comments

Comments
 (0)