| author | cavaliet |
| Wed, 26 Jun 2013 16:53:45 +0200 | |
| changeset 159 | b98558f8d2c1 |
| parent 149 | af59627418e7 |
| child 168 | c90576d18319 |
| permissions | -rw-r--r-- |
| 149 | 1 |
{% extends "egonomy_newbase.html" %} |
| 15 | 2 |
{% load static %} |
3 |
{% load i18n %} |
|
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
4 |
{% load thumbnail %} |
| 15 | 5 |
|
6 |
{% block title %}{% trans "View a fragment" %}{% endblock %} |
|
7 |
||
8 |
{% block content %} |
|
| 149 | 9 |
<div class="title-page"> |
10 |
<h2>{{ fragment.title }}</h2> |
|
11 |
</div> |
|
12 |
<div class="bar-tools clearfix"> |
|
13 |
<ul class="clearfix left"> |
|
14 |
<li><a class="go-to mosaic" href="#"></a></li> |
|
15 |
<li><a class="go-to search" href="#"></a></li> |
|
16 |
</ul> |
|
17 |
<ul class="clearfix"> |
|
18 |
{% ifequal user fragment.author %} |
|
19 |
<li> |
|
20 |
<a class="icon edit" href="{% url 'create_fragment' image_id=fragment.image.id fragment_pk=fragment.pk %}">{% trans "Modify this fragment" %}</a> |
|
21 |
</li> |
|
22 |
<li> |
|
23 |
<a class="icon trash" href="{% url 'delete_fragment' %}?fragment_pk={{fragment.pk}}" onclick="return confirm('{% trans "Do you really want to delete this fragment ? Warning : this action est irreversible." %}')">{% trans "Delete this fragment" %}</a> |
|
24 |
</li> |
|
25 |
{% endifequal %} |
|
26 |
<li> |
|
27 |
<a class="icon copy" href="{% url 'create_fragment' image_id=fragment.image.id %}?duplicate={{fragment.pk}}">{% trans "Duplicate this fragment" %}</a> |
|
28 |
</li> |
|
29 |
<li> |
|
30 |
<a class="icon cut" href="{% url 'create_fragment' image_id=fragment.image.id %}">{% trans "Create a fragment" %}</a> |
|
31 |
</li> |
|
32 |
<li> |
|
33 |
{% if user.is_authenticated %} |
|
| 159 | 34 |
<a class="icon plus open-popin" href="#add-to-collection">{% trans "Add to a collection" %}</a> |
| 149 | 35 |
{% else %} |
| 159 | 36 |
<a class="icon plus" href="{% url 'login' %}?next={% url 'view_fragment' fragment_pk=fragment.pk %}">{% trans "Add to a collection" %}</a> |
| 149 | 37 |
{% endif %} |
38 |
</li> |
|
39 |
<!--li> |
|
40 |
<a class="icon save" href="#">Enregistrer sous</a> |
|
41 |
</li> |
|
42 |
<li> |
|
43 |
<a class="icon plus open-popin" href="#add-to-collection">Ajouter à ma collection</a> |
|
44 |
</li> |
|
45 |
<li> |
|
| 15 | 46 |
<form action="#"> |
| 149 | 47 |
<p> |
48 |
<input class="search-form" id="id_search" type="text" placeholder="Romantisme noir"> |
|
49 |
</p> |
|
| 15 | 50 |
</form> |
| 149 | 51 |
</li--> |
52 |
</ul> |
|
53 |
</div> |
|
54 |
<article class="edition"> |
|
55 |
<div class="slideshow box-edition"> |
|
56 |
<div class="image-wrap"> |
|
57 |
{% if fragment_only %} |
|
58 |
<div class="image-and-fragment square-fragment-600"> |
|
59 |
{% with fragment.image.info.image_file as image %} |
|
60 |
{% include "partial/fragment_only.html" %} |
|
61 |
{% endwith %} |
|
62 |
</div> |
|
63 |
{% else %} |
|
64 |
<div class="image-and-fragment"> |
|
65 |
{% with 0.99 as ratio %} |
|
66 |
{% with "600" as w_size %} |
|
67 |
{% with "x600" as h_size %} |
|
68 |
{% include "partial/picture_and_fragment.html" %} |
|
69 |
{% endwith %} |
|
70 |
{% endwith %} |
|
71 |
{% endwith %} |
|
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
72 |
</div> |
| 149 | 73 |
{% endif %} |
74 |
</div> |
|
75 |
<div class="arrow-wrap left-arrow"> |
|
76 |
<a class="arrow" href="#"></a> |
|
77 |
</div> |
|
78 |
<div class="arrow-wrap right-arrow"> |
|
79 |
<a class="arrow" href="#"></a> |
|
80 |
</div> |
|
81 |
<ul class="share"> |
|
82 |
<li><a title="Partager sur Twitter" href="#" class="tool twitter"></a></li> |
|
83 |
<li><a title="Partager sur Facebook" href="#" class="tool facebook"></a></li> |
|
84 |
</ul> |
|
85 |
</div> |
|
86 |
<div class="info box-edition clearfix"> |
|
87 |
<table class="edition-table-left"> |
|
88 |
<tbody> |
|
89 |
<tr> |
|
90 |
<th>{% trans "Source picture" %} :</th> |
|
91 |
<td><a href="{% url 'annotate_picture' image_id=fragment.image.id %}">{{ fragment.image.metadata.titre|default:_("No title") }}</a></td> |
|
92 |
</tr> |
|
93 |
<tr> |
|
94 |
<th>{% trans "Fragment's title" %} :</th> |
|
95 |
<td>{{ fragment.title }}</td> |
|
96 |
</tr> |
|
97 |
<tr> |
|
98 |
<th>{% trans "Fragment's description" %} :</th> |
|
99 |
<td>{{ fragment.description }}</td> |
|
100 |
</tr> |
|
101 |
<tr> |
|
102 |
<th>{% trans "Last modification" %} :</th> |
|
103 |
<td>{{ fragment.date_saved }} {% trans 'by' %} <strong><a href="{% url 'user_fragments' username=fragment.author %}">{{ fragment.author }}</a></strong></td> |
|
104 |
</tr> |
|
105 |
</tbody> |
|
106 |
</table> |
|
107 |
<table class="edition-table-right"> |
|
108 |
<tbody> |
|
109 |
{% if fragment_only %} |
|
110 |
<tr><th><a href="{% url 'view_fragment' fragment_pk=fragment.pk %}?fragment_only=0">{% trans "See the fragment in its full picture" %} :</a></th></tr> |
|
111 |
<tr><td><a href="{% url 'view_fragment' fragment_pk=fragment.pk %}?fragment_only=0"> |
|
112 |
<div class="image-and-fragment"> |
|
113 |
{% with 1 as ratio %} |
|
114 |
{% with "110" as w_size %} |
|
115 |
{% with "x110" as h_size %} |
|
116 |
{% include "partial/picture_and_fragment.html" %} |
|
117 |
{% endwith %} |
|
118 |
{% endwith %} |
|
119 |
{% endwith %} |
|
120 |
</div></a> |
|
121 |
</td></tr> |
|
| 78 | 122 |
</a> |
| 149 | 123 |
{% else %} |
124 |
<tr><th><a href="{% url 'view_fragment' fragment_pk=fragment.pk %}">{% trans "See the fragment only" %} :</a></th></tr> |
|
125 |
<tr><td><a href="{% url 'view_fragment' fragment_pk=fragment.pk %}"> |
|
126 |
<div class="image-and-fragment square-fragment-110"> |
|
| 78 | 127 |
{% with image=fragment.image.info.image_file %} |
| 79 | 128 |
{% include "partial/fragment_only.html" %} |
| 78 | 129 |
{% endwith %} |
| 149 | 130 |
</div></a> |
131 |
</td></tr> |
|
| 78 | 132 |
</a> |
| 149 | 133 |
{% endif %} |
134 |
</tbody> |
|
135 |
</table> |
|
136 |
</div> |
|
137 |
<div class="box-edition"> |
|
138 |
<table> |
|
139 |
<tbody> |
|
140 |
<tr> |
|
141 |
<th class="va-top">{% trans "Fragment's keywords" %}</th> |
|
142 |
<td> |
|
143 |
<ul class="list-key-search no-before list-keywords clearfix"> |
|
144 |
{% for t in fragment.tag_list %} |
|
145 |
{% if t != "" %}<li><a data-tag="{{ t }}" class="box-shadow-2" href="#">{{ t }}</a></li>{% endif %} |
|
146 |
{% endfor %} |
|
147 |
</ul> |
|
148 |
</td> |
|
149 |
</tr> |
|
150 |
</tbody> |
|
151 |
</table> |
|
| 15 | 152 |
</div> |
| 149 | 153 |
<div class="box-edition"> |
154 |
<h3>{% trans "Fragments from this picture" %} :</h3> |
|
155 |
{% if fragment_list %} |
|
156 |
<ul class="fullwidth clearfix"> |
|
157 |
{% for fragment in fragment_list %} |
|
158 |
<li class="subcol subcol-seventh"> |
|
159 |
<a href="{% url 'view_fragment' fragment_pk=fragment.pk %}"> |
|
160 |
<div class="center-image"> |
|
161 |
<div class="image-and-fragment"> |
|
162 |
{% include "partial/picture_and_red_fragment.html" %} |
|
| 15 | 163 |
</div> |
| 149 | 164 |
</div> |
165 |
<h3>{{ fragment.title }}</h3></a> |
|
166 |
<p>{% trans "Annotated by" %} <strong><a href="{% url 'user_fragments' username=fragment.author %}">{{ fragment.author }}</a></strong></p> |
|
167 |
</li> |
|
168 |
{% endfor %} |
|
169 |
</ul> |
|
170 |
{% else %} |
|
171 |
<p class="null">{% trans "No fragment" %}</p> |
|
172 |
{% endif %} |
|
| 15 | 173 |
</div> |
| 149 | 174 |
<div class="box-edition"> |
175 |
<h3>Collections liées à cette image :</h3> |
|
176 |
<p class="null">{% trans "No collection" %}</p> |
|
177 |
</div> |
|
178 |
</article> |
|
| 15 | 179 |
{% endblock %} |