src/egonomy/templates/egonomy_annotate_picture.html
author cavaliet
Tue, 02 Jul 2013 13:16:00 +0200
changeset 212 2cca82dd0e79
parent 175 8f6eef1d1fc8
child 213 6655617f3d92
permissions -rw-r--r--
add arrows and search management with pictures.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
     1
{% extends "egonomy_newbase.html" %}
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
     2
{% load static %}
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
     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 %}
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
     5
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
     6
{% block title %}{% trans "Annotate a picture" %}{% endblock %}
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
     7
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
     8
{% block css_page %}
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
     9
    <link rel="stylesheet" href="{% static 'egonomy/css/slideshow.css' %}" />
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    10
{% endblock %}
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    11
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    12
{% block content %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    13
            <div class="title-page">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    14
                <h2>{{ img.metadata.titre|default:_("No title") }}</h2>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    15
            </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    16
            <div class="bar-tools clearfix">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    17
                <ul class="clearfix left">
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    18
                    <!--li><a class="go-to mosaic" href="#"></a></li-->
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    19
                    {% if search %}
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    20
                    <li><a class="go-to search" href="{% url 'all_pictures' %}?search={{ search }}"></a></li>
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    21
                    {% endif %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    22
                </ul>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    23
                <ul class="clearfix">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    24
                    <li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    25
                        <a class="icon cut" href="{% url 'create_fragment' image_id=img.id %}">{% trans "Create a fragment" %}</a>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    26
                    </li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    27
                    <li>
149
af59627418e7 view fragment with new style
cavaliet
parents: 144
diff changeset
    28
                      {% if user.is_authenticated %}
168
c90576d18319 argumentaire/list collection view
cavaliet
parents: 159
diff changeset
    29
                        <a class="icon plus open-popin additemtocollection" data-type="image" data-id="{{ img.id }}" href="#add-to-collection">{% trans "Add to a collection" %}</a>
149
af59627418e7 view fragment with new style
cavaliet
parents: 144
diff changeset
    30
                      {% else %}
159
b98558f8d2c1 collection first step
cavaliet
parents: 149
diff changeset
    31
                        <a class="icon plus" href="{% url 'login' %}?next={% url 'annotate_picture' image_id=img.id %}">{% trans "Add to a collection" %}</a>
149
af59627418e7 view fragment with new style
cavaliet
parents: 144
diff changeset
    32
                      {% endif %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    33
                    </li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    34
                    <!--li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    35
                        <form action="#">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    36
                            <p>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    37
                                <input class="search-form" id="id_search" type="text" placeholder="Romantisme noir">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    38
                            </p>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    39
                        </form>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    40
                    </li-->
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    41
                </ul>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    42
            </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    43
            <article class="edition">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    44
                <div class="slideshow box-edition">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    45
                    <div class="image-wrap">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    46
                        {% with img.info.image_file as image %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    47
                        {% if image|is_portrait %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    48
                         {% thumbnail image "x600" format="PNG" crop="center" as im %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    49
                          <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    50
                         {% empty %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    51
                          <img src="{% static 'egonomy/img/empty.gif' %}" width="600" height="600" class="placeholder" />
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    52
                         {% endthumbnail %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    53
                        {% else %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    54
                         {% thumbnail image "600" format="PNG" crop="center" as im %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    55
                          <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    56
                         {% empty %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    57
                          <img src="{% static 'egonomy/img/empty.gif' %}" width="600" height="600" class="placeholder" />
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    58
                         {% endthumbnail %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    59
                        {% endif %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    60
                        {% endwith %}
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    61
                    </div>
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    62
                  {% if search %}
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    63
                    {% if index_search|add:1 > 1 %}{# i know it's weird but "if index_search > 0" doesn't work #}
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    64
                    <div class="arrow-wrap left-arrow">
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    65
                        <a class="arrow" href="{% url 'picture_by_search' %}?search={{ search }}&index_search={{ index_search|add:-1 }}"></a>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    66
                    </div>
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    67
                    {% endif %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    68
                    <div class="arrow-wrap right-arrow">
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    69
                        <a class="arrow" href="{% url 'picture_by_search' %}?search={{ search }}&index_search={{ index_search|add:1 }}"></a>
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    70
                    </div>
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
    71
                  {% endif %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    72
                    <ul class="share">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    73
                        <li><a title="Partager sur Twitter" href="#" class="tool twitter"></a></li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    74
                        <li><a title="Partager sur Facebook" href="#" class="tool facebook"></a></li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    75
                    </ul>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    76
                </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    77
                <div class="info box-edition">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    78
                    <table>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
    79
                        <tbody>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    80
                            <tr>
15
64284803db94 view and create fragment views added
cavaliet
parents: 9
diff changeset
    81
                                <th>{% trans "Description" %}&nbsp;:</th>
51
d842aad55f81 clean default values in templates
cavaliet
parents: 48
diff changeset
    82
                                <td>{{ img.metadata.description|default:"" }}</td>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    83
                            </tr>
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    84
                            <tr>
15
64284803db94 view and create fragment views added
cavaliet
parents: 9
diff changeset
    85
                                <th>{% trans "Author" %}&nbsp;:</th>
51
d842aad55f81 clean default values in templates
cavaliet
parents: 48
diff changeset
    86
                                <td>{{ img.metadata.auteur|default:"" }}</td>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    87
                            </tr>
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    88
                            <tr>
15
64284803db94 view and create fragment views added
cavaliet
parents: 9
diff changeset
    89
                                <th>{% trans "Period" %}&nbsp;:</th>
51
d842aad55f81 clean default values in templates
cavaliet
parents: 48
diff changeset
    90
                                <td>{{ img.metadata.periode|default:"" }}</td>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    91
                            </tr>
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    92
                            <tr>
15
64284803db94 view and create fragment views added
cavaliet
parents: 9
diff changeset
    93
                                <th>{% trans "Production site" %}&nbsp;:</th>
51
d842aad55f81 clean default values in templates
cavaliet
parents: 48
diff changeset
    94
                                <td>{{ img.metadata.site|default:"" }}</td>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    95
                            </tr>
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    96
                            <tr>
15
64284803db94 view and create fragment views added
cavaliet
parents: 9
diff changeset
    97
                                <th>{% trans "Localization" %}&nbsp;:</th>
104
fc6d71473359 little correction
cavaliet
parents: 79
diff changeset
    98
                                <td>{{ img.metadata.localisation|default:"" }}</td>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
    99
                            </tr>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   100
                        </tbody>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   101
                    </table>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   102
                </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   103
                <div class="box-edition">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   104
                    <h3>{% trans "Keywords" %} :</h3>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   105
                    <ul class="list-key-search list-keywords clearfix">
175
8f6eef1d1fc8 collection available in list and mosaic
cavaliet
parents: 168
diff changeset
   106
                        {% for t in img.metadata.tag_list %}
212
2cca82dd0e79 add arrows and search management with pictures.
cavaliet
parents: 175
diff changeset
   107
                        {% if t != "" %}<li><a class="box-shadow-2" href='{% url "all_pictures" %}?field=all&search="{{ t }}"'>{{ t }}</a></li>{% endif %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   108
                        {% endfor %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   109
                    </ul>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
   110
                </div>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   111
                <div class="box-edition">
144
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   112
                    <h3>{% trans "Fragments from this picture" %} :</h3>
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   113
                    {% if fragment_list %}
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   114
                    <ul class="fullwidth clearfix">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   115
                      {% for fragment in fragment_list %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   116
                        <li class="subcol subcol-seventh">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   117
                            <a href="{% url 'view_fragment' fragment_pk=fragment.pk  %}">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   118
                            <div class="center-image">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   119
                                <div class="image-and-fragment">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   120
                                 {% include "partial/picture_and_red_fragment.html" %}
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
   121
                                </div>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   122
                            </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   123
                            <h3>{{ fragment.title }}</h3></a>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   124
                            <p>{% trans "Annotated by" %} <strong><a href="{% url 'user_fragments' username=fragment.author %}">{{ fragment.author }}</a></strong></p>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   125
                        </li>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   126
                      {% endfor %}
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   127
                    </ul>
144
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   128
                    {% else %}
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   129
                    <p class="null">{% trans "No fragment" %}</p>
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   130
                    {% endif %}
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
   131
                </div>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   132
                <div class="box-edition">
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   133
                    <h3>Collections liées à cette image :</h3>
144
bf13361c0fee create and modify fragment
cavaliet
parents: 140
diff changeset
   134
                    <p class="null">{% trans "No collection" %}</p>
140
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   135
                </div>
bfe995fae627 update js and new view image template
cavaliet
parents: 104
diff changeset
   136
            </article>
9
aee87529a698 first views with empty templates
cavaliet
parents:
diff changeset
   137
{% endblock %}