_activity-timeline.html 1.5 KB
Newer Older
1
{% load i18n %}
2
{% load hro %}
3
{% load arrowfilter %}
4
<div id="activity-timeline" class="timeline">
5 6 7 8 9 10 11 12
  {% for a in activities %}
    <div class="activity" data-activity-id="{{ a.pk }}">
      <span class="timeline-icon{% if a.has_failed %} timeline-icon-failed{% endif %}">
        <i class="fa {% if not a.finished %}fa-refresh fa-spin {% else %}fa-plus{% endif %}"></i>
      </span>
      <strong title="{{ a.result.get_admin_text }}">
        {{ a.readable_name.get_admin_text|capfirst }}
      </strong>
Kálmán Viktor committed
13

14 15
    <span title="{{ a.started }}">{{ a.started|arrowfilter:LANGUAGE_CODE }}</span>{% if a.user %}, {{ a.user }}{% endif %}

16 17 18 19 20 21 22 23 24 25
    {% if a.children.count > 0 %}
      <div class="sub-timeline">
        {% for s in a.children.all %}
          <div data-activity-id="{{ s.pk }}"
               class="sub-activity{% if s.has_failed %} sub-activity-failed{% endif %}">
            <span title="{{ s.result.get_admin_text }}">
              {{ s.readable_name|get_text:user }}
            </span>
            &ndash;
            {% if s.finished %}
26 27 28
              <span title="{{ s.finished }}">
                {{ s.finished|arrowfilter:LANGUAGE_CODE }}
              </span>
29 30 31 32 33 34 35 36 37 38
            {% else %}
              <i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i>
            {% endif %}
            {% if s.has_failed %}
              <div class="label label-danger">{% trans "failed" %}</div>
            {% endif %}
          </div>
        {% endfor %}
      </div>
    {% endif %}
39 40
</div>
{% endfor %}
41
</div>