| author | ymh <ymh.work@gmail.com> |
| Mon, 11 Feb 2013 14:10:22 +0100 | |
| changeset 31 | 29caac899e1f |
| parent 27 | daaafc916dc4 |
| child 48 | 4c0838a3a8b6 |
| permissions | -rw-r--r-- |
| 15 | 1 |
{% extends "egonomy_base.html" %} |
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 %} |
|
9 |
<div class="fullwidth"> |
|
10 |
<div class="column column-half"> |
|
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
11 |
<h2>{{ fragment.title }}</h2> |
| 15 | 12 |
<div class="image-and-fragment"> |
|
23
bb7819c8d7c2
first step user login/logout. Create fragment works. Views and templates adapted with real data model.
cavaliet
parents:
18
diff
changeset
|
13 |
{% with fragment.image.info.image_file as image %} |
|
bb7819c8d7c2
first step user login/logout. Create fragment works. Views and templates adapted with real data model.
cavaliet
parents:
18
diff
changeset
|
14 |
{% thumbnail image "476" format="PNG" crop="center" as im %} |
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
15 |
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
16 |
{% empty %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
17 |
<img src="{% static 'egonomy/img/empty.gif' %}" width="476" height="476" class="placeholder" /> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
18 |
{% endthumbnail %} |
|
23
bb7819c8d7c2
first step user login/logout. Create fragment works. Views and templates adapted with real data model.
cavaliet
parents:
18
diff
changeset
|
19 |
{% endwith %} |
| 15 | 20 |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 1 1" preserveAspectRatio="none"> |
|
23
bb7819c8d7c2
first step user login/logout. Create fragment works. Views and templates adapted with real data model.
cavaliet
parents:
18
diff
changeset
|
21 |
<path d="{{ fragment.coordinates }}" stroke="red" stroke-width=".002" fill="red" fill-opacity=".3" /> |
| 15 | 22 |
</svg> |
23 |
</div> |
|
24 |
</div> |
|
25 |
<div class="column column-half"> |
|
26 |
<form action="#"> |
|
27 |
<table class="image-metadata"> |
|
28 |
<tr> |
|
29 |
<th>{% trans "Source picture" %} :</th> |
|
|
23
bb7819c8d7c2
first step user login/logout. Create fragment works. Views and templates adapted with real data model.
cavaliet
parents:
18
diff
changeset
|
30 |
<td><a href="{% url 'annotate_picture' image_id=fragment.image.id %}">{{ fragment.image.metadata.titre }}</a></td> |
| 15 | 31 |
</tr> |
32 |
<tr> |
|
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
33 |
<th>{% trans "Fragment's description" %} :</th> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
34 |
<td>{{ fragment.description }}</td> |
| 15 | 35 |
</tr> |
36 |
<tr> |
|
37 |
<th>{% trans "Users keywords" %}</th> |
|
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
25
diff
changeset
|
38 |
<td>{{ fragment.tags }}</td> |
| 15 | 39 |
</tr> |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
25
diff
changeset
|
40 |
<!--tr> |
| 15 | 41 |
<th> </th> |
42 |
<td><input class="user-submit" type="submit" value="{% trans 'Save keywords' %}" /></td> |
|
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
25
diff
changeset
|
43 |
</tr--> |
| 15 | 44 |
<tr> |
45 |
<th>{% trans "Last modification" %} :</th> |
|
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
25
diff
changeset
|
46 |
<td>{{ fragment.date_saved }} {% trans 'by' %} <strong>{{ fragment.author }}</strong></td> |
| 15 | 47 |
</tr> |
48 |
</table> |
|
49 |
</form> |
|
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
50 |
<div class="fullwidth"> |
|
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
51 |
<a href="{% url 'create_fragment' image_id=fragment.image.id %}" class="big-button">{% trans "Create a fragment" %}</a> |
|
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
52 |
</div> |
| 15 | 53 |
</div> |
54 |
</div> |
|
55 |
<div class="fullwidth"> |
|
56 |
<div class="column column-full"> |
|
57 |
<h2>{% trans "Fragments from this picture" %}</h2> |
|
58 |
<ul class="fullwidth"> |
|
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
59 |
{% for frg in fragment_list %} |
| 15 | 60 |
<li class="subcol subcol-eighth"> |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
25
diff
changeset
|
61 |
<a href="{% url 'view_fragment' fragment_pk=frg.pk %}"> |
| 15 | 62 |
<div class="center-image"> |
63 |
<div class="image-and-fragment"> |
|
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
64 |
{% with frg.image.info.image_file as image %} |
|
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
65 |
{% if image %} |
|
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
66 |
{% if image|is_portrait %} |
|
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
67 |
{% thumbnail image "x110" format="PNG" crop="center" as im %} |
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
68 |
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
69 |
{% empty %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
70 |
<img src="{% static 'egonomy/img/empty.gif' %}" width="110" height="110" class="placeholder" /> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
71 |
{% endthumbnail %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
72 |
{% else %} |
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
73 |
{% thumbnail image "110" format="PNG" crop="center" as im %} |
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
74 |
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
75 |
{% empty %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
76 |
<img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" /> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
77 |
{% endthumbnail %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
78 |
{% endif %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
79 |
{% else %} |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
80 |
<img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" /> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
81 |
{% endif %} |
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
82 |
{% endwith %} |
| 15 | 83 |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 1 1" preserveAspectRatio="none"> |
|
25
48614929b87a
Real sort on home. Real pict's fragment on other pages. Real links on intelligent pagination.
cavaliet
parents:
23
diff
changeset
|
84 |
<path d="{{ frg.coordinates }}" stroke="red" stroke-width=".02" fill="red" fill-opacity=".3" /> |
| 15 | 85 |
</svg> |
86 |
</div> |
|
87 |
</div> |
|
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
88 |
<h3>{{ frg.title }}</h3></a> |
|
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
89 |
<p>{% trans "Annotated by" %} <strong>{{ frg.author }}</strong></p> |
| 15 | 90 |
</li> |
|
18
ffd106d9b8e1
Prepare template for real datas. Some fake datas temporary generated in views.
cavaliet
parents:
15
diff
changeset
|
91 |
{% endfor %} |
| 15 | 92 |
</ul> |
93 |
</div> |
|
94 |
</div> |
|
95 |
{% endblock %} |
|
96 |