src/hdalab/templates/profile_home.html
author cavaliet
Fri, 26 Sep 2014 12:55:35 +0200
changeset 342 a0fa17c48236
parent 331 306b95944074
child 343 12b6fc19d78f
permissions -rw-r--r--
title filter on renkan lists (personal, public and admin).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     1
{% extends "base.html" %}
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     2
{% load i18n %}
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     3
{% load static %}
295
af29252631ac renkan object with thumbnail
cavaliet
parents: 294
diff changeset
     4
{% load thumbnail %}
329
ea6268cf8c83 renkan state management for staff members : publish, unpublish, reject.
cavaliet
parents: 302
diff changeset
     5
{% load hdalab_tags %}
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     6
294
6c12ccf29a95 loop on profile's renkans
cavaliet
parents: 293
diff changeset
     7
{% block title %}{{block.super}} > Profil utilisateur : {{ user.username }}{% endblock %}
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     8
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
     9
{% block css_import %}
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    10
{{block.super}}
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    11
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/index.css' %}" />
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    12
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" />
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    13
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" />
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    14
{% endblock %}
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    15
301
3ec8fb1afed8 correct copy and delete renkan
cavaliet
parents: 300
diff changeset
    16
{% block profile_actif %}actif{% endblock %}
3ec8fb1afed8 correct copy and delete renkan
cavaliet
parents: 300
diff changeset
    17
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    18
{% block main_content %}
302
106c33871db4 better presentation and automatic save for renkan from facettes
cavaliet
parents: 301
diff changeset
    19
    <h2>Mon profil</h2>
106c33871db4 better presentation and automatic save for renkan from facettes
cavaliet
parents: 301
diff changeset
    20
    <p><a href="{% url 'renkan_new' %}" >Nouveau Renkan</a> - <a href="{% url 'auth_password_change' %}">Modification du mot de passe</a></p>
106c33871db4 better presentation and automatic save for renkan from facettes
cavaliet
parents: 301
diff changeset
    21
    <p>&nbsp;</p>
106c33871db4 better presentation and automatic save for renkan from facettes
cavaliet
parents: 301
diff changeset
    22
    <p>Mes renkans : </p>
342
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    23
    <p class="inline">{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}" >{% trans 'Previous' %}</a>{% endif %}
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    24
       {% if page.has_previous and page.has_next %} - {% endif %}{% if page.has_next %}<a href="?page={{ page.next_page_number }}&sort={{ sort_param }}&order={{ order_param }}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}">{% trans 'Next' %}</a>{% endif %}</p>
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    25
    <form class="inline"><p>{% if page.has_previous or page.has_next %} - {% endif %}{% trans 'Filter' %} : <input type="text" name="filter" value="{{ filter }}"/></p></form>
300
108fd2717177 new renkan button and table sorter
cavaliet
parents: 299
diff changeset
    26
    <table id="rk-table">
108fd2717177 new renkan button and table sorter
cavaliet
parents: 299
diff changeset
    27
      <thead>
331
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    28
        <tr class="border_bottom">
342
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    29
          <th><a href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}">{% trans 'Title' %}</a>
331
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    30
              {% if sort_param == 'title' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
342
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    31
          <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}">{% trans 'Modification date' %}</a>
