Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #280 from EsupPortail/drclockwork/bugfix_rss
Browse files Browse the repository at this point in the history
drclockwork/bugfix_rss
  • Loading branch information
DrClockwork authored Feb 19, 2018
2 parents a7dd046 + 6621ab5 commit 7db013b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
32 changes: 16 additions & 16 deletions pod_project/pods/templates/maintoolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@
<div class="results">
{% blocktrans count counter=videos.paginator.count %}{{ counter }} video{% plural %}{{ counter }} videos{% endblocktrans %}
{% if param|length > 4 %}
{% if RSS %}
<a type="application/rss+xml" href="{% url 'rss_select' qparam=param %}" title="Click to suscribe to RSS feed">
<img src="/static/images/rss3_ic.png" alt="rss" height="27px" width="27px"/></a>&nbsp;
{% endif %}
{% if ATOM_HD %}
<a type="application/atom+xml" href="{% url 'podcast_hd' qparam=param %}" title="Click to suscribe to podcasts">
<img src="/static/images/videocast_hd3_ic.png" alt="HD" height="25px" width="25px"/></a>&nbsp;
{% endif %}
{% if ATOM_SD %}
<a type="application/atom+xml" href="{% url 'podcast_sd' qparam=param %}" title="Click to suscribe to podcasts">
<img src="/static/images/videocast_sd3_ic.png" alt="SD" height="25px" width="25px"/></a>&nbsp;
{% endif %}
<!-- {% if ATOM_AUDIO %}
<a type="application/atom+xml" href="{% url 'audiocast' qparam=param %}" title="Click to suscribe to audiocast">
<img src="/static/images/audiocast3_ic.png" alt="Audio" height="25px" width="25px"/></a>
{% endif %}-->
{% if RSS %}
<a type="application/rss+xml" href="{% url 'rss_select' qparam=param %}" title="Click to suscribe to RSS feed">
<img src="/static/images/rss3_ic.png" alt="rss" height="27px" width="27px"/></a>&nbsp;
{% endif %}
{% if ATOM_HD %}
<a type="application/atom+xml" href="{% url 'podcast_hd' qparam=param %}" title="Click to suscribe to podcasts">
<img src="/static/images/videocast_hd3_ic.png" alt="HD" height="25px" width="25px"/></a>&nbsp;
{% endif %}
{% if ATOM_SD %}
<a type="application/atom+xml" href="{% url 'podcast_sd' qparam=param %}" title="Click to suscribe to podcasts">
<img src="/static/images/videocast_sd3_ic.png" alt="SD" height="25px" width="25px"/></a>&nbsp;
{% endif %}
<!-- {% if ATOM_AUDIO %}
<a type="application/atom+xml" href="{% url 'audiocast' qparam=param %}" title="Click to suscribe to audiocast">
<img src="/static/images/audiocast3_ic.png" alt="Audio" height="25px" width="25px"/></a>
{% endif %}-->
{% endif %}
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion pod_project/pods/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
if USE_PRIVATE_VIDEO:
from core.models import get_media_guard
EMAIL_ON_ENCODING_COMPLETION = getattr(settings, 'EMAIL_ON_ENCODING_COMPLETION', False)
RSS = getattr(settings, 'RSS', False)
ATOM_HD = getattr(settings, 'ATOM_HD', False)
ATOM_SD = getattr(settings, 'ATOM_SD', False)


DEFAULT_PER_PAGE = 12
VIDEOS = Pod.objects.filter(is_draft=False, encodingpods__gt=0).distinct()
Expand Down Expand Up @@ -490,7 +494,7 @@ def videos(request):
if request.is_ajax():
some_data_to_dump = {
'json_toolbar': render_to_string('maintoolbar.html',
{'videos': videos, 'param': param}),
{'videos': videos, 'param': param, 'RSS': RSS, 'ATOM_HD': ATOM_HD, 'ATOM_SD': ATOM_SD}),
'json_videols': render_to_string('videos/videos_list.html',
{'videos': videos, 'types': type, 'owners': list_owner,
'disciplines': discipline, 'param': param},
Expand Down

0 comments on commit 7db013b

Please sign in to comment.