| author | rougeronj |
| Fri, 06 Mar 2015 17:17:38 +0100 | |
| changeset 490 | 97afeb38e259 |
| parent 473 | f469ab22542d |
| child 519 | 9dc050cf904b |
| 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 |
||
| 473 | 15 |
{% block renkans_actif %}{% if not hide_favorite %}actif{% endif %}{% endblock %} |
| 301 | 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> |
| 473 | 20 |
<script src="{% static 'hdalab/js/renkan-search.js' %}"></script> |
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
21 |
<script type="text/javascript"> |
| 473 | 22 |
var favorite = {{favorite}}; |
23 |
initSearch(favorite); |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
24 |
</script> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
25 |
{% endblock %} |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
26 |
|
| 301 | 27 |
{% 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
|
28 |
<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
|
29 |
<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
|
30 |
</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
|
31 |
|
| 343 | 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 %} |
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> |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
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> |
|
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
35 |
<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
|
36 |
<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
|
37 |
<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
|
38 |
{% 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
|
39 |
<p>{% trans 'Username' %} : <input type="text" name="username" value="{{ username }}"/></p> |
| 473 | 40 |
{% if not hide_favorite %} |
41 |
<p>{% trans 'Favorite' %} : <input type="checkbox" id="filter-favorite-chkbx" {% if favorite >= 1 %} checked="checked" {% endif %} value="{{favorite}}" /><input type="hidden" id="filter-favorite" name="favorite" value="{{favorite}}"/></p> |
|
42 |
{% endif %} |
|
|
344
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> |
| 473 | 50 |
{% if not hide_favorite %} |
51 |
<th><a href="?sort=favorite&order={% if sort_param == 'favorite' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Fav.' %}</a> |
|
52 |
{% if sort_param == 'favorite' %}<span class="ui-icon {% if opposite == 'asc' %}ui-icon-triangle-1-s{% else %}ui-icon-triangle-1-n{% endif %}"></span>{% endif %}</th> |
|
53 |
{% endif %} |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
54 |
<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
|
55 |
{% 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 | 56 |
<th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
| 331 | 57 |
{% 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> |
58 |
<th>Preview</th><th>Actions</th></tr> |
|
| 301 | 59 |
</thead> |
60 |
<tbody> |
|
| 331 | 61 |
{% for hr in page.object_list %} |
| 301 | 62 |
{% with hr.renkan as r %} |
63 |
<tr class="border_bottom"> |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
64 |
<td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td> |
| 473 | 65 |
{% if not hide_favorite %} |
66 |
<td>{% if hr.favorite %}✓{% else %} {% endif %}</td> |
|
67 |
{% endif %} |
|
|
344
1473ba25af1f
advanced search in all renkan lists, language update and debug
cavaliet
parents:
343
diff
changeset
|
68 |
<td>{{ r.owner.username }}</td> |
| 301 | 69 |
<td>{{ r.modification_date|date:"Y-m-d H:i" }}</td> |
70 |
<td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td> |
|
71 |
<td> |
|
72 |
<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> |
|
|
458
604b887e70c3
add state history to renkan, correct get into post, generally prepare ground for mail management
ymh <ymh.work@gmail.com>
parents:
396
diff
changeset
|
73 |
<form action="{% url 'renkan_copy' rk_id=r.rk_id %}" method="post"> |
|
604b887e70c3
add state history to renkan, correct get into post, generally prepare ground for mail management
ymh <ymh.work@gmail.com>
parents:
396
diff
changeset
|
74 |
{% csrf_token %} |
|
604b887e70c3
add state history to renkan, correct get into post, generally prepare ground for mail management
ymh <ymh.work@gmail.com>
parents:
396
diff
changeset
|
75 |
<input type="hidden" name="next" value="{% url 'profile_home' %}" /> |
|
604b887e70c3
add state history to renkan, correct get into post, generally prepare ground for mail management
ymh <ymh.work@gmail.com>
parents:
396
diff
changeset
|
76 |
<button title="Copy renkan" 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></button> |
|
604b887e70c3
add state history to renkan, correct get into post, generally prepare ground for mail management
ymh <ymh.work@gmail.com>
parents:
396
diff
changeset
|
77 |
</form> |
| 301 | 78 |
</td> |
79 |
</tr> |
|
80 |
{% endwith %} |
|
81 |
{% endfor %} |
|
82 |
</tbody> |
|
83 |
</table> |
|
| 343 | 84 |
<p>{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}&sort={{ sort_param }}&order={{ order_param }}{{ filters }}" >{% trans 'Previous' %}</a>{% endif %} |
85 |
{% 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 | 86 |
{% endblock %} |