331
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    32
              {% if sort_param == 'date' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    33
          <th>{% trans 'Preview' %}</th>
342
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    34
          <th><a href="?sort=state&order={% if sort_param == 'state' %}{{ opposite }}{% else %}asc{% endif %}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}">{% trans 'State' %}</a>
331
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    35
              {% if sort_param == 'state' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th>
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    36
          <th>{% trans 'Actions' %}</th>
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    37
        </tr>
300
108fd2717177 new renkan button and table sorter
cavaliet
parents: 299
diff changeset
    38
      </thead>
108fd2717177 new renkan button and table sorter
cavaliet
parents: 299
diff changeset
    39
      <tbody>
331
306b95944074 pagination for renkan list
cavaliet
parents: 330
diff changeset
    40
      {% for hr in page.object_list %}
299
8e00641076e7 remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents: 298
diff changeset
    41
       {% with hr.renkan as r %}
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    42
        <tr class="border_bottom">
329
ea6268cf8c83 renkan state management for staff members : publish, unpublish, reject.
cavaliet
parents: 302
diff changeset
    43
            <td>{{ r.title }}</td>
294
6c12ccf29a95 loop on profile's renkans
cavaliet
parents: 293
diff changeset
    44
            <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td>
295
af29252631ac renkan object with thumbnail
cavaliet
parents: 294
diff changeset
    45
            <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td>
329
ea6268cf8c83 renkan state management for staff members : publish, unpublish, reject.
cavaliet
parents: 302
diff changeset
    46
            <td>{{ hr.state|state_to_str }}</td>
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    47
            <td>
330
5c171e379ea2 debug delete and disable edit when necessary
cavaliet
parents: 329
diff changeset
    48
                {% if hr.state == 1 %}<a title="Edit renkan" href="{% url 'renkan_edit' %}?rk_id={{ r.rk_id }}" class="renkan-basic-action"><span class="ui-icon ui-icon-pencil"></span></a>
5c171e379ea2 debug delete and disable edit when necessary
cavaliet
parents: 329
diff changeset
    49
                {% else %}<span class="ui-icon ui-icon-blank renkan-basic-action"></span>{% endif %}
298
8234cb238783 renkan view first step
cavaliet
parents: 297
diff changeset
    50
                <a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}" class="renkan-basic-action"><span class="ui-icon ui-icon-eye"></span></a>
299
8e00641076e7 remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents: 298
diff changeset
    51
                <a title="Copy renkan" href="{% url 'renkan_copy' rk_id=r.rk_id %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to copy this renkan ?" %}');" ><span class="ui-icon ui-icon-copy"></span></a>
8e00641076e7 remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents: 298
diff changeset
    52
                <a title="Remove renkan" href="{% url 'renkan_delete' rk_id=r.rk_id %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to delete this renkan ? You cannot undo this action." %}');" ><span class="ui-icon ui-icon-trash"></span></a>
329
ea6268cf8c83 renkan state management for staff members : publish, unpublish, reject.
cavaliet
parents: 302
diff changeset
    53
                {% if hr.state == 1 %}<a title="Publish renkan" href="{% url 'renkan_moderate' rk_id=r.rk_id state=2 %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to ask to publish this renkan ?" %}');" ><span class="ui-icon ui-icon-unlocked"></span></a>
ea6268cf8c83 renkan state management for staff members : publish, unpublish, reject.
cavaliet
parents: 302
diff changeset
    54
                {% else %}<a title="Unpublish renkan" href="{% url 'renkan_moderate' rk_id=r.rk_id state=1 %}?next={% url 'profile_home' %}" class="renkan-basic-action" onclick="return confirm('{% trans "Are you sure you want to unpublish this renkan ?" %}');" ><span class="ui-icon ui-icon-locked"></span></a>{% endif %}
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    55
            </td>
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    56
        </tr>
299
8e00641076e7 remove renkan management to an other django app (see renkan hg repo)
cavaliet
parents: 298
diff changeset
    57
       {% endwith %}
294
6c12ccf29a95 loop on profile's renkans
cavaliet
parents: 293
diff changeset
    58
      {% endfor %}
300
108fd2717177 new renkan button and table sorter
cavaliet
parents: 299
diff changeset
    59
      </tbody>
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    60
    </table>
342
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    61
    <p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}" >{% trans 'Previous' %}</a>{% endif %}
a0fa17c48236 title filter on renkan lists (personal, public and admin).
cavaliet
parents: 331
diff changeset
    62
       {% if page.has_previous and page.has_next %} - {% endif %}{% if page.has_next %}<a href="?page={{ page.next_page_number }}&sort={{ sort_param }}&order={{ order_param }}{% if filter|length > 0 %}&filter={{ filter }}{% endif %}">{% trans 'Next' %}</a>{% endif %}</p>
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    63
{% endblock %}