mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-03 13:04:46 +00:00
added pagination to styleguide
This commit is contained in:
parent
0dbf00964d
commit
5bd3ebc9d0
2 changed files with 19 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
<li><a href="#typography">Typography</a></li>
|
||||
<li><a href="#help">Help text</a></li>
|
||||
<li><a href="#listings">Listings</a></li>
|
||||
<li><a href="#pagination">Pagination</a></li>
|
||||
<li><a href="#buttons">Buttons</a></li>
|
||||
<li><a href="#dropdowns">Dropdown buttons</a></li>
|
||||
<li><a href="#header">Header</a></li>
|
||||
|
|
@ -175,6 +176,11 @@
|
|||
</table>
|
||||
</section>
|
||||
|
||||
<section id="pagination">
|
||||
<h2>Pagination</h2>
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=fake_pagination linkurl="wagtailadmin_explore" %}
|
||||
</section>
|
||||
|
||||
<section id="buttons">
|
||||
<h2>Buttons</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,20 @@ def index(request):
|
|||
messages.warning(request, _("Warning message"))
|
||||
messages.error(request, _("Error message"))
|
||||
|
||||
fake_pagination = {
|
||||
'number': 1,
|
||||
'previous_page_number': 1,
|
||||
'next_page_number': 2,
|
||||
'has_previous': True,
|
||||
'has_next': True,
|
||||
'paginator': {
|
||||
'num_pages': 10,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
return render(request, 'wagtailstyleguide/base.html', {
|
||||
'search_form': form,
|
||||
'example_form': example_form,
|
||||
'fake_pagination': fake_pagination,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue