mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
Fix quote answer and unread messages display
This commit is contained in:
parent
254126fd79
commit
6764224856
@ -203,7 +203,11 @@ ul, ol {
|
||||
code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 10px;
|
||||
padding: 5px;
|
||||
border: solid 1px black;
|
||||
}
|
||||
.edit-bar {
|
||||
display: block;
|
||||
margin: 4px;
|
||||
|
@ -10,7 +10,7 @@ register = template.Library()
|
||||
@register.filter(is_safe=False)
|
||||
@stringfilter
|
||||
def markdown(text):
|
||||
return mark_safe(md(escape(text)))
|
||||
return mark_safe(md(text))
|
||||
|
||||
@register.filter()
|
||||
@stringfilter
|
||||
|
@ -36,12 +36,12 @@
|
||||
<h3>{{ topic.title }}</h3>
|
||||
<p>{{ topic.description }}</p>
|
||||
<p><a href="{{ url('forum:new_message', topic_id=topic.id) }}">Reply</a></p>
|
||||
{% set unread = False %}
|
||||
|
||||
{% set vars = {'unread': False} %} {# ugly hack to counter Jinja scopes #}
|
||||
{% for m in topic.messages.all() %}
|
||||
{% if m.id == first_unread_message_id %}
|
||||
{% if m.id == first_unread_message_id and vars.update({'unread': True}) %} {# idem #}
|
||||
<div class="message unread" id="first_unread">
|
||||
{% set unread = True %}
|
||||
{% elif unread %}
|
||||
{% elif vars.unread %}
|
||||
<div class="message unread">
|
||||
{% else %}
|
||||
<div class="message">
|
||||
|
Loading…
Reference in New Issue
Block a user