1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 10:26:17 +00:00
Files
seahub/seahub/templates/snippets/notice_html.html
2015-12-02 14:10:32 +08:00

57 lines
2.1 KiB
HTML

{% load avatar_tags seahub_tags i18n %}
{% for notice in notices %}
{% if notice.seen %}
<li class="read">
{% else %}
<li class="unread" data-id="{{notice.id}}">
{% endif %}
{% if notice.msg_from %}
<a href="{% url 'user_profile' notice.msg_from %}">{% avatar notice.msg_from 32 %}</a>
{% else %}
<img src={{notice.default_avatar_url}} width="32" height="32" class="avatar" />
{% endif %}
{% if notice.is_group_msg %}
<p class="brief">{{ notice.format_group_message_title|safe }}</p>
{% if notice.format_group_message_detail %}
<p class="clear cspt detail">{{ notice.format_group_message_detail }}</p>
{% endif %}
{% elif notice.is_grpmsg_reply %}
<p class="brief">{{ notice.format_grpmsg_reply_title|safe }}</p>
{% if notice.format_grpmsg_reply_detail %}
<div class="clear cspt detail">
{% if notice.format_grpmsg_reply_topic %}
<p class="topic">{{ notice.format_grpmsg_reply_topic|truncatechars:35 }}</p>
{% endif %}
<p>{{ notice.format_grpmsg_reply_detail }}</p>
</div>
{% endif %}
{% elif notice.is_user_message %}
<p class="brief">{{ notice.format_user_message_title|safe }}</p>
{% if notice.format_user_message_detail %}
<p class="clear cspt detail">{{ notice.format_user_message_detail }}</p>
{% endif %}
{% elif notice.is_file_uploaded_msg %}
<p class="brief">{{ notice.format_file_uploaded_msg|safe }}</p>
{% elif notice.is_repo_share_msg %}
<p class="brief">{{ notice.format_repo_share_msg|safe }}</p>
{% elif notice.is_priv_file_share_msg %}
<p class="brief">{{ notice.format_priv_file_share_msg|safe }}</p>
{% elif notice.is_group_join_request %}
<p class="brief">{{ notice.format_group_join_request|safe }}</p>
{% elif notice.is_add_user_to_group %}
<p class="brief">{{ notice.format_add_user_to_group|safe }}</p>
{% endif %}
<p class="time">{{ notice.timestamp|translate_seahub_time }}</p>
</li>
{% endfor %}