Merge remote-tracking branch 'refs/remotes/tryggvib/532-exif-creation-date'
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 11 May 2013 18:48:42 +0000 (13:48 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 11 May 2013 18:48:42 +0000 (13:48 -0500)
Conflicts:
mediagoblin/config_spec.ini
mediagoblin/templates/mediagoblin/user_pages/media.html

1  2 
mediagoblin/config_spec.ini
mediagoblin/media_types/image/models.py
mediagoblin/templates/mediagoblin/user_pages/media.html

index 6c00aa58db15cfb14c7390fae2e8d8c7ca3898bb,7b56f76843fd98e139c313882e28cf31bde63a06..2af4adb217fc4deedc549b35ccf8557a97d93747
@@@ -61,6 -58,8 +61,7 @@@ csrf_cookie_name = string(default='medi
  push_urls = string_list(default=list())
  
  exif_visible = boolean(default=False)
 -geolocation_map_visible = boolean(default=False)
+ original_date_visible = boolean(default=False)
  
  # Theming stuff
  theme_install_dir = string(default="%(here)s/user_dev/themes/")
index 6d32d009533731b4135ffa9bf3ff1cbfc1c64bd8,2dcbf90cf19d84a08debe1889ee2cc67ea0a98f2..8a65e4e9fcab68abacf0d918a83fd6ed68859539
      {% endif %}
    </div>
    <div class="media_sidebar">
 -    {% trans date=media.created.strftime("%Y-%m-%d") -%}
 -      <h3>Added on</h3>
 -      <p>{{ date }}</p>
 -    {%- endtrans %}
 +    <h3>Added</h3>
 +    <p><span title="{{ media.created.strftime("%I:%M%p %Y-%m-%d") }}">
 +        {%- trans formatted_time=timesince(media.created) -%}    
 +          {{ formatted_time }} ago
 +        {%- endtrans -%}
 +    </span></p>
++
+     {% if app_config['original_date_visible'] %}
+       {% set original_date = media.media_data.get_original_date() %}
+       {% if original_date -%}
+         {% trans date=original_date.strftime("%Y-%m-%d") -%}
+           <h3>Created on</h3>
+           <p>{{ date }}</p>
+         {%- endtrans %}
+       {%- endif %}
+     {% endif %}
++
      {% if media.tags %}
        {% include "mediagoblin/utils/tags.html" %}
      {% endif %}