Also display boost/announce actors
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro display_note(item, perma=False, ui=False, likes=[]) -%}
|
||||
{% macro display_note(item, perma=False, ui=False, likes=[], shares=[]) -%}
|
||||
{% set actor = item.activity.object.attributedTo | get_actor %}
|
||||
<div class="note h-entry" id="activity-{{ item['_id'].__str__() }}">
|
||||
|
||||
@@ -76,12 +76,14 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="bottom-bar">
|
||||
{% if perma %}<span class="perma-item">{{ item.activity.object.published | format_time }}</span> {% endif %}
|
||||
{% if perma %}<span class="perma-item">{{ item.activity.object.published | format_time }}</span>
|
||||
{% else %}
|
||||
<a class ="bar-item" href="{{ item.activity.object.url }}">permalink</a>
|
||||
|
||||
{% if item.meta.count_reply %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_reply }} replies</a>{% endif %}
|
||||
{% if item.meta.count_boost %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_boost }} boosts</a>{% endif %}
|
||||
{% if item.meta.count_like %}<a class ="bar-item" href="{{ item.activity.object.url }}">{{ item.meta.count_like }} likes</a>{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if ui and session.logged_in %}
|
||||
|
||||
@@ -124,23 +126,38 @@
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% if likes or shares %}
|
||||
<div style="padding-top:20px;" class="pure-g">
|
||||
{% if likes %}
|
||||
<div style="padding-bottom:40px;">
|
||||
<h4 style="font-weight:normal">Liked by</h4>{% for like in likes %}
|
||||
<div class="pure-u-1-2">
|
||||
<h4 style="font-weight:normal"><strong>{{ item.meta.count_like }}</strong> likes</h4>{% for like in likes %}
|
||||
{{ display_actor_inline(like) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if shares %}
|
||||
<div class="pure-u-1-2">
|
||||
<h4 style="font-weight:normal"><strong>{{ item.meta.count_boost }}</strong> boosts</h4>{% for boost in shares %}
|
||||
{{ display_actor_inline(boost) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro display_thread(thread, likes=[]) -%}
|
||||
{% macro display_thread(thread, likes=[], shares=[]) -%}
|
||||
{% for reply in thread %}
|
||||
{% if reply._requested %}
|
||||
{{ display_note(reply, perma=True, ui=False, likes=likes) }}
|
||||
{{ display_note(reply, perma=True, ui=False, likes=likes, shares=shares) }}
|
||||
{% else %}
|
||||
{{ display_note(reply, perma=False, ui=True) }}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user