| author | cavaliet |
| Mon, 25 Feb 2013 18:32:06 +0100 | |
| changeset 69 | 412ab5e76c65 |
| parent 67 | a085d708c407 |
| child 74 | 5a3d8a3eb34d |
| permissions | -rw-r--r-- |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
1 |
{% extends "egonomy_base.html" %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
2 |
{% load static %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
3 |
{% load i18n %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
4 |
{% load thumbnail %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
5 |
{% load navigation %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
6 |
|
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
7 |
{% block title %}{% trans "All fragments" %}{% endblock %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
8 |
|
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
9 |
{% block content %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
10 |
<div class="fullwidth"> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
11 |
<div class="fullwidth"> |
|
43
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
12 |
{% if search %} |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
13 |
{% ifequal nb_results 0 %} |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
14 |
<h2>{% trans "No results for" %} « {{ search }} » |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
15 |
{% else %} |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
16 |
<h2>{% trans "Search results for" %} « {{ search }} » : |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
17 |
{% endifequal %} |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
18 |
<span class="right"><a href="{% url 'all_fragments' %}" alt="{% trans "All fragments" %}">{% trans "All fragments" %}</a></span></h2> |
| 67 | 19 |
{% elif user_fragments %} |
|
69
412ab5e76c65
Clickable tags to easily add tags from rmn and pertimm.
cavaliet
parents:
67
diff
changeset
|
20 |
<h2>{% trans "Fragments created by" %} : {{ username }} |
| 67 | 21 |
<span class="right"><a href="{% url 'all_fragments' %}" alt="{% trans "All fragments" %}">{% trans "All fragments" %}</a></span></h2> |
|
43
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
22 |
{% else %} |
| 67 | 23 |
<h2>{% trans "All fragments" %}</h2> |
|
43
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
24 |
{% endif %} |
|
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
25 |
{% if nb_pages %}<p>{% build_pagination nb_pages cur_page_nb url_pagination "contents_page clickable" %}</p>{% endif %} |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
26 |
<ul class="fullwidth"> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
27 |
{% for frg in results %} |
| 35 | 28 |
<li class="subcol subcol-eighth"> |
| 30 | 29 |
<a href="{% url 'view_fragment' fragment_pk=frg.pk %}"> |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
30 |
<div class="center-image"> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
31 |
<div class="image-and-fragment"> |
| 47 | 32 |
{% with frgmt=frg.object|default:frg %}{# frg.object in search case, frg otherwise #} |
| 45 | 33 |
{% with image=frgmt.image.info.image_file %} |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
34 |
{% if image %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
35 |
{% if image|is_portrait %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
36 |
{% thumbnail image "x110" format="PNG" crop="center" as im %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
37 |
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
38 |
{% empty %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
39 |
<img src="{% static 'egonomy/img/empty.gif' %}" width="110" height="110" class="placeholder" /> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
40 |
{% endthumbnail %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
41 |
{% else %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
42 |
{% thumbnail image "110" format="PNG" crop="center" as im %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
43 |
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
44 |
{% empty %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
45 |
<img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" /> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
46 |
{% endthumbnail %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
47 |
{% endif %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
48 |
{% else %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
49 |
<img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" /> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
50 |
{% endif %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
51 |
{% endwith %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
52 |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 1 1" preserveAspectRatio="none"> |
| 45 | 53 |
<path d="{{ frgmt.coordinates }}" stroke="red" stroke-width=".02" fill="red" fill-opacity=".3" /> |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
54 |
</svg> |
| 45 | 55 |
{% endwith %} |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
56 |
</div> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
57 |
</div> |
| 47 | 58 |
<h3>{{ frg.highlighted.title|first|safe|default:frg.title }}</h3></a> |
| 67 | 59 |
<p>{% trans "Annotated by" %} <strong><a href="{% url 'user_fragments' username=frg.author %}">{{ frg.author }}</a></strong></p> |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
60 |
</li> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
61 |
{% endfor %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
62 |
</ul> |
|
43
119cd616faa4
Search fragment works. Highlight needs to be improved.
cavaliet
parents:
35
diff
changeset
|
63 |
{% if nb_pages %}<p>{% build_pagination nb_pages cur_page_nb url_pagination "contents_page clickable" %}</p>{% endif %} |
|
27
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
64 |
</div> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
65 |
</div> |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
66 |
{% endblock %} |
|
daaafc916dc4
Debug in templates. All fragments page added. Language files updated.
cavaliet
parents:
diff
changeset
|
67 |