Skip to content

Commit

Permalink
Fixes #367
Browse files Browse the repository at this point in the history
  • Loading branch information
capooti committed May 9, 2018
1 parent 4a03953 commit 7a2d4b7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
12 changes: 12 additions & 0 deletions geonode/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,16 @@ def resource_urls(request):
defaults['USE_GAZETTEER'] = settings.USE_GAZETTEER
defaults['GOOGLE_API_KEY'] = settings.GOOGLE_API_KEY,
defaults['GOOGLE_MAPS_API_KEY'] = settings.GOOGLE_MAPS_API_KEY
defaults['WM_COPYRIGHT_URL'] = getattr(
settings,
'WM_COPYRIGHT_URL',
'http://gis.harvard.edu/'
)
defaults['WM_COPYRIGHT_TEXT'] = getattr(
settings,
'WM_COPYRIGHT_TEXT',
'Center for Geographic Analysis'
)
defaults['HYPERMAP_REGISTRY_URL'] = settings.HYPERMAP_REGISTRY_URL

return defaults
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
*/
solrUrl: "",

/**
* api: config[copyrightUrl]
* ``String`` url of the site with copyright
*/
copyrightUrl: "",

/**
* api: config[copyrightText]
* ``String`` text of the site with copyright
*/
copyrightText: "",

/**
* api: config[useMapOverlay]
* ``Boolean`` Should we add a scale overlay to the map? Set to false
Expand Down Expand Up @@ -1405,8 +1417,8 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
* map-friendliness.
*/
createMapOverlay: function() {
var cgaLink = new Ext.BoxComponent({
html:'<div class="cga-link" onclick="javascript:window.open(\'http://gis.harvard.edu\', \'_blank\');"><a href="http://gis.harvard.edu">Center for Geographic Analysis</a></div>'
var copyrightLink = new Ext.BoxComponent({
html:'<div class="cga-link" onclick="javascript:window.open(\'' + this.copyrightUrl + '\', \'_blank\');"><a href="' + this.copyrightUrl + '">' + this.copyrightText + '</a></div>'
});

var scaleLinePanel = new Ext.BoxComponent({
Expand Down Expand Up @@ -1493,7 +1505,7 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
items: [
scaleLinePanel,
zoomSelectorWrapper,
cgaLink
copyrightLink
]
});

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@
hypermapRegistryUrl: "{{ HYPERMAP_REGISTRY_URL }}",
mapProxyUrl: "{{ MAPPROXY_URL }}",
solrUrl: "{{ SOLR_URL }}",
copyrightUrl: "{{ WM_COPYRIGHT_URL }}",
copyrightText: "{{ WM_COPYRIGHT_TEXT }}",
username: "{{ user.username }}",
csrfToken: "{{ csrf_token }}",

Expand Down

0 comments on commit 7a2d4b7

Please sign in to comment.