1 {% extends "base.html" %} |
1 {% extends "base.html" %} |
2 {% load i18n %} |
2 {% load i18n %} |
3 {% load static %} |
3 {% load static %} |
4 {% load thumbnail %} |
4 {% load thumbnail %} |
5 |
5 |
6 {% block title %}{{block.super}} > Liste des Renkans publiques{% endblock %} |
6 {% block title %}{{block.super}} > {% trans 'Public Renkans list' %}{% endblock %} |
7 |
7 |
8 {% block css_import %} |
8 {% block css_import %} |
9 {{block.super}} |
9 {{block.super}} |
10 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/index.css' %}" /> |
10 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/index.css' %}" /> |
11 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" /> |
11 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/ui-lightness/jquery-ui-1.10.4.min.css' %}" /> |
12 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" /> |
12 <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" /> |
13 {% endblock %} |
13 {% endblock %} |
14 |
14 |
15 {% block renkans_actif %}actif{% endblock %} |
15 {% block renkans_actif %}actif{% endblock %} |
16 |
16 |
|
17 {% block js_import %} |
|
18 {{block.super}} |
|
19 <script src="{% static 'hdalab/lib/jquery-ui-1.10.4.min.js' %}"></script> |
|
20 <script type="text/javascript"> |
|
21 $(document).ready(function() { |
|
22 $("#toggle-search").click(function(){ |
|
23 $("#advanced-form").toggle(); |
|
24 }); |
|
25 $(".date").datepicker({ dateFormat: 'yy-mm-dd' }); |
|
26 }); |
|
27 </script> |
|
28 {% endblock %} |
|
29 |
17 {% block main_content %} |
30 {% block main_content %} |
18 <h2>Liste des renkans publics</h2> |
31 <h2>{% trans 'Public Renkans list' %}</h2> |
19 <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 %} |
32 <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 %} |
20 {% 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> |
33 {% 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> |
21 <form class="inline"><p>{% if page.has_previous or page.has_next %} - {% endif %}{% trans 'Filter' %} : <input type="text" name="title" value="{{ title }}"/></p></form> |
34 <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> |
|
35 <form id="advanced-form" style="display: {% if startdate != '' or enddate != '' or username != '' or state != '' %}block{% else %}none{% endif %};"> |
|
36 <p>{% trans 'Title' %} : <input type="text" name="title" value="{{ title }}"/></p> |
|
37 <p>{% trans 'Modification date' %} : {% trans 'begin' %} <input type="text" name="startdate" value="{{ startdate }}" class="date" /> - |
|
38 {% trans 'end' %} : <input type="text" name="enddate" value="{{ enddate }}" class="date" /></p> |
|
39 <p>{% trans 'Username' %} : <input type="text" name="username" value="{{ username }}"/></p> |
|
40 <p><input type="submit" value="{% trans 'Search' %}"/></p> |
|
41 </form> |
22 <table id="rk-table"> |
42 <table id="rk-table"> |
23 <thead> |
43 <thead> |
24 <tr class="border_bottom"> |
44 <tr class="border_bottom"> |
25 <th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a> |
45 <th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a> |
26 {% 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> |
46 {% 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> |
|
47 <th><a href="?sort=user&order={% if sort_param == 'user' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'User' %}</a> |
|
48 {% if sort_param == 'user' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th> |
27 <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
49 <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
28 {% 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> |
50 {% 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> |
29 <th>Preview</th><th>Actions</th></tr> |
51 <th>Preview</th><th>Actions</th></tr> |
30 </thead> |
52 </thead> |
31 <tbody> |
53 <tbody> |
32 {% for hr in page.object_list %} |
54 {% for hr in page.object_list %} |
33 {% with hr.renkan as r %} |
55 {% with hr.renkan as r %} |
34 <tr class="border_bottom"> |
56 <tr class="border_bottom"> |
35 <td>{{ r.title }}</td> |
57 <td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td> |
|
58 <td>{{ r.owner.username }}</td> |
36 <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td> |
59 <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td> |
37 <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td> |
60 <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td> |
38 <td> |
61 <td> |
39 <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> |
62 <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> |
40 <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> |
63 <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> |