mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 11:14:28 +00:00
Add read-only support for poll/Question
This commit is contained in:
parent
243fcd8ca6
commit
e01891d364
1 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,13 @@
|
||||||
|
|
||||||
{% if obj | has_type('Article') %}
|
{% if obj | has_type('Article') %}
|
||||||
{{ obj.name }} <a href="{{ obj | url_or_id | get_url }}">{{ obj | url_or_id | get_url }}</a>
|
{{ obj.name }} <a href="{{ obj | url_or_id | get_url }}">{{ obj | url_or_id | get_url }}</a>
|
||||||
|
{% elif obj | has_type('Question') %}
|
||||||
|
{{ obj.content | clean | safe }}
|
||||||
|
<ul>
|
||||||
|
{% for oneOf in obj.oneOf %}
|
||||||
|
<li>{{ oneOf.name }} ({{ oneOf.replies.totalItems }})</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ obj.content | clean | safe }}
|
{{ obj.content | clean | safe }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue