]> git.parisson.com Git - telemeta.git/commitdiff
Upgrade lam branch against dev and apply old changes
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 24 Feb 2015 23:35:37 +0000 (00:35 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 24 Feb 2015 23:35:37 +0000 (00:35 +0100)
telemeta/forms/media.py
telemeta/templates/telemeta/mediaitem_detail.html

index 3d37995b1763ad267cb8b116c69c1100b882be26..0c403e7bf2de2a83c9ec3bde852a543a6336815c 100644 (file)
@@ -92,7 +92,10 @@ class MediaItemForm(ModelForm):
 
     class Meta:
         model = MediaItem
-        exclude = model.exclude
+        exclude = ('alt_title', 'copied_from_item', 'cultural_area', 'ethnic_group', 'language',
+                   'context_comment', 'moda_execut', 'vernacular_style', 'generic_style',
+                   'collector', 'collector_selection', 'collector_from_collection',
+                   'creator_reference', 'old_code')
 
     def clean_code(self):
         return self.cleaned_data['code'] or None
index 4e2d3d20e24557873d7f46169d41da9cdd68dd79..b62f962a30c80cfaf77ce3cb76703ad7924fb620 100644 (file)
             {% dl_field item "alt_title" %}
             {% dl_field item "collector" placeholder %}
             <dt>{% field_label item "collection" %}</dt>
-            <dd><a href="{% url "telemeta-collection-detail" item.collection.public_id %}">{{ item.collection.title }}</a></dd>
-            <dt>{% trans "Recording date" %}</dt>
-            <dd>{% if item.recorded_from_date %}{{ item.recorded_from_date }}{% endif %}{% if item.recorded_from_date and item.recorded_to_date%} - {% endif %}{% if item.recorded_to_date %}{{ item.recorded_to_date}}{% endif %}</dd>
-            <dt>{% trans "Access type" %}</dt>
-            <dd>{% trans item.public_access %}</dd>
+
+            <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
+
+            <dt>{% trans "Location" %}</dt>
+            <dd>{% if item.location %}{{ item.location.fullnames|join:"<br/>" }}{% endif %}</dd>
+
+            {% dl_field item "summary" %}
+            {% dl_field item "scientist" %}
+            {% dl_field item "contributor" %}
+
+            <dt>{% trans "Interprets" %}</dt>
+            {% if item.performances %}
+             <dd>{% for performance in item.performances.all %}{{ performance.musicians|default:"" }}; {% endfor %}</dd>
+            {% endif %}
+
+            {% dl_field item "author" %}
+            {% dl_field item "topic" %}
+
+            <dt>{% trans "Remarks" %}</dt>
+            <dd>{{ item.comment|html_line_break|safe }}</dd>
+
+            {% dl_field item "keywords" join with ", " %}
+
+            <dt>{% trans "Media type" %}</dt>
+            <dd>{% trans mime_type|mime_to_media_type %}</dd>
+
+            {% if last_revision %}
+                <dt>{% trans "Last modification" %}</dt>
+                <dd>{{ last_revision.time }} {% if user.is_authenticated %}(<a href="{% url telemeta-profile-detail last_revision.user.username %}">{{last_revision.user.username}}</a>){% endif %}</dd>
+            {% endif %}
+
         </dl>
         {% endblock general_info %}
     </div>