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 %}{% if not hide_favorite %}actif{% endif %}{% endblock %} |
16 |
16 |
17 {% block js_import %} |
17 {% block js_import %} |
18 {{block.super}} |
18 {{block.super}} |
19 <script src="{% static 'hdalab/lib/jquery-ui-1.10.4.min.js' %}"></script> |
19 <script src="{% static 'hdalab/lib/jquery-ui-1.10.4.min.js' %}"></script> |
|
20 <script src="{% static 'hdalab/js/renkan-search.js' %}"></script> |
20 <script type="text/javascript"> |
21 <script type="text/javascript"> |
21 $(document).ready(function() { |
22 var favorite = {{favorite}}; |
22 $("#toggle-search").click(function(){ |
23 initSearch(favorite); |
23 $("#advanced-form").toggle(); |
|
24 }); |
|
25 $(".date").datepicker({ dateFormat: 'yy-mm-dd' }); |
|
26 }); |
|
27 </script> |
24 </script> |
28 {% endblock %} |
25 {% endblock %} |
29 |
26 |
30 {% block main_content %} |
27 {% block main_content %} |
31 <div class="all-title"> |
28 <div class="all-title"> |
38 <form id="advanced-form" style="display: {% if startdate != '' or enddate != '' or username != '' or state != '' %}block{% else %}none{% endif %};"> |
35 <form id="advanced-form" style="display: {% if startdate != '' or enddate != '' or username != '' or state != '' %}block{% else %}none{% endif %};"> |
39 <p>{% trans 'Title' %} : <input type="text" name="title" value="{{ title }}"/></p> |
36 <p>{% trans 'Title' %} : <input type="text" name="title" value="{{ title }}"/></p> |
40 <p>{% trans 'Modification date' %} : {% trans 'begin' %} <input type="text" name="startdate" value="{{ startdate }}" class="date" /> - |
37 <p>{% trans 'Modification date' %} : {% trans 'begin' %} <input type="text" name="startdate" value="{{ startdate }}" class="date" /> - |
41 {% trans 'end' %} : <input type="text" name="enddate" value="{{ enddate }}" class="date" /></p> |
38 {% trans 'end' %} : <input type="text" name="enddate" value="{{ enddate }}" class="date" /></p> |
42 <p>{% trans 'Username' %} : <input type="text" name="username" value="{{ username }}"/></p> |
39 <p>{% trans 'Username' %} : <input type="text" name="username" value="{{ username }}"/></p> |
|
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 %} |
43 <p><input type="submit" value="{% trans 'Search' %}"/></p> |
43 <p><input type="submit" value="{% trans 'Search' %}"/></p> |
44 </form> |
44 </form> |
45 <table id="rk-table"> |
45 <table id="rk-table"> |
46 <thead> |
46 <thead> |
47 <tr class="border_bottom"> |
47 <tr class="border_bottom"> |
48 <th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a> |
48 <th><a class="" href="?sort=title&order={% if sort_param == 'title' %}{{ opposite }}{% else %}asc{% endif %}{{ filters }}">{% trans 'Title' %}</a> |
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> |
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> |
|
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 %} |
50 <th><a href="?sort=user&order={% if sort_param == 'user' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'User' %}</a> |
54 <th><a href="?sort=user&order={% if sort_param == 'user' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'User' %}</a> |
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> |
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> |
52 <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
56 <th><a href="?sort=date&order={% if sort_param == 'date' %}{{ opposite }}{% else %}desc{% endif %}{{ filters }}">{% trans 'Modification date' %}</a> |
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> |
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> |
54 <th>Preview</th><th>Actions</th></tr> |
58 <th>Preview</th><th>Actions</th></tr> |
56 <tbody> |
60 <tbody> |
57 {% for hr in page.object_list %} |
61 {% for hr in page.object_list %} |
58 {% with hr.renkan as r %} |
62 {% with hr.renkan as r %} |
59 <tr class="border_bottom"> |
63 <tr class="border_bottom"> |
60 <td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td> |
64 <td><a title="View renkan" href="{% url 'renkan_view' %}?rk_id={{ r.rk_id }}">{{ r.title }}</a></td> |
|
65 {% if not hide_favorite %} |
|
66 <td>{% if hr.favorite %}✓{% else %} {% endif %}</td> |
|
67 {% endif %} |
61 <td>{{ r.owner.username }}</td> |
68 <td>{{ r.owner.username }}</td> |
62 <td>{{ r.modification_date|date:"Y-m-d H:i" }}</td> |
69 <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> |
70 <td>{% thumbnail r.image 100x100 as thumb %}<img src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /></td> |
64 <td> |
71 <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> |
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> |