{% set dataset_type = activity.data.package.type or 'dataset' %}

<li class="item {{ activity.activity_type|replace(' ', '-')|lower }}">
  <i class="fa icon fa-sitemap"></i>
  <p>
    {{ _('{actor} updated the dataset {dataset}').format(
      actor=ah.actor(activity),
      dataset=ah.dataset(activity)
    )|safe }}
    <br />
    <span class="date" title="{{ h.render_datetime(activity.timestamp, with_hours=True) }}">
      {{ h.time_ago_from_timestamp(activity.timestamp) }}
      {% if can_show_activity_detail %}
        &nbsp;|&nbsp;
        <a href="{{ h.url_for(dataset_type ~ '.read', id=activity.object_id, activity_id=activity.id) }}">
          {{ _('View this version') }}
        </a>
        &nbsp;|&nbsp;
        <a href="{{ h.url_for(dataset_type ~ '.changes', id=activity.id) }}">
          {{ _('Changes') }}
        </a>
      {% endif %}
    </span>
  </p>
</li>
