]> git.parisson.com Git - telemeta.git/commitdiff
fix some fields, begin field filtering
authoryomguy <yomguy@parisson.com>
Mon, 17 Sep 2012 23:48:26 +0000 (01:48 +0200)
committeryomguy <yomguy@parisson.com>
Mon, 17 Sep 2012 23:48:26 +0000 (01:48 +0200)
telemeta/forms/media.py
telemeta/templates/telemeta/mediaitem_detail.html
telemeta/templates/telemeta/mediaitem_edit.html

index c222eaebbb2c02dadabd675d38a63359f334e16d..932c88f2cd116f95802e3bf54eaa551672377564 100644 (file)
@@ -69,6 +69,10 @@ class MediaCollectionRelatedForm(ModelForm):
 class MediaItemForm(ModelForm):
     class Meta:
         model = MediaItem
+        fields = ('title', 'recorded_from_date', 'recorded_to_date', 'collector',
+                  'collection', 'summary', 'scientist', 'contributor', 'author',
+                  'topic', 'comment', 'public_access')
+
     def clean_code(self):
         return self.cleaned_data['code'] or None
 
index aeae1a078f1da03d4169b4d4b9bcf4af9a12b15d..638815bb84074fc65f20a3509651ea89266568c5 100644 (file)
@@ -221,7 +221,7 @@ Item : <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
             {% endif %}
 
             {% dl_field item "author" %}
-            {% dl_field item "subject" %}
+            {% dl_field item "topic" %}
 
             <dt>{% trans "Remarks" %}</dt>
             <dd>{{ item.comment|html_line_break|safe }}</dd>
@@ -245,7 +245,7 @@ Item : <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
             <dl class="listing">
              <dt>{% trans "Organization" %}</dt>
              <dd>{% organization %}</dd>
-             {% dl_field item "public_access_label" %}
+             {% dl_field item "public_access" %}
              {% dl_field item "depositor" %}
              <dt>{% trans "Rights" %}</dt>
              <dd>{% if item.performances %}
index e22224aac2259630938613184f26e4425c9a8821..09ef8073b3227a911a6a9f8e9fd82cc52fa3a097 100644 (file)
         <td>{{ field.label_tag.as_hidden }}{{ field.as_hidden }}</td>
     {% else %}
         <tr><td class="error">{{ field.errors }}</td></tr>
-        <td>{{ field.label_tag }}:</td>
+        <td>{% if field.required %}
+                <span style="font-weight:bold">{{ field.label_tag }}:</span>
+            {% else %}
+                {{ field.label_tag }}:
+            {% endif %}
+            </td>
             {% if field.html_name == "collection" %}
             <td>&nbsp;{% trans "Title" %} : {{ item.collection.title }}<br />
                 &nbsp;{% trans "Code" %} : {{ item.collection.code }}<br />