<ul class="page-list-ul page-list-ul-flat">
{% for data in pages %}

{% if pagePropertyName %}
  {% set listPage = data[pagePropertyName] %}
{% else %}
  {% set listPage = data %}
{% endif %}

<li>
  <img src="{{ listPage.lastUpdateUser.imageUrlCached|default('/images/icons/user.svg') }}" class="picture rounded-circle">
  <a href="{{ encodeURI(listPage.path) }}" class="text-break ml-1">
    {{ listPage.path | preventXss }}
  </a>
  <span class="page-list-meta">
    {% if listPage.isTopPage() %}
      <span class="badge badge-info">TOP</span>
    {% endif  %}

    {% if listPage.isTemplate() %}
      <span class="badge badge-info">TMPL</span>
    {% endif  %}

    {% if listPage.commentCount > 0 %}
    <span>
      <i class="icon-bubble"></i>{{ listPage.commentCount }}
    </span>
    {% endif  %}

    {% if listPage.liker.length > 0 %}
    <span class="page-list-liker" data-count="{{ listPage.liker.length }}">
      <i class="icon-like"></i>{{ listPage.liker.length }}
    </span>
    {% endif  %}

    {% if viewConfig.seener_threshold and listPage.seenUsers.length >= viewConfig.seener_threshold %}
    <span class="page-list-seer" data-count="{{ listPage.seenUsers.length }}">
      <i class="fa fa-paw"></i>{{ listPage.seenUsers.length }}
    </span>
    {% endif %}

    {% if !listPage.isPublic() %}
    <span>
      <i class="icon icon-lock"></i>
    </span>
    {% endif %}
  </span>
</li>
{% endfor %}
</ul>

{% if pager %}
<ul class="pagination">
  {% if pager.prev !== null %}
    <li class="prev">
      <a href="{{ encodeURI(path) }}?offset={{ pager.prev }}" class="btn btn-outline-secondary"><i class="icon-arrow-left"></i> Prev</a>
    </li>
  {% endif %}
  {% if pager.next %}
    <li class="next">
      <a href="{{ encodeURI(path) }}?offset={{ pager.next }}" class="btn btn-outline-secondary">Next <i class="icon-arrow-right"></i></a>
    </li>
  {% endif %}
</ul>
{% endif %}
