src/hdalab/templates/profile_home.html
author cavaliet
Mon, 21 Jul 2014 17:44:56 +0200
changeset 300 108fd2717177
parent 299 8e00641076e7
child 301 3ec8fb1afed8
permissions -rw-r--r--
new renkan button and table sorter

{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load thumbnail %}

{% block title %}{{block.super}} > Profil utilisateur : {{ user.username }}{% endblock %}

{% block css_import %}
{{block.super}}
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/index.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" />
{% endblock %}

{% block js_import %}
{{block.super}}
    <script src="{% static 'hdalab/js/profile.js' %}"></script>
    <script src="{% static 'hdalab/lib/jquery.tablesorter.min.js' %}"></script>
    <script type="text/javascript">
    $(document).ready(function(){ 
        console.log("hi");
        $("#rk-table").tablesorter({headers: { 2: { sorter: false }, 4: { sorter: false } }}); 
    });
    </script>
{% endblock %}

{% block main_content %}
    <h2>Votre profil</h2>
    <p><a href="{% url 'renkan_new' %}" >Nouveau Renkan</a></p>
    <p>Vos renkans : </p>
    <table id="rk-table">
      <thead>
        <tr class="border_bottom"><th>Nom</th><th>Date de modification</th><th>Preview</th><th>Statut</th><th>Actions</th></tr>
      </thead>
      <tbody>
      {% for hr in renkan_list %}
       {% with hr.renkan as r %}
        <tr class="border_bottom">
            <td>{{ r.title }} ({{ r.id }})</td>
            <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td>
            <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td>
            <td>{{ hr.state }}</td>
            <td>
                <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>
                <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>
                <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>
                <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>
            </td>
        </tr>
       {% endwith %}
      {% endfor %}
      </tbody>
    </table>
    <p>Gestion du mot de passe : <a href="{% url 'auth_password_change' %}">modification</a></p>
{% endblock %}