improves tables a little

This commit is contained in:
artus
2018-10-14 17:24:48 +02:00
parent 5ed4706069
commit 2f93fa1883
4 changed files with 14 additions and 15 deletions

View File

@@ -32,8 +32,5 @@
</ul>
</div>
{% endif %}
<!-- Table -->
<div class="card card-body">
{% table object_list cols=3 cell_template=table_cell_template header=table_header %}
</div>
{% table object_list cols=3 cell_template=table_cell_template %}
{% endblock %}

View File

@@ -1,8 +1,8 @@
<a href="{% url 'notes:details-sujet' 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 class="float-right">
<span class="badge badge-info">{{ object.notes.count }} notes</span>
{% with object.statistiques.info_completed as completed %}
<span class="label label-{% if completed <= 80 %}warning{%else%}success{%endif%}">{{ completed }} %</span>
<span class="badge badge-{% if completed <= 80 %}warning{%else%}success{%endif%}">{{ completed }} %</span>
{% endwith %}
</div>

View File

@@ -1,5 +1,5 @@
<tr>
<th class="bg-{{bg_color}}" width="20%">
<tr >
<th class="border-{{bg_color}}" width="20%">
{% if link %}
<a href="{{link}}"><strong>{{header}}</strong></a>
{% else %}
@@ -8,9 +8,9 @@
<br />
<div style="margin:5px 0px;">
{% for label in labels %}
<span class="label label-{{bg_label_color}}" style="padding:2px 5px;">{{label}}</span>
<span class="badge badge-{{bg_label_color}}" style="padding:2px 5px;">{{label}}</span>
{% endfor %}
</div>
</th>
<td style="background-color:#fff" width="80%"><p>{{text | linebreaks }}</p></td>
<td class="border-{{bg_color}}" width="80%"><p>{{text | linebreaks }}</p></td>
</tr>