Browse Source

Refactor paginacao out of Proposicoes

pull/11/merge
Edward Ribeiro 9 years ago
parent
commit
c284644c64
  1. 31
      templates/paginacao.html
  2. 36
      templates/protocoloadm/proposicoes_incorporadas.html
  3. 36
      templates/protocoloadm/proposicoes_naoincorporadas.html
  4. 36
      templates/protocoloadm/proposicoes_naorecebidas.html
  5. 33
      templates/protocoloadm/protocolo_list.html
  6. 32
      templates/protocoloadm/protocolo_pesquisa.html

31
templates/paginacao.html

@ -0,0 +1,31 @@
{% if is_paginated %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}

36
templates/protocoloadm/proposicoes_incorporadas.html

@ -10,9 +10,9 @@
<td> <td>
{{ p.data_envio|date:"d/m/Y" }} {{ p.data_envio|date:"d/m/Y" }}
</td> </td>
<td> <!-- <td>
{{ p.tipo.descricao }} {{ p.tipo.descricao }}
</td> </td> -->
<td> <td>
{{ p.descricao }} {{ p.descricao }}
</td> </td>
@ -22,35 +22,5 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% if is_paginated %} {% include "paginacao.html" %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock detail_content %} {% endblock detail_content %}

36
templates/protocoloadm/proposicoes_naoincorporadas.html

@ -10,9 +10,9 @@
<td> <td>
{{ p.data_envio|date:"d/m/Y" }} {{ p.data_envio|date:"d/m/Y" }}
</td> </td>
<td> <!-- <td>
{{ p.tipo.descricao }} {{ p.tipo.descricao }}
</td> </td> -->
<td> <td>
{{ p.descricao }} {{ p.descricao }}
</td> </td>
@ -22,35 +22,5 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% if is_paginated %} {% include "paginacao.html" %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock detail_content %} {% endblock detail_content %}

36
templates/protocoloadm/proposicoes_naorecebidas.html

@ -10,9 +10,9 @@
<td> <td>
{{ p.data_envio|date:"d/m/Y" }} {{ p.data_envio|date:"d/m/Y" }}
</td> </td>
<td> <!-- <td>
{{ p.tipo.descricao }} {{ p.tipo.descricao }}
</td> </td> -->
<td> <td>
{{ p.descricao }} {{ p.descricao }}
</td> </td>
@ -22,35 +22,5 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% if is_paginated %} {% include "paginacao.html" %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock detail_content %} {% endblock detail_content %}

33
templates/protocoloadm/protocolo_list.html

@ -20,36 +20,5 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% include "paginacao.html" %}
{% if is_paginated %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock detail_content %} {% endblock detail_content %}

32
templates/protocoloadm/protocolo_pesquisa.html

@ -24,37 +24,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% if is_paginated %} {% include "paginacao.html" %}
<nav class="pagination-centered">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?page={{ page_obj.previous_page_number }}">
<span class="arrow">&laquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&laquo;</a></li>
{% endif %}
{% for page in paginator.page_range %}
<li {% if page == page_obj.number %}class="active current"{% endif %}>
<a href="?page={{ page }}">{{ page }}</a>
</li>
{% endfor %}
{% if page_obj.has_next %}
<li>
<a href="?page={{ page_obj.next_page_number }}">
<span class="arrow">&raquo;</span>
</a>
</li>
{% else %}
<li class="arrow unavailable"><a href="">&raquo;</a></li>
{% endif %}
</ul>
</nav>
{% endif %}
</form> </form>
{% else %} {% else %}
<form method="post"> <form method="post">

Loading…
Cancel
Save