diff options
author | Joar Wandborg <git@wandborg.com> | 2012-01-10 02:59:07 +0100 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-01-25 23:43:58 +0100 |
commit | e8e444a85e2b16583587ff5a074f0ab1ffbaca85 (patch) | |
tree | 8cbe69990cd42d357df74e1d1e151b719eab883e /mediagoblin/templates | |
parent | 836df45dbecbaa5c8156dbbdb93c1c23bee44be4 (diff) | |
download | mediagoblin-e8e444a85e2b16583587ff5a074f0ab1ffbaca85.tar.lz mediagoblin-e8e444a85e2b16583587ff5a074f0ab1ffbaca85.tar.xz mediagoblin-e8e444a85e2b16583587ff5a074f0ab1ffbaca85.zip |
EXIF extraction, geolocation map, image rotation
- Images are now rotated based on EXIF image orientation
(in case the image isn't flipped on X or Y axis or
correctly oriented, then we do nothing)
- *Always* create a medium.jpg in image.processing, for
the sake of rotation of display image
- Extract EXIF and GPS tags from images and insert them
into media_data
- Geolocation map display added to media.html
- EXIF display added, then removed. It is not in this
revision, although some of it is (the "EXIF" h4
header). Need to make it presentable, filtering out
purely robotical tags, perhaps.
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index cbe26cbf..944d7f6e 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -23,8 +23,16 @@ {% block title %}{{ media.title }} — {{ super() }}{% endblock %} {% block mediagoblin_head %} + <link rel="stylesheet" + href="{{ request.staticdirect('/extlib/leaflet/leaflet.css') }}" /> +<!--[if lte IE 8]><link rel="stylesheet" + href="{{ request.staticdirect('/extlib/leaflet/leaflet.ie.css') }}" /><![endif]--> <script type="text/javascript" src="{{ request.staticdirect('/js/comment_show.js') }}"></script> + <script type="text/javascript" + src="{{ request.staticdirect('/extlib/leaflet/leaflet.js') }}"></script> + <script type="text/javascript" + src="{{ request.staticdirect('/js/geolocation-map.js') }}"></script> {% endblock mediagoblin_head %} {% block mediagoblin_content %} @@ -72,6 +80,21 @@ media= media._id) %} <a class="button_action" href="{{ delete_url }}">{% trans %}Delete{% endtrans %}</a> {% endif %} + {% if media.media_data.exif %} + {#- + TODO: + - Render GPS data in a human-readable format + + <h4>EXIF</h4> + <table> + {% for tag, value in media.media_data.exif.items() %} + <tr> + <td>{{ tag }}</td> + <td>{{ value }}</td> + </tr> + {% endfor %} + </table>#} + {% endif %} </p> {% if comments %} <h3> @@ -171,6 +194,26 @@ {% include "mediagoblin/utils/tags.html" %} {% endif %} + {% if media.media_data.gps %} + <h4>Map</h4> + <div> + {% set gps = media.media_data.gps %} + <div id="tile-map" style="width: 100%; height: 196px;"> + <input type="hidden" id="gps-longitude" + value="{{ gps.longitude }}" /> + <input type="hidden" id="gps-latitude" + value="{{ gps.latitude }}" /> + </div> + <p> + <small> + View on + <a href="http://openstreetmap.org/?mlat={{ gps.latitude }}&mlon={{ gps.longitude }}"> + OpenStreetMap + </a> + </small> + </p> + </div> + {% endif %} {% include "mediagoblin/utils/license.html" %} </div> {% endblock %} |