Author
|
zPlus <zplus@peers.community>
2018-07-23 13:25:30
|
Committer
|
zPlus <zplus@peers.community>
2018-07-23 13:25:30
|
Commit
|
bd265f4
(patch)
|
Tree
|
63ca811
|
Parent(s)
|
|
Fix pagination.
modified: freepost/static/stylus/freepost.styl
modified: freepost/static/stylus/reset.styl
modified: freepost/templates/posts.html
modified: freepost/templates/vote.html
commits diff:
d4dbdc6..bd265f4
4 files changed,
46 insertions,
25 deletions
—
download
Diffstat
Diff options
+5/-3
M freepost/static/stylus/freepost.styl
+3/-0
M freepost/static/stylus/reset.styl
+34/-18
M freepost/templates/posts.html
50
|
50
|
|
</time>
|
51
|
51
|
|
</a>
|
52
|
52
|
|
</em>
|
|
53
|
+ |
|
53
|
54
|
|
by
|
|
55
|
+ |
|
54
|
56
|
|
<a href="{{ url ('user_public', username=post.username) }}">
|
55
|
57
|
|
{{ post.username }}
|
56
|
58
|
|
</a>
|
|
59
|
+ |
|
57
|
60
|
|
—
|
|
61
|
+ |
|
58
|
62
|
|
<a href="{{ url ('post', hash_id=post.hashId) }}#comments">
|
59
|
63
|
|
{% if post.commentsCount > 0 %}
|
60
|
64
|
|
{{ post.commentsCount }} comments
|
68
|
72
|
|
|
69
|
73
|
|
{% endfor %}
|
70
|
74
|
|
|
71
|
|
- |
<form class="pagination">
|
72
|
|
- |
{% for key, value in request.query.items () %}
|
73
|
|
- |
<input type="hidden" name="{{ key }}" value="{{ value }}" />
|
74
|
|
- |
{% endfor %}
|
75
|
|
- |
|
|
75
|
+ |
<div class="pagination">
|
76
|
76
|
|
{% if page_number > 0 %}
|
77
|
|
- |
<button type="submit"
|
78
|
|
- |
name="page"
|
79
|
|
- |
value="{{ page_number - 1 }}"
|
80
|
|
- |
class="button button_default1">
|
81
|
|
- |
Previous
|
82
|
|
- |
</button>
|
|
77
|
+ |
<form>
|
|
78
|
+ |
{% for key, value in request.query.items () %}
|
|
79
|
+ |
{% if key != 'page' %}
|
|
80
|
+ |
<input type="hidden" name="{{ key }}" value="{{ value }}" />
|
|
81
|
+ |
{% endif %}
|
|
82
|
+ |
{% endfor %}
|
|
83
|
+ |
|
|
84
|
+ |
<button type="submit"
|
|
85
|
+ |
name="page"
|
|
86
|
+ |
value="{{ page_number - 1 }}"
|
|
87
|
+ |
class="button button_default1">
|
|
88
|
+ |
Previous
|
|
89
|
+ |
</button>
|
|
90
|
+ |
</form>
|
83
|
91
|
|
{% endif %}
|
84
|
92
|
|
|
85
|
93
|
|
{% if page_number > 0 %}
|
89
|
97
|
|
{% endif %}
|
90
|
98
|
|
|
91
|
99
|
|
{% if posts %}
|
92
|
|
- |
<button type="submit"
|
93
|
|
- |
name="page"
|
94
|
|
- |
value="{{ page_number + 1 }}"
|
95
|
|
- |
class="button button_default1">
|
96
|
|
- |
Next
|
97
|
|
- |
</button>
|
|
100
|
+ |
<form>
|
|
101
|
+ |
{% for key, value in request.query.items () %}
|
|
102
|
+ |
{% if key != 'page' %}
|
|
103
|
+ |
<input type="hidden" name="{{ key }}" value="{{ value }}" />
|
|
104
|
+ |
{% endif %}
|
|
105
|
+ |
{% endfor %}
|
|
106
|
+ |
|
|
107
|
+ |
<button type="submit"
|
|
108
|
+ |
name="page"
|
|
109
|
+ |
value="{{ page_number + 1 }}"
|
|
110
|
+ |
class="button button_default1">
|
|
111
|
+ |
Next
|
|
112
|
+ |
</button>
|
|
113
|
+ |
</form>
|
98
|
114
|
|
{% endif %}
|
99
|
|
- |
</form>
|
|
115
|
+ |
</div>
|
100
|
116
|
|
</div>
|
+4/-4
M freepost/templates/vote.html
21
|
21
|
|
⯅
|
22
|
22
|
|
</button>
|
23
|
23
|
|
</form>
|
24
|
|
- |
|
|
24
|
+ |
|
25
|
25
|
|
{# Show number of votes #}
|
26
|
26
|
|
<span class="count">{{ item.vote }}</span>
|
27
|
27
|
|
|
34
|
34
|
|
⯆
|
35
|
35
|
|
</button>
|
36
|
36
|
|
</form>
|
37
|
|
- |
|
|
37
|
+ |
|
38
|
38
|
|
{% else %}
|
39
|
39
|
|
|
40
|
|
- |
{{ item.vote ~ ' vote' ~ ('s' if item.vote != 1 else '') }}
|
41
|
|
- |
|
|
40
|
+ |
{{ item.vote ~ ' vote' ~ ('s' if item.vote != 1) }}
|
|
41
|
+ |
|
42
|
42
|
|
{% endif %}
|
43
|
43
|
|
|
44
|
44
|
|
</span>
|