{% macro showwarnings(warnings) %}
  {% set title = warnings.title %}
  {% set items = warnings.items %}

  <b>{{ title }}</b>
  {% if items|length > 0 %}
    <div class="list">
      {% for item in items %}
        <a href="deals/{{ item.id }}" class="btn btn-list-item btn-transparent">
          <span class="text">
            <b>{{ item.identifier }}</b>
            {{ item.title }}
          </span>
          <span class="text">
            <div class="badge badge-small badge-blue">@{{ item['_LOOKUP[id_owner]'] }}</div>
            <div class="badge badge-small badge-lime">{{ item['_LOOKUP[id_contact]'] }}</div>
          </span>
        </a>
      {% endfor %}
    </div>
  {% endif %}
{% endmacro %}

{% if viewParams.recentTasks|length == 0 %}
  <div class="alert alert-info">
    {{ translate('You did not work on any task since last 2 weeks.') }}<br/>
  </div>
{% else %}
  <div class="list">
    {% for t in viewParams.recentTasks %}
      <a href="tasks/{{ t.id }}" class="btn btn-list-item btn-transparent" target="_blank">
        <span class="text"><b>{{ t.identifier }}</b> {{ t.title }}</span>
        <span class="text">{{ t.virt_related_to }}</span>
      </a>
    {% endfor %}
  </div>
{% endif %}