|
38
|
1 |
{% extends "hp/base.html" %} |
|
|
2 |
{% load i18n %} |
|
|
3 |
{% load thumbnail %} |
|
|
4 |
{% load staticfiles %} |
|
|
5 |
{% load hp_tags %} |
|
|
6 |
|
|
|
7 |
{% block title %} |
|
|
8 |
{% trans "Hyperplateau : all videos" %} |
|
|
9 |
{% endblock %} |
|
|
10 |
|
|
|
11 |
{% block css_declaration %} |
|
|
12 |
{{ block.super }} |
|
39
|
13 |
<link rel="stylesheet" href="{% static "hp/css/videos.css" %}" type="text/css"/> |
|
38
|
14 |
{% endblock %} |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
{% block body %} |
|
|
18 |
{{block.super}} |
|
|
19 |
<!-- all videos --> |
|
39
|
20 |
|
|
|
21 |
<div class="main row"> |
|
83
|
22 |
<h2>{% if search %}{% trans 'Results for:' %} {{search}}{% else %}{% trans 'All videos' %}{% endif %}</h2> |
|
39
|
23 |
<div class="row"> |
|
45
|
24 |
{% for content in results %} |
|
39
|
25 |
<div class="video"> |
|
|
26 |
<p> |
|
|
27 |
<a href="{% url hp.views.show_video_details content.iri_id %}"> |
|
|
28 |
{% thumbnail content.image "320x240" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}" alt="{% trans 'open this media' %}" title="{% trans 'open this media' %}">{% endthumbnail %} |
|
|
29 |
</a> |
|
|
30 |
</p> |
|
|
31 |
<h3> |
|
|
32 |
<a href="{% url hp.views.show_video_details content.iri_id %}" title="{% trans 'open this media' %}" >{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}</a> |
|
|
33 |
</h3> |
|
|
34 |
<p> |
|
|
35 |
{% trans 'Duration:' %} |
|
|
36 |
<span class="video-duration">{{content.duration|str_duration:"h"}}</span> |
|
|
37 |
</p> |
|
38
|
38 |
</div> |
|
39
|
39 |
{% if forloop.counter|divisibleby:3 %} |
|
|
40 |
</div><div class="row"> |
|
|
41 |
{% endif %} |
|
38
|
42 |
{% endfor %} |
|
39
|
43 |
</div> |
|
45
|
44 |
{% if results.has_other_pages %} |
|
|
45 |
<div class="pagination"> |
|
|
46 |
<span class="step-links"> |
|
|
47 |
{% if results.has_previous %} |
|
83
|
48 |
<a href="{% url hp.views.all_videos %}{{search_param_first}}"><<</a> <a href="{% url hp.views.all_videos %}?page={{ results.previous_page_number }}{{search_param}}"><</a> |
|
45
|
49 |
{% else %} |
|
|
50 |
{{" "|safe}} |
|
|
51 |
{% endif %} |
|
|
52 |
<span class="current"> |
|
|
53 |
{{ results.number }}/{{ results.paginator.num_pages }} |
|
|
54 |
</span> |
|
|
55 |
{% if results.has_next %} |
|
83
|
56 |
<a href="{% url hp.views.all_videos %}?page={{ results.next_page_number }}{{search_param}}">></a> <a href="{% url hp.views.all_videos %}?page=last{{search_param}}">>></a> |
|
45
|
57 |
{% else %} |
|
|
58 |
{{" "|safe}} |
|
|
59 |
{% endif %} |
|
|
60 |
</span> |
|
|
61 |
</div> |
|
|
62 |
{% endif %} |
|
39
|
63 |
</div> |
|
38
|
64 |
{% endblock %} |