| author | cavaliet |
| Fri, 03 Jan 2014 11:55:31 +0100 | |
| changeset 1278 | 9431920e7c98 |
| parent 1257 | d2cc6ecc3aa0 |
| child 1296 | 1a24fb79eb11 |
| permissions | -rwxr-xr-x |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
1 |
{% extends "front/front_base.html" %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
2 |
{% load i18n %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
3 |
{% load thumbnail %} |
|
353
bf08750b894c
Update search and front search template. Add tag filter for duration presentation.
cavaliet
parents:
349
diff
changeset
|
4 |
{% load front_tags %} |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
5 |
{% load static %} |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
6 |
|
| 424 | 7 |
{% block title %}{% trans "front.home" %}{% endblock %} |
|
339
c6a6ea1ce091
First step of player page in front. Old version of metadata player integrated.
cavaliet
parents:
338
diff
changeset
|
8 |
|
| 456 | 9 |
{% block js_import %} |
10 |
{{block.super}} |
|
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
11 |
<script src='{% static "ldt/js/raphael.js" %}' type="text/javascript"/></script> |
|
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
12 |
<script src='{% static "ldt/js/Ldt_front_sparkline.js" %}' type="text/javascript"/></script> |
| 456 | 13 |
{% endblock %} |
14 |
||
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
15 |
{% block css_import %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
16 |
{{block.super}} |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
17 |
<link rel="stylesheet" href='{% static "ldt/css/front_home.css" %}' type="text/css"/> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
18 |
{% endblock %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
19 |
|
| 520 | 20 |
{% block js_declaration %} |
21 |
{{block.super}} |
|
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
22 |
<script type="text/javascript"> |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
23 |
$(document).ready(function () { |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
24 |
$("#home_tag_cloud").toggle(false); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
25 |
$("#hide_tag_cloud").toggle(false); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
26 |
$("#show_tag_cloud").toggle(true); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
27 |
$("#tag_cloud_link").click(function(){ |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
28 |
$("#home_tag_cloud").slideToggle("fast"); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
29 |
$("#hide_tag_cloud").toggle(); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
30 |
$("#show_tag_cloud").toggle(); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
31 |
}); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
32 |
}); |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
33 |
</script> |
| 520 | 34 |
{% endblock %} |
35 |
||
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
36 |
{% block body %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
37 |
{{block.super}} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
38 |
<!-- Last annotated contents --> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
39 |
{% 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 %} |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
40 |
<ul class="floatlist full_width" id="derniers_medias"> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
41 |
<li class="li_h2"> |
| 364 | 42 |
<ul class="title_ul"> |
43 |
<li><h2>{% trans 'Last annotated medias' %}</h2></li> |
|
44 |
<li class="li_right"> |
|
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
45 |
<a class="blue" href="{% url 'ldt.ldt_utils.views.front.all_contents' %}" title="{% trans 'view all medias' %}">{% trans 'All medias' %}</a> <span class="tag_link"><a href="#" id="tag_cloud_link" title="{% trans 'Filter the medias' %}"><img id="hide_tag_cloud" src='{% static "ldt/img/little_minus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /><img id="show_tag_cloud" src='{% static "ldt/img/little_plus_pink.png" %}' alt="{% trans 'Filter the medias' %}" /> {% trans 'Filter the medias' %}</a></span> |
| 364 | 46 |
</li> |
47 |
</ul> |
|
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
48 |
</li> |
|
702
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
49 |
<li class="li_h2" id="home_tag_cloud"> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
50 |
{% 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:
700
diff
changeset
|
51 |
<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:
700
diff
changeset
|
52 |
{% endif %} |
|
d50cb79f96ee
Add category cloud in front and media page. Correct js pagination in workspace. Languages updated.
cavaliet
parents:
700
diff
changeset
|
53 |
</li> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
54 |
{% for content in last_contents %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
55 |
<li class="li_media"> |
| 466 | 56 |
<div class="img_and_overlay"> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
57 |
<a href="{% url 'ldt.ldt_utils.views.front.annot_content' content_iri_id=content.iri_id %}"> |
| 466 | 58 |
{% 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 %} |
59 |
</a> |
|
| 456 | 60 |
<div class="overlay"> |
61 |
<ul class="polemics"> |
|
| 473 | 62 |
<li class="pol-negative" style="width:{{content.pol_negative_rate}}%"><span>{{content.pol_negative_rate}}%</span></li> |
63 |
<li class="pol-positive" style="width:{{content.pol_positive_rate}}%"><span>{{content.pol_positive_rate}}%</span></li> |
|
| 456 | 64 |
</ul> |
| 473 | 65 |
<span class="graph_annotation" id="sp_{{ content.iri_id }}">{{ content.annotation_volume|list2str }}</span> |
| 456 | 66 |
</div> |
| 466 | 67 |
</div> |
|
542
54dfa397baa3
export stat to extarnal object. does not fully work
ymh <ymh.work@gmail.com>
parents:
520
diff
changeset
|
68 |
<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> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
69 |
<p><a href="{% url 'ldt.ldt_utils.views.front.annot_content' content_iri_id=content.iri_id %}" title="{% trans 'open this media' %}"><b>{{content.title}}</b></a></p> |
|
349
63f729155d81
Enhance search and front template : add begin and duration to searched segments.
cavaliet
parents:
347
diff
changeset
|
70 |
<p>{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}</p> |
|
427
e0158472f83a
Fix pluralized translations + clean-up segmentserializer
verrierj
parents:
426
diff
changeset
|
71 |
|
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
72 |
</li> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
73 |
{% endfor %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
74 |
</ul> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
75 |
<!-- Most annotated contents --> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
76 |
<ul class="floatlist" id="plus_annotes"> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
77 |
<li class="li_h2"> |
| 364 | 78 |
<ul class="title_ul"> |
79 |
<li><h2>{% trans 'Most annotated medias' %}</h2></li> |
|
80 |
</ul> |
|
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
81 |
</li> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
82 |
{% for content in most_contents %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
83 |
<li class="li_media"> |
| 466 | 84 |
<div class="img_and_overlay"> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
85 |
<a href="{% url 'ldt.ldt_utils.views.front.annot_content' content_iri_id=content.iri_id %}"> |
| 466 | 86 |
{% thumbnail content.image "134x75" 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 %}</a> |
| 456 | 87 |
<div class="overlay"> |
88 |
<ul class="polemics"> |
|
| 473 | 89 |
<li class="pol-negative" style="width:{{content.pol_negative_rate}}%"><span>{{content.pol_negative_rate}}%</span></li> |
90 |
<li class="pol-positive" style="width:{{content.pol_positive_rate}}%"><span>{{content.pol_positive_rate}}%</span></li> |
|
| 456 | 91 |
</ul> |
92 |
</div> |
|
| 466 | 93 |
</div> |
|
542
54dfa397baa3
export stat to extarnal object. does not fully work
ymh <ymh.work@gmail.com>
parents:
520
diff
changeset
|
94 |
<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> |
|
1187
73403060f297
remove absstatic and goes back to static
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
95 |
<p><a href="{% url 'ldt.ldt_utils.views.front.annot_content' content_iri_id=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> |
|
349
63f729155d81
Enhance search and front template : add begin and duration to searched segments.
cavaliet
parents:
347
diff
changeset
|
96 |
<p class="font_11">{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}</p> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
97 |
</li> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
98 |
{% endfor %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
99 |
</ul> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
100 |
<!-- Active groups --> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
101 |
<ul class="floatlist" id="groupes_actifs"> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
102 |
<li class="li_h2"> |
| 1191 | 103 |
<h2><a href="{% url 'ldt.ldt_utils.views.front.group_list' %}">{% trans 'Active groups' %}</a></h2> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
104 |
</li> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
105 |
{% for group in active_groups %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
106 |
<li class="li_media"> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
107 |
<div class="img_groupes_actifs"> |
|
1257
d2cc6ecc3aa0
merge all content's projects in one (for decoupage).
cavaliet
parents:
1191
diff
changeset
|
108 |
<a href="{% url 'ldt.ldt_utils.views.front.group_medias' group_id=group.id %}">{% thumbnail group.get_profile.image "54x40" format="PNG" crop="center" as im %}<img src="{{ im.url }}" class="img_media" width="{{ im.width }}" height="{{ im.height }}" alt="{% trans 'group picture' %}" title="{% trans 'view more infos on this group'%}">{% endthumbnail %}</a> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
109 |
</div> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
110 |
<div class="txt_groupes_actifs"> |
| 1115 | 111 |
<div class="bulle_people" title="{% blocktrans count nb=group.nb_users %}{{nb}} user in this group{% plural %}{{nb}} users in this group{% endblocktrans %}">{{ group.nb_users }}</div> |
|
1257
d2cc6ecc3aa0
merge all content's projects in one (for decoupage).
cavaliet
parents:
1191
diff
changeset
|
112 |
<p><a href="{% url 'ldt.ldt_utils.views.front.group_medias' group_id=group.id %}" class="under" title="{% trans 'view more infos on this group'%}"><b>{{group.name}}</b></a></p> |
| 700 | 113 |
<p>{% if group.get_profile.description|striptags|length > 69 %}{{group.get_profile.description|striptags|slice:":69"}}...{% else %}{{group.get_profile.description|striptags}}{% endif %}</p> |
|
338
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
114 |
</div> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
115 |
</li> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
116 |
{% endfor %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
117 |
</ul> |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
118 |
{% endblock %} |
|
631c0edee9ea
First commit for front pages. View, templates, and css img added.
cavaliet
parents:
diff
changeset
|
119 |