]> git.parisson.com Git - teleforma.git/commitdiff
no readers in admin, fix docs
authoryomguy <yomguy@parisson.com>
Tue, 5 Jun 2012 00:29:04 +0000 (02:29 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 5 Jun 2012 00:29:04 +0000 (02:29 +0200)
teleforma/admin.py
teleforma/models.py
teleforma/templates/teleforma/inc/conference_list.html
teleforma/templates/teleforma/inc/document_list.html

index ac4906f97166ebeb0f38f2675504ac2dc2b48bc1..0bd11cbe78f3a294b3170e14d2e6713f6ed64899 100644 (file)
@@ -30,15 +30,21 @@ class TrainingAdmin(admin.ModelAdmin):
 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)
index 60f75d7598b9ba1b96c6e4350611c79d89367821..e353d5c25d603b9b2cc9a630ae811469a2f8a5b7 100755 (executable)
@@ -264,10 +264,10 @@ class MediaBase(Model):
     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)
 
index 5103a2f2f2b7e18764e29ad178d501b7c36081f4..9603671062d1899d64e5cfc2d91a5cfcc085951b 100644 (file)
@@ -8,27 +8,27 @@
     <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>
index 54df5bb1c734933e05e685382b7bc313ee895be6..f0781494811996b7783def20ec06a817150e9544 100644 (file)
@@ -8,17 +8,16 @@
 <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">
@@ -27,6 +26,7 @@
         {% 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>