class CourseAdmin(admin.ModelAdmin):
model = Course
+class DocumentAdmin(admin.ModelAdmin):
+ exclude = ['readers']
+
+class MediaAdmin(admin.ModelAdmin):
+ exclude = ['readers']
+
admin.site.register(Organization)
admin.site.register(Department)
admin.site.register(Period)
admin.site.register(Course, CourseAdmin)
admin.site.register(Conference)
admin.site.register(IEJ)
-admin.site.register(Document)
+admin.site.register(Document, DocumentAdmin)
admin.site.register(DocumentType)
-admin.site.register(Media)
+admin.site.register(Media, MediaAdmin)
admin.site.register(Room)
admin.site.register(User, UserProfileAdmin)
admin.site.register(Training, TrainingAdmin)
title = CharField(_('title'), max_length=255, blank=True)
description = CharField(_('description'), max_length=255, blank=True)
credits = CharField(_('credits'), max_length=255, blank=True)
- is_published = BooleanField(_('published'))
date_added = DateTimeField(_('date added'), auto_now_add=True)
date_modified = DateTimeField(_('date modified'), auto_now=True)
code = CharField(_('code'), max_length=255, blank=True)
+ is_published = BooleanField(_('published'))
notes = generic.GenericRelation(Note)
<table class="listing" width="100%">
<thead>
<tr>
- <th>{% trans "Streaming" %}</th>
<th class="highlight">{% trans "Type" %}</th>
<th >{% trans "Room" %}</th>
<th >{% trans "Session" %}</th>
<th>{% trans "Professor" %}</th>
<th>{% trans "Begin date" %}</th>
+ <th>{% trans "Streaming" %}</th>
</tr>
</thead>
<tbody>
{% for conference in course.conference.all %}
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
- <td align="center">
- {% if conference.streaming %}
- <a href="{% url teleforma-conference-detail conference.id %}"><img src="images/media-record.png" alt="yes" style="vertical-align:middle" /></a>
- {% endif %}
- </td>
<td><a href="{% url teleforma-conference-detail conference.id %}">{{ conference.course.type }}</a></td>
<td><a href="{% url teleforma-conference-detail conference.id %}">{{ conference.room }}</a></td>
<td><a href="{% url teleforma-conference-detail conference.id %}">{{ conference.session }}</a></td>
<td><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></td>
<td>{{ conference.date_begin }}</td>
+ <td align="center">
+ {% if conference.streaming %}
+ <a href="{% url teleforma-conference-detail conference.id %}"><img src="images/media-record.png" alt="yes" style="vertical-align:middle" /></a>
+ {% endif %}
+ </td>
</tr>
{% endfor %}
</tbody>
<table class="listing" width="100%">
<thead>
<tr>
- <th>{% trans "Download" %}</th>
<th class="highlight">{% trans "Title" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Annal" %}</th>
<th>{% trans "Date modified" %}</th>
+ <th>{% trans "Download" %}</th>
</tr>
</thead>
<tbody>
{% for document in course.document.all %}
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
- <td align="center"><a href="{% url teleforma-document-download document.id %}"><img src="{% url telemeta-images "download.png" %}" width="16px" style="vertical-align:middle" /></a></td>
<td><a href="{% url teleforma-document-detail document.id %}" target="_blank">{{ document.title }}</a></td>
<td>{{ document.description }}</td>
<td align="center">
{% endif %}
</td>
<td>{{ document.date_added }}</td>
+ <td align="center"><a href="{% url teleforma-document-download document.id %}"><img src="{% url telemeta-images "download.png" %}" width="16px" style="vertical-align:middle" /></a></td>
</tr>
{% endfor %}
</tbody>