added 'tables' template tags to display objects lists in 'maraudes' and 'sujets'

This commit is contained in:
Arthur Gerbaud
2016-11-19 13:28:36 +01:00
parent 673c620be0
commit 7f08b1db23
11 changed files with 71 additions and 36 deletions

View File

@@ -0,0 +1,6 @@
<a href="{% url 'suivi:details' object.pk %}" class="btn btn-link">{{object}}</a>
<div class="pull-right" style="padding-right: 20px;">
<span class="label label-info">{{ object.notes.count }} notes</span>
</div>

View File

@@ -1,3 +1,4 @@
{% load tables %}
{% load bootstrap3 %}
<div class="col-md-12 col-lg-6">
<div class="panel panel-primary">
@@ -28,14 +29,7 @@
</div>
{% if object_list %}
<!-- Table -->
<table class="table table-striped table-hover">
{% for sujet in object_list %}
<tr>
<td><a href="{% url 'suivi:details' sujet.pk %}" class="btn btn-link">{{sujet}}</a></td>
<td><span class="label label-info">{{ sujet.notes.count }} notes</span></td>
</tr>
{% endfor %}
</table>
{% table object_list cols=3 cell_template="sujets/list_table_cell.html" %}
{% if is_paginated %}
<div class="panel-footer text-center">
<ul class="pagination">
@@ -47,6 +41,7 @@
{% endif %}{% endif %}
</div>
</div>
<div class="col-lg-3 col-md-3">
<div class="panel panel-default">
<!-- Default panel contents -->