seitime-frappe/frappe/desk/page/activity/activity_row.html

43 lines
2 KiB
HTML

<div class="row activity-row" data-creation="{%= creation.split(" ")[0] + " 00:00:00" %}">
<div class="col-xs-3 text-right activity-date"><span class="{%= date_class %}">
{%= date_sep || "" %}</span></div>
<div class="col-xs-9 activity-message"
data-doctype="{%= reference_doctype %}"
data-docname="{%= reference_name %}"
data-link-doctype="{{ link_doctype }}"
data-link-name="{{ link_name }}"
title="{%= by %} / {%= dateutil.str_to_user(creation) %}">
<span class="avatar avatar-small">
<div class="avatar-frame" style="background-image: url({{ imgsrc }});"></div>
<!-- <img src="{%= imgsrc %}"> -->
</span>
<span class="small">
{% if (feed_type==="Login") { %}
{%= __("Logged in") %}
{% } else if (feed_type==="Label") { %}
{%= __("{0} {1}", ["<strong>" + subject + "</strong>", link]) %}
{% } else if (reference_doctype && feed_type==="Comment") { %}
{%= __("Commented on {0}: {1}", [link, "<strong>" + content + "</strong>"]) %}
{% } else if (reference_doctype && communication_type==="Communication") { %}
{%= __("Communicated via {0} on {1}: {2}", [__(feed_type), link, "<strong>" + subject + "</strong>"]) %}
{% } else if (reference_doctype && !feed_type) { %}
{%= __("Updated {0}: {1}", [link, "<strong>" + subject + "</strong>"]) %}
{% } else if (feed_type==="Like" && reference_doctype) { %}
{%= by %} <i class="octicon octicon-heart"></i>
{% if (in_list(["Comment", "Communication"], reference_doctype)) { %}
{%= content %}
{% } else { %}
{%= link %}
{% } %}
{% } else if (in_list(["Created", "Submitted", "Cancelled", "Deleted"], feed_type)) { %}
{%= __("{0} {1}", ["<strong>" + __(feed_type) + "</strong>", feed_type==="Deleted" ? subject : link ]) %}
{% } else if (feed_type==="Updated") { %}
{%= __("Updated {0}: {1}", [link, "<strong>" + subject + "</strong>"]) %}
{% } else if (reference_doctype && reference_name) { %}
{%= __("{0}: {1}", [link, "<strong>" + content + "</strong>"]) %}
{% } else { %}
{%= subject %}
{% } %}
</span>
</div>
</div>