{% load task_tags %}
{% for path in active_paths %}
    <div class="col-4">
        <a href="{% url 'tasks:path-detail' path_slug=path.slug  path_id=path.id %}">
            <div class="col3-picture-box">
                <div class="col3-picture-box__image col3-picture-box__image--first"
                        {% if path.image %} style="background: url('{{ path.image.url }}') center;" {% endif %}>
                    <div class="col3-picture-box__image__text">
                        <div class="col3-picture-box__image__text__tasks">
                            Zadania {% if path.is_path_blocking %} {{ path.completed }} /{% endif %}
                            {{ path.tasks.active.count }}
                        </div>
                        <div class="col3-picture-box__image__text__title">
                            {{ path.name }}
                        </div>
                    </div>
                </div>
                <div class="col3-picture-box__description">
                    <div class="col3-picture-box__description__title">
                        {{ path.is_path_blocking|yesno:"Postęp,Prezentacji" }}
                    </div>
                    <div class="col3-picture-box__description__counter">
                        {% if path.is_path_blocking %}
                            {% percent path.completed path.tasks.active.count %}%
                        {% else %}
                            {{ path.completed }}
                        {% endif %}
                    </div>
                </div>
            </div>
        </a>
    </div>
{% endfor %}
