Skip to content

Commit

Permalink
- Bump to version 2.0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jun 16, 2020
1 parent fc31653 commit c78308c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions mapstore2_adapter/plugins/geonode.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,19 +426,25 @@ def get_overlays(self, viewer, request=None):
(_label, _field, _field)
elif displayTypes[_field] == 'type_image':
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<img width="100%%" height="auto" src="${properties.%s}" title="%s" alt="%s"/></div>' % \
(_field, _label, _label)
elif displayTypes[_field] == 'type_video':
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<video width="100%%" height="360" controls><source src="${properties.%s}" type="video/mp4">Your browser does not support the video tag.</video></div>' % \
(_field)
<a href="${properties.%s}" target="_new"><img width="100%%" height="auto" src="${properties.%s}" title="%s" alt="%s"/></a></div>' % \
(_field, _field, _label, _label)
elif 'type_video' in displayTypes[_field]:
if 'youtube' in displayTypes[_field]:
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<iframe src="${properties.%s}" width="100%%" height="360" frameborder="0" allowfullscreen></iframe></div>' % \
(_field)
else:
_type = "video/%s" % (displayTypes[_field][11:])
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<video width="100%%" height="360" controls><source src="${properties.%s}" type="%s">Your browser does not support the video tag.</video></div>' % \
(_field, _type)
elif displayTypes[_field] == 'type_audio':
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<audio controls><source src="${properties.%s}" type="audio/mpeg">Your browser does not support the audio element.</audio></div>' % \
(_field)
elif displayTypes[_field] == 'type_iframe':
_template += '<div class="col-xs-12" align="center" style="font-weight: bold; word-wrap: break-word;"> \
<iframe src="${properties.%s}" width="100%%" height="360" frameborder="0" allowfullscreen></iframe></div>' % \
<iframe src="/proxy/?url=${properties.%s}" width="100%%" height="360" frameborder="0" allowfullscreen></iframe></div>' % \
(_field)
else:
_template += '<div class="col-xs-6" style="font-weight: bold; word-wrap: break-word;">%s:</div> \
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = django-mapstore-adapter
version = 2.0.4
version = 2.0.4.1
description = Django MapStore2 Adapter
author = Alessio Fabiani
author_email = [email protected]
Expand Down

0 comments on commit c78308c

Please sign in to comment.