class MediaAdmin(admin.ModelAdmin):
exclude = ['readers']
- search_fields = ['id', 'title']
+ search_fields = ['id', 'title', 'course__title', 'course__code']
class ConferenceAdmin(admin.ModelAdmin):
exclude = ['readers']
<script src="{{ STATIC_URL }}teleforma/js/charCount.js" type="text/javascript"></script>
<script type="text/javascript">
+{% if not user.is_staff %}
$(document).ready(function(){
$('#id_answer').live("paste",function(e) {
e.preventDefault();
new Messi(gettext('Sorry, it is not allowed to paste text here.'), {buttons: [{id: 0, label: gettext('OK'), val: 'X'}], modal: true});
});
});
+{% endif %}
$(document).ready(function(){
//default usage
<tbody>
{% for doc in docs.all %}
<tr>
- <td {% if forloop.first %}class="border-top"{% endif %} width="95%">{% if doc.file %}<a href="{% url teleforma-document-view seminar.id doc.id %}" target="_blank" title="{% trans "View" %}"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
- <td {% if forloop.first %}class="border-top"{% endif %} width="5%" align="center">{% if doc.file %}<a href="{% url teleforma-document-download seminar.id doc.id %}"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
+ <td {% if forloop.first %}class="border-top"{% endif %} width="90%">{% if doc.file %}<a href="{% url teleforma-document-view seminar.id doc.id %}" target="_blank" title="{% trans "View" %}"><img src="{{ STATIC_URL }}/teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
+ <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">{% if doc.file %}{% if user in doc.readers.all %}<img src="{{ STATIC_URL }}telemeta/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' viewed' %}" /> {% endif %}<a href="{% url teleforma-document-download seminar.id doc.id %}"><img src="{{ STATIC_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</div>
</td>
<td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">
- {% if media.is_published and user.is_staff %}
- <img src="{{ STATIC_URL }}telemeta/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' published' %}" />
- {% elif not media.is_published and user.is_staff %}
- <img src="{{ STATIC_URL }}telemeta/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' rejected' %}" />
+ {% if user in media.readers.all %}
+ <img src="{{ STATIC_URL }}telemeta/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' viewed' %}" />
{% endif %}
{% if media.item.file %}
<a href="{{ MEDIA_URL }}{{ media.item.file }}">
{% if media.is_published or user.is_staff %}
<tr>
<td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
- <a href="{% url teleforma-media-video seminar.id media.id %}" title="{% trans "Play" %}">
+ <a href="{% url teleforma-media-video seminar.id media.id %}" target="_blank" title="{% trans "Play" %}">
<img src="{{ STATIC_URL }}/teleforma/images/tool-animator.png" style="vertical-align:middle" alt="" /> {{ media.item.title }}
</a>
</td>
{% endif %}
{% endfor %}
</tbody>
-</table>
\ No newline at end of file
+</table>