resolved #20, modified layout on 'suivi:details'
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="bg-{{bg_color}}" >
|
<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">
|
<span class="pull-right">
|
||||||
{% for label in labels %}
|
{% for label in labels %}
|
||||||
<span class="label label-{{bg_label_color}}">{{label}}</span>
|
<span class="label label-{{bg_label_color}}">{{label}}</span>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from django import template
|
from django import template
|
||||||
|
from django.urls import reverse
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
@@ -13,11 +14,16 @@ def inline_table(note, header=None):
|
|||||||
|
|
||||||
if header == "date":
|
if header == "date":
|
||||||
header_field = "created_date"
|
header_field = "created_date"
|
||||||
|
link = None
|
||||||
elif header == "sujet":
|
elif header == "sujet":
|
||||||
header_field = "sujet"
|
header_field = "sujet"
|
||||||
|
link = reverse("suivi:details", kwargs={'pk': note.sujet.pk})
|
||||||
|
|
||||||
|
header = getattr(note, header_field)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'header': getattr(note, header_field),
|
'header': header,
|
||||||
|
'link': link,
|
||||||
'small': note.child_class.__qualname__,
|
'small': note.child_class.__qualname__,
|
||||||
'bg_color': bg_color or "default",
|
'bg_color': bg_color or "default",
|
||||||
'bg_label_color': bg_label_color or "info",
|
'bg_label_color': bg_label_color or "info",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% load bootstrap3 %}
|
{% 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">
|
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||||
{% include "suivi/sujet_suivi.html" %}
|
{% include "suivi/sujet_suivi.html" %}
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@@ -23,4 +23,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user