Created
June 12, 2024 22:13
-
-
Save dclobato/101df624c234a2e0d08124f2eda0c8c4 to your computer and use it in GitHub Desktop.
Mudanças para listar produtos em páginas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% from 'bootstrap5/pagination.html' import render_pagination %} | |
<!-- Antes da tabela de produtos --> | |
<div class="row justify-content-center"> | |
<div class="clearfix mb-4 align-items-center"> | |
<form action="{{ url_for('produto.lista') }}" method="GET"> | |
<div class="float-start small"> | |
<div class="hstack gap-3"> | |
{{ linhas_por_pagina(pp) }} | |
{{ nome_parcial(q) }} | |
</div> | |
</div> | |
<div class="float-end"> | |
<button type="submit" class="btn btn-secondary">Filtrar</button> | |
</div> | |
</form> | |
</div> | |
</div> | |
<!-- Depois da tabela de produtos --> | |
<div class="row justify-content-center"> | |
<div class="clearfix"> | |
<div class="float-start small"> | |
Mostrando itens {{ rset_page.first }} a {{ rset_page.last }} de um total de {{ rset_page.total }} | |
</div> | |
<div class="float-end"> | |
{{ render_pagination(rset_page, 'produto.lista', size='sm', align='right', | |
args={'pp': pp, 'q': q}) }} | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment