resolved #20, modified layout on 'suivi:details'

This commit is contained in:
artus40
2016-12-29 15:20:16 +01:00
parent 5884125015
commit 7cc362668e
3 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,10 @@
<tr>
<th class="bg-{{bg_color}}" >
<strong>{{header}}</strong> <small>{{small}}</small>
{% if link %}
<a href="{{link}}"><strong>{{header}}</strong></a>
{% else %}
<strong>{{header}}</strong>
{% endif %} <small>{{small}}</small>
<span class="pull-right">
{% for label in labels %}
<span class="label label-{{bg_label_color}}">{{label}}</span>

View File

@@ -1,4 +1,5 @@
from django import template
from django.urls import reverse
register = template.Library()
@@ -13,11 +14,16 @@ def inline_table(note, header=None):
if header == "date":
header_field = "created_date"
link = None
elif header == "sujet":
header_field = "sujet"
link = reverse("suivi:details", kwargs={'pk': note.sujet.pk})
header = getattr(note, header_field)
return {
'header': getattr(note, header_field),
'header': header,
'link': link,
'small': note.child_class.__qualname__,
'bg_color': bg_color or "default",
'bg_label_color': bg_label_color or "info",

View File

@@ -1,5 +1,5 @@
{% load bootstrap3 %}
<div class="col-md-6">
<div class="col-lg-6 col-md-12">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% include "suivi/sujet_suivi.html" %}
<div class="panel panel-default">
@@ -23,4 +23,4 @@
</div>
</div>
</div>
<div class="col-md-6"> {% include "sujets/sujet_details.html" %}</div>
<div class="col-lg-6 col-md-12"> {% include "sujets/sujet_details.html" %}</div>