Skip to content
Snippets Groups Projects
Commit 048fbd15 authored by Dorian Lesbre's avatar Dorian Lesbre
Browse files

Prettier activity displays

parent 116eee25
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ class InterludesActivityAdmin(ExportCsvMixin, admin.ModelAdmin):
("min_participants", "max_participants"),
"must_subscribe",
"communicate_participants",
"description",
"description", "desc_as_html",
"display",
"room", "start",
"on_planning",
......
......@@ -49,7 +49,13 @@ class InterludesActivity(models.Model):
)
host_name = models.CharField("nom de l'organisateur", max_length=50)
host_email = models.EmailField("email de l'organisateur")
description = models.TextField("description", max_length=2000)
description = models.TextField(
"description", max_length=2000,
help_text='Texte ou html selon la valeur de "Description HTML".\n'
)
desc_as_html = models.BooleanField("Description au format HTML", default=False,
help_text="Assurer vous que le texte est bien formaté, cette option peut casser la page activités."
)
on_planning = models.BooleanField(
"afficher sur le planning", default=False,
......
......@@ -273,9 +273,14 @@ dl dd {
justify-self: start;
text-align: left;
}
p.desc {
div.desc {
margin-top: 0;
padding: 0 10px 20px;
}
div.desc p {
margin: 0;
}
div.desc p.indent {
text-indent: 25px;
}
......
......@@ -109,7 +109,13 @@
{% endif %}
<dt>Description :</dt>
</dl>
<p class="desc">{{ activity.description|linebreaksbr }}</p>
<div class="desc">
{% if activity.desc_as_html %}
{{ activity.description|safe }}
{% else %}
<p class="indent">{{ activity.description|linebreaksbr }}</p>
{% endif %}
</div>
{% empty %}
<p>Il n'y a aucune activité pour l'instant, revenez dans quelques jour pour avoir une liste plus remplie.</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment