{% extends '@OroActivityList/ActivityList/js/activityItemTemplate.html.twig' %} {% import '@OroActivity/macros.html.twig' as AC %} {% set entityClass = 'Oro\\Bundle\\TaskBundle\\Entity\\Task' %} {% set entityName = oro_entity_config_value(entityClass, 'label')|trans %} {% block activityDetails %} {{ entityName }} <% var template = (verb == 'create') ? {{ 'oro.task.activity_item.created_by'|trans|json_encode|raw }} : {{ 'oro.task.activity_item.changed_by'|trans|json_encode|raw }}; %> <%= _.template(template, { interpolate: /\{\{(.+?)\}\}/g })({ user: owner_url ? '' + _.escape(owner) + '' : '' + _.escape(owner) + '', date: '' + createdAt + '', editor: editor_url ? '' + _.escape(editor) + '' : _.escape(editor), editor_date: '' + updatedAt + '' }) %> {% endblock %} {% block activityShortMessage %} <% if (!_.isUndefined(data.statusId) && data.statusId) { %>
<% if (data.statusId === 'closed') { %>
<%- data.statusName %>
<% } else if (data.statusId === 'in_progress') { %>
<%- data.statusName %>
<% } else { %>
<%- data.statusName %>
<% } %>
<% } %> {{ parent() }} {% endblock %} {% block activityActions %} {% import '@OroActivity/macros.html.twig' as AC %} {% set action %} {# Add button for add context in the activity list item #} <% if (editable) { %> {{ AC.activity_context_link() }} <% } %> {% endset %} {% set actions = [action] %} {% set action %} {{ 'oro.task.view_task'|trans({'{{ entity }}': entityName}) }} {% endset %} {% set actions = actions|merge([action]) %} {% set action %} <% if (editable) { %> {{ 'oro.task.update_task'|trans({'{{ entity }}': entityName}) }} <% } %> {% endset %} {% set actions = actions|merge([action]) %} {% set action %} <% if (removable) { %> {{ 'oro.task.delete_task'|trans({'{{ entity }}': entityName}) }} <% } %> {% endset %} {% set actions = actions|merge([action]) %} {{ parent() }} {% endblock %}