@property
def public_id(self):
return self.code
+
+ @property
+ def has_mediafile(self):
+ for child in self.children.all():
+ if child.has_mediafile:
+ return True
+ return False
class Meta(MetaCore):
db_table = 'media_corpus'
def public_id(self):
return self.code
+ @property
+ def has_mediafile(self):
+ for child in self.children.all():
+ if child.has_mediafile:
+ return True
+ return False
+
class Meta(MetaCore):
db_table = 'media_fonds'
verbose_name = _('fonds')
<th class="highlight">{% trans "Title" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Code" %}</th>
- <th>{% trans "Reference" %}</th>
+ <th>{% trans "Sound" %}</th>
</tr>
{% for resource in resources %}
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
</td>
<td>{{ resource.description }}</td>
<td>{{ resource.code }}</td>
- <td>{{ resource.reference }}</td>
+ <td>{% if resource.has_mediafile %}
+ <img src="{{ STATIC_URL }}telemeta/images/ok.png" alt="yes" style="vertical-align:middle" />
+ {% endif %}
+ </td>
</tr>
{% endfor %}
</table>