src/iconolab/templates/partials/user_pages/annotations_commented_panel.html
author durandn
Wed, 09 Nov 2016 14:16:49 +0100
changeset 238 ad770589f0fe
child 249 cd89d284079e
permissions -rw-r--r--
Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
238
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     1
{% load thumbnail %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     2
{% load iconolab_tags %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     3
{% with annotation_data.annotation_obj as annotation %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     4
<li>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     5
  <div class="panel panel-default annotation-panel">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     6
    <div class="panel-heading">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     7
      {% if annotation.current_revision.title %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     8
        {{annotation.current_revision.title}} 
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
     9
      {% else %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    10
        <i>Annotation sans titre</i>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    11
      {% endif %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    12
    </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    13
    <div class="panel-content">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    14
      <div style="position:relative" class="{% if large_image %}large-{% endif %}image-detail">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    15
      {% if large_image %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    16
        {% thumbnail annotation.image.media "450x450" crop=False as im %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    17
          <a href="{% url 'annotation_detail' annotation.image.item.collection.name annotation.image.image_guid annotation.annotation_guid %}">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    18
            <img v-el:small-image src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    19
            <svg width="{{ im.width }}" height="{{ im.height }}" version="1.1" style="position:absolute; top:0px; left: 0px">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    20
              <g transform="matrix({% transform_matrix im_width=im.width im_height=im.height max_x=100 max_y=100 %})">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    21
                <path d="{{ annotation.current_revision.fragment|clean_path }}" opacity="0.7" fill="orange"></path>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    22
              </g>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    23
            </svg>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    24
          </a>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    25
        {% endthumbnail %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    26
      {% else %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    27
        {% thumbnail annotation.image.media "150x150" crop=False as im %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    28
        <a href="{% url 'annotation_detail' annotation.image.item.collection.name annotation.image.image_guid annotation.annotation_guid %}">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    29
            <img v-el:small-image src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    30
            <svg width="{{ im.width }}" height="{{ im.height }}" version="1.1" style="position:absolute; top:0px; left: 0px">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    31
              <g transform="matrix({% transform_matrix im_width=im.width im_height=im.height max_x=100 max_y=100 %})">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    32
                <path d="{{ annotation.current_revision.fragment|clean_path }}" opacity="0.7" fill="orange"></path>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    33
              </g>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    34
            </svg>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    35
          </a>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    36
        {% endthumbnail %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    37
      {% endif %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    38
      </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    39
      <div class="annotation-detail">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    40
        <dl class="dl-horizontal">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    41
          <dt>Total commentaires : </dt>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    42
          <dd><span class="badge">{{annotation.stats.comments_count}}</span></dd>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    43
          <dt>.. Ecrits par {{user.username}} : </dt>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    44
          <dd><span class="badge badge-warning">{{annotation_data.comment_count_for_user}}</span></dd>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    45
          <dt>A commenté le : </dt>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    46
          <dd>{{annotation_data.latest_comment_date}}</dd>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    47
        </dl>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    48
        <a class="btn btn-default btn-sm userpage-annotation-btn pull-left" href="{% url 'annotation_detail' annotation.image.item.collection.name annotation.image.image_guid annotation.annotation_guid %}">Voir annotation</a>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    49
      </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    50
      {% if with_stats %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    51
      <div class="stats-annotation-userpage">
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    52
        {% include "partials/annotation_stats_panel.html" with annotation=annotation label="Statistiques sur cette annotation:" %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    53
      </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    54
      {% endif %}
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    55
    </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    56
  </div>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    57
</li>
ad770589f0fe Work on admin interface and user pages + added stat metacategories count for annotations + refactored views module #41
durandn
parents:
diff changeset
    58
{% endwith %}