| author | rougeronj |
| Thu, 29 Jan 2015 17:23:04 +0100 | |
| changeset 435 | 0116feeb4fa3 |
| parent 396 | 064f4cdc48c3 |
| child 458 | 604b887e70c3 |
| permissions | -rw-r--r-- |
| 301 | 1 |
{% extends "base.html" %} |
2 |
{% load i18n %} |
|
3 |
{% load static %} |
|
4 |
{% load thumbnail %} |
|
5 |
||
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
6 |
{% block title %}{{block.super}} > {% trans 'Public Renkans list' %}{% endblock %} |
| 301 | 7 |
|
8 |
{% block css_import %} |
|
9 |
{{block.super}} |
|
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' %}" /> |
|
12 |
<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/profile.css' %}" /> |
|
13 |
{% endblock %} |
|
14 |
||
15 |
{% block renkans_actif %}actif{% endblock %} |
|
16 |
||
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
17 |
{% block js_import %} |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
18 |
{{block.super}} |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
19 |
<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
|
20 |
<script type="text/javascript"> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
21 |
$(document).ready(function() { |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
22 |
$("#toggle-search").click(function(){ |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
23 |
$("#advanced-form").toggle(); |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
24 |
}); |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
25 |
$(".date").datepicker({ dateFormat: 'yy-mm-dd' }); |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
26 |
}); |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
27 |
</script> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
28 |
{% endblock %} |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
29 |
|
| 301 | 30 |
{% 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
|
31 |
<div class="all-title"> |
|
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 |
<h1>{% trans 'Public Renkans list' %}</h1> |
|
064f4cdc48c3
Set up css convention for the main titles of the pages and add translation support in main pages
rougeronj
parents:
344
diff
changeset
|
33 |
</div> |
|
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 |
|
| 343 | 35 |
<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 %} |
36 |
{% 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> |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
37 |
<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> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
38 |
<form id="advanced-form" style="display: {% if startdate != '' or enddate != '' or username != '' or state != '' %}block{% else %}none{% endif %};"> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
39 |
<p>{% trans 'Title' %} : <input type="text" name="title" value="{{ title }}"/></p> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
40 |
<p>{% trans 'Modification date' %} : {% trans 'begin' %} <input type="text" name="startdate" value="{{ startdate }}" class="date" /> - |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
41 |
{% trans 'end' %} : <input type="text" name="enddate" value="{{ enddate }}" class="date" /></p> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
42 |
<p>{% trans 'Username' %} : <input type="text" name="username" value="{{ username }}"/></p> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
43 |
<p><input type="submit" value="{% trans 'Search' %}"/></p> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
44 |
</form> |
| 301 | 45 |
<table id="rk-table"> |
46 |
<thead> |
|
| 331 | 47 |
<tr class="border_bottom"> |
| 343 | 48 |
<th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a> |
| 331 | 49 |
{% 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> |
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
50 |
<th><a href="?sort=user&order={% if sort_param == 'user' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'User' %}</a> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
51 |
{% 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> |
| 343 | 52 |
<th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
| 331 | 53 |
{% 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> |
54 |
<th>Preview</th><th>Actions</th></tr> |
|
| 301 | 55 |
</thead> |
56 |
<tbody> |
|
| 331 | 57 |
{% for hr in page.object_list %} |
| 301 | 58 |
{% with hr.renkan as r %} |
59 |
<tr class="border_bottom"> |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
60 |
<td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
61 |
<td>{{ r.owner.username }}</td> |
| 301 | 62 |
<td>{{ r.modification_date|date:"Y-m-d H:i" }}</td> |
63 |
<td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td> |
|
64 |
<td> |
|
65 |
<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> |
|
66 |
<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> |
|
67 |
</td> |
|
68 |
</tr> |
|
69 |
{% endwith %} |
|
70 |
{% endfor %} |
|
71 |
</tbody> |
|
72 |
</table> |
|
| 343 | 73 |
<p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{{ filters }}" >{% trans 'Previous' %}</a>{% endif %} |
74 |
{% 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> |
|
| 301 | 75 |
{% endblock %} |