src/hdalab/templates/profile_home.html
author rougeronj
Fri, 12 Dec 2014 11:04:02 +0100
changeset 404 f6b3ecaa3c58
parent 403 7bf61c597cb0
child 405 19d1264a8974
permissions -rw-r--r--
Merge with 4b3a444be84a9edd2f326ed9fe82895a53a66712
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
403
7bf61c597cb0 Add link to Editorialisation in profile page
rougeronj
parents: 400
diff changeset
     7
{% block title %}{{block.super}} > {% trans '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
344
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    18
{% block js_import %}
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    19
{{block.super}}
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    20
<script src="{% static 'hdalab/lib/jquery-ui-1.10.4.min.js' %}"></script>
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    21
<script type="text/javascript">
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    22
    $(document).ready(function() {
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    23
        $("#toggle-search").click(function(){
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    24
            $("#advanced-form").toggle();
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    25
        });
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    26
        $(".date").datepicker({ dateFormat: 'yy-mm-dd' });
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    27
    });
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    28
</script>
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    29
{% endblock %}
1473ba25af1f advanced search in all renkan lists, language update and debug
cavaliet
parents: 343
diff changeset
    30
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
    31
{% block main_content %}
396
064f4cdc48c3 Set up css convention for the main titles of the pages and add translation support in main pages
rougeronj
parents: 344
diff changeset
    32
    <div class="all-title">
398
b7df96dd742f Close ticket #49 - add links to django and renkan admin for authorized users. TODO : improve profile page
rougeronj
parents: 396
diff changeset
    33
    	<h1>{% trans 'Mon profil' %}</h1>
396
064f4cdc48c3 Set up css convention for the main titles of the pages and add translation support in main pages
rougeronj
parents: 344
diff changeset
    34
   	</div>
400
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    35
   	{% if user.is_staff %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    36
   	<div class="sub-content">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    37
    	<h2>/ {% trans 'Adminsitration du Site' %}</h2>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    38
    	  <p>
403
7bf61c597cb0 Add link to Editorialisation in profile page
rougeronj
parents: 400
diff changeset
    39
    	  	<a href="{% url 'manage_renkans' %}" >{% trans 'Administrer les Renkan' %}</a>
7bf61c597cb0 Add link to Editorialisation in profile page
rougeronj
parents: 400
diff changeset
    40
    	  	/ <a href="{% url 'edito_home' %}" >{% trans 'Editorialisation' %}</a>
7bf61c597cb0 Add link to Editorialisation in profile page
rougeronj
parents: 400
diff changeset
    41
    	  	/ <a href="{% url 'admin:index' %}" >{% trans 'Administrer Hdabo' %}</a>
400
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    42
    	  </p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    43
   	</div>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    44
   	{% endif %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    45
   	<div class="sub-content">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    46
    	<h2>/ {% trans 'Modifier mon profil' %}</h2>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    47
		<p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    48
			<a href="{% url 'auth_password_change' %}">Modification du mot de passe</a>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    49
		</p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    50
   	</div>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    51
	<div class="sub-content">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    52
		<h2>/ {% trans 'Gerer mes Renkan' %}</h2>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    53
		<p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    54
    		<a href="{% url 'renkan_new' %}">{% trans 'Nouveau Renkan' %}</a>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    55
   		</p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    56
	    <p class="inline">{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{{ filters }}" >{% trans 'Previous' %}</a>{% endif %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    57
	       {% 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 }}{{ filters }}">{% trans 'Next' %}</a>{% endif %}</p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    58
	    <form class="inline"><p>{% if page.has_previous or page.has_next %} - {% endif %}{% trans 'Filter' %} : <input type="text" name="title" value="{{ title }}"/> - <span class="hand_cursor" id="toggle-search">{% trans 'Advanced search' %}</span></p></p></form>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    59
	    <form id="advanced-form" style="display: {% if startdate != '' or enddate != '' or username != '' or state != '' %}block{% else %}none{% endif %};">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    60
	      <p>{% trans 'Title' %} : <input type="text" name="title" value="{{ title }}"/></p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    61
	      <p>{% trans 'Modification date' %} : {% trans 'begin' %} <input type="text" name="startdate" value="{{ startdate }}" class="date" /> -
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    62
	                                           {% trans 'end' %} : <input type="text" name="enddate" value="{{ enddate }}" class="date" /></p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    63
	      <p>{% trans 'State' %} : 
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    64
	        <select name="state">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    65
	            <option value=""></option>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    66
	            <option value="1"{% if state == '1' %} selected="selected"{% endif %}>{% trans 'Edition' %}</option>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    67
	            <option value="2"{% if state == '2' %} selected="selected"{% endif %}>{% trans 'Moderated' %}</option>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    68
	            <option value="3"{% if state == '3' %} selected="selected"{% endif %}>{% trans 'Published' %}</option>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    69
	            <option value="4"{% if state == '4' %} selected="selected"{% endif %}>{% trans 'Rejected' %}</option>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    70
	        </select>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    71
	      </p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    72
	      <p><input type="submit" value="{% trans 'Search' %}"/></p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    73
	    </form>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    74
	    <table id="rk-table">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    75
	      <thead>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    76
	        <tr class="border_bottom">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    77
	          <th><a href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    78
	              {% 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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    79
	          <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    80
	              {% 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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    81
	          <th>{% trans 'Preview' %}</th>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    82
	          <th><a href="?sort=state&order={% if sort_param == 'state' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'State' %}</a>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    83
	              {% 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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    84
	          <th>{% trans 'Actions' %}</th>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    85
	        </tr>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    86
	      </thead>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    87
	      <tbody>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    88
	      {% for hr in page.object_list %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    89
	       {% with hr.renkan as r %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    90
	        <tr class="border_bottom">
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    91
	            <td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    92
	            <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    93
	            <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    94
	            <td>{{ hr.state|state_to_str }}</td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    95
	            <td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    96
	                {% 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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    97
	                {% else %}<span class="ui-icon ui-icon-blank renkan-basic-action"></span>{% endif %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    98
	                <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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
    99
	                <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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   100
	                <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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   101
	                {% 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>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   102
	                {% 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 %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   103
	            </td>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   104
	        </tr>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   105
	       {% endwith %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   106
	      {% endfor %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   107
	      </tbody>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   108
	    </table>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   109
	    <p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{{ filters }}" >{% trans 'Previous' %}</a>{% endif %}
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   110
	       {% 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 }}{{ filters }}">{% trans 'Next' %}</a>{% endif %}</p>
9b290d5c11d8 Changes profil page and access to admin part (renkan and django). Update interface to be more lisible
rougeronj
parents: 398
diff changeset
   111
	</div>
293
b33caeba7faa profile page first step
cavaliet
parents:
diff changeset
   112
{% endblock %}