| author | grandjoncl |
| Wed, 28 Nov 2012 12:27:08 +0100 | |
| changeset 995 | 94f9d36371f6 |
| parent 762 | 292b15799db2 |
| child 1187 | 73403060f297 |
| permissions | -rwxr-xr-x |
| 364 | 1 |
{% extends "front/front_base.html" %} |
2 |
{% load i18n %} |
|
3 |
{% load thumbnail %} |
|
4 |
{% load front_tags %} |
|
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
762
diff
changeset
|
5 |
{% load absstatic %} |
| 364 | 6 |
|
| 504 | 7 |
{% block title %} |
8 |
{% if tag_label %} |
|
9 |
{% blocktrans %}Lignes de temps : {{tag_label}}{% endblocktrans %} |
|
10 |
{% else %} |
|
11 |
{% trans "Lignes de temps : all medias" %} |
|
12 |
{% endif %} |
|
13 |
{% endblock %} |
|
| 364 | 14 |
|
| 370 | 15 |
{% block js_import %} |
16 |
{{block.super}} |
|
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
762
diff
changeset
|
17 |
<script src='{% absstatic "ldt/js/raphael.js" %}' type="text/javascript"></script> |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
762
diff
changeset
|
18 |
<script src='{% absstatic "ldt/js/Ldt_front_sparkline.js" %}' type="text/javascript"></script> |
| 370 | 19 |
{% endblock %} |
20 |
||
| 364 | 21 |
{% block css_import %} |
22 |
{{block.super}} |
|
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
762
diff
changeset
|
23 |
<link rel="stylesheet" href='{% absstatic "ldt/css/front_home.css" %}' type="text/css"/> |
| 364 | 24 |
{% endblock %} |
25 |
||
| 520 | 26 |
{% block js_declaration %} |
27 |
{{block.super}} |
|
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
28 |
<script type="text/javascript"> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
29 |
$(document).ready(function () { |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
30 |
$("#home_tag_cloud").toggle(false); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
31 |
$("#hide_tag_cloud").toggle(false); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
32 |
$("#show_tag_cloud").toggle(true); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
33 |
$("#tag_cloud_link").click(function(){ |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
34 |
$("#home_tag_cloud").slideToggle("fast"); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
35 |
$("#hide_tag_cloud").toggle(); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
36 |
$("#show_tag_cloud").toggle(); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
37 |
}); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
38 |
}); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
39 |
</script> |
| 520 | 40 |
{% endblock %} |
41 |
||
| 364 | 42 |
{% block body %} |
43 |
{{block.super}} |
|
44 |
<!-- Last annotated contents --> |
|
|
605
ad9f20fbf4f9
Wording for front and french translations updated.
cavaliet
parents:
570
diff
changeset
|
45 |
{% if front_tags|length > 0 %}<p class="tag_link">{% trans 'Filter the medias by category' %} : {% for t in front_tags %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t}}">{{t}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %} |
| 364 | 46 |
<ul class="floatlist full_width" id="derniers_medias"> |
47 |
<li class="li_h2"> |
|
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
48 |
<ul class="title_ul"> |
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
49 |
<li><h2> |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
50 |
{% if tag_label %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}">{% trans 'All medias' %}</a>{% if tag_label %}<span class="pink"> > {{tag_label}}</span>{% endif %} |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
51 |
{% elif media_title %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}">{% trans 'All medias' %}</a>{% if media_title %}<span class="pink"> > "{{media_title}}"</span>{% endif %} |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
52 |
{% else %}{% trans 'All medias' %}{% endif %}</h2> |
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
53 |
</li> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
54 |
<li class="li_right"> |
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
762
diff
changeset
|
55 |
<span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src='{% absstatic "ldt/img/little_minus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src='{% absstatic "ldt/img/little_plus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span> |
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
56 |
</li> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
57 |
</ul> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
58 |
</li> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
59 |
<li class="li_h2" id="home_tag_cloud"> |
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
60 |
<form id="media_search" method="GET" action=""> |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
61 |
{% trans 'Search in the medias title' %} : |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
62 |
<input id="input_media_title" type="text" name="title"> <input id="search_media_title" type="submit" value=""/> |
|
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
63 |
</form> |
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
64 |
{% if tag_cloud|length > 0 %}<p class="left tag_link">{% trans 'All categories of medias' %} : {% for t in tag_cloud %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t.name}}"> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
65 |
<span style="font-size:{{t.font_size|add:"12"}}px;">{{t.name}}</span></a>{% if not forloop.last %}, {% endif %}{% endfor %}</p> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
66 |
{% endif %} |
| 364 | 67 |
</li> |
| 740 | 68 |
<!-- Pagination --> |
69 |
<li id="result_pagination" class="li_h2"> |
|
70 |
<p> |
|
71 |
{% if results.has_previous %} |
|
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
72 |
<a class="blue under" href="{% url ldt.ldt_utils.views.front.all_contents %}?page={{ results.previous_page_number }}{% if tag_label %}&tag={{tag_label}}{% endif %}{% if media_title %}&title={{media_title}}{% endif %}" title="{% trans 'previous' %}">{% trans "previous" %}</a> |
| 740 | 73 |
{% endif %} |
74 |
{% if results.paginator.num_pages > 1 %} |
|
75 |
<span class="current"> |
|
76 |
{% for i in results.paginator.num_pages|get_range %} |
|
77 |
<span class="current"> |
|
78 |
{% if i|add:'1' == results.number %} |
|
79 |
<span class="pink">{{i|add:'1'}}</span> |
|
80 |
{% else %} |
|
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
81 |
<a class="blue under" href="{% url ldt.ldt_utils.views.front.all_contents %}?page={{i|add:'1'}}{% if tag_label %}&tag={{tag_label}}{% endif %}{% if media_title %}&title={{media_title}}{% endif %}">{{i|add:'1'}}</a> |
| 740 | 82 |
{% endif %} |
83 |
{% if i|add:'1' < results.paginator.num_pages and 1 < results.paginator.num_pages %} |
|
84 |
{% endif %} |
|
85 |
</span> |
|
86 |
{% endfor %} |
|
87 |
</span> |
|
88 |
{% endif %} |
|
89 |
{% if results.has_next %} |
|
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
90 |
<a class="blue under" href="{% url ldt.ldt_utils.views.front.all_contents %}?page={{ results.next_page_number }}{% if tag_label %}&tag={{tag_label}}{% endif %}{% if media_title %}&title={{media_title}}{% endif %}" title="{% trans 'next' %}">{% trans "next" %}</a> |
| 740 | 91 |
{% endif %} |
92 |
{% if results.paginator.num_pages > 1 %} |
|
|
762
292b15799db2
quick search in media title in the front. Languages updated.
cavaliet
parents:
740
diff
changeset
|
93 |
. <a class="blue under" href="{% url ldt.ldt_utils.views.front.all_contents %}?page=x{% if tag_label %}&tag={{tag_label}}{% endif %}{% if media_title %}&title={{media_title}}{% endif %}"">({% trans 'All' %})</a> |
| 740 | 94 |
{% endif %} |
95 |
</p> |
|
96 |
</li> |
|
97 |
<!-- Fin Pagination --> |
|
98 |
{% for content in results.object_list %} |
|
| 364 | 99 |
<li class="li_media"> |
| 466 | 100 |
<div class="img_and_overlay"> |
101 |
<a href="{% url ldt.ldt_utils.views.front.annot_content content.iri_id %}"> |
|
102 |
{% thumbnail content.image "294x165" 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 %} |
|
103 |
</a> |
|
| 456 | 104 |
<div class="overlay"> |
105 |
<ul class="polemics"> |
|
| 473 | 106 |
<li class="pol-negative" style="width:{{content.pol_negative_rate}}%"><span>{{content.pol_negative_rate}}%</span></li> |
107 |
<li class="pol-positive" style="width:{{content.pol_positive_rate}}%"><span>{{content.pol_positive_rate}}%</span></li> |
|
| 482 | 108 |
<!-- <li class="pol-reference" style="width:{{content.pol_reference_rate}}%"><span>{{content.pol_reference_rate}}%</span></li> |
109 |
<li class="pol-question" style="width:{{content.pol_question_rate}}%"><span>{{content.pol_question_rate}}%</span></li> --> |
|
| 456 | 110 |
</ul> |
| 473 | 111 |
<span class="graph_annotation" id="sp_{{ content.iri_id }}">{{ content.annotation_volume|list2str }}</span> |
| 456 | 112 |
</div> |
| 466 | 113 |
</div> |
|
542
54dfa397baa3
export stat to extarnal object. does not fully work
ymh <ymh.work@gmail.com>
parents:
520
diff
changeset
|
114 |
<div class="bulle_annot" title="{% blocktrans count nb=content.nb_annotations %}{{nb}} annotation on this media{% plural %}{{nb}} annotations on this media{% endblocktrans %}">{{ content.nb_annotations }}</div> |
| 562 | 115 |
<p><a href="{% url ldt.ldt_utils.views.front.annot_content content.iri_id %}" title="{% trans 'open this media' %}" ><b>{% if content.title|length > 69 %}{{content.title|slice:":69"}}...{% else %}{{content.title}}{% endif %}</b></a></p> |
| 364 | 116 |
<p>{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}</p> |
117 |
</li> |
|
118 |
{% endfor %} |
|
119 |
</ul> |
|
|
605
ad9f20fbf4f9
Wording for front and french translations updated.
cavaliet
parents:
570
diff
changeset
|
120 |
{% if tag_cloud|length > 0 %}<p class="left tag_link">{% trans 'All categories of medias' %} : {% for t in tag_cloud %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t.name}}"> |
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
605
diff
changeset
|
121 |
<span style="font-size:{{t.font_size|add:"12"}}px;">{{t.name}}</span> |
| 409 | 122 |
</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p> |
123 |
{% endif %} |
|
| 364 | 124 |
{% endblock %} |
125 |