[ckan-dev] Snippet update
Judith Moran
Judith.Moran at nt.gov.au
Tue May 7 01:24:44 UTC 2019
Hi,
I have found the snipped that renders the activity list.
Definitely Not an html - python person.
I want to edit the snippet to list only some of the activity objects (type and object).
So I commented out the line that presents the bulk of the activity data - {# {{ h.literal(activity.msg.format(**activity.data)) }} #}. I did read up on this as the extracting the activity data from activity, BUT user Id is not to be reported on at NTG.
Then I put some test render commands (it may be very creative, so please be gentle with the comments???).
Can someone update these two lines of code just to show the activity object and type as I can see it is user render to get the activity timestamp and I want to do the same for the object and activity id.
It would greatly be appreciated.
<li class="item {{ activity.type|lower }}">
{% if activity.is_new %}
<span class="new" title="{{ _('New activity item') }}">{{ _('New activity item') }}</span>
{% endif %}
<i class="fa icon fa-{{ activity.icon }}"></i>
<p>
{# {{ h.literal(activity.msg.format(**activity.data)) }} #}
<span class="item" title="{{h.render(activity.object_id) }} </span>
<span class='item" title="{{h.render(activity.activity-type) }} </span>
<span class="date" title="{{ h.render_datetime(activity.timestamp, with_hours=True) }}">{{ h.time_ago_from_timestamp(activity.timestamp) }}</span>
</p>
</li>
Regards,
Judy Moran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190507/11f35885/attachment.html>
More information about the ckan-dev
mailing list