<div class="page-list-container">
  <ul class="nav nav-tabs">
      <li class="active"><a href="#view-list" data-toggle="tab">{{ t('List View') }}</a></li>
      {% if isEnabledTimeline() %}
      <li><a href="#view-timeline" data-toggle="tab">{{ t('Timeline View') }}</a></li>
      {% endif %}
  </ul>

  <div class="tab-content">
    {# list view #}
    <div class="p-t-10 active tab-pane fade page-list-container in" id="view-list">
      {% if pages.length == 0 %}
        <div class="m-t-10">
          {% if isTrashPage() %}
          No deleted pages.
          {% else %}
          There are no pages under <strong>{{ path }}</strong>.
          {% endif %}
        </div>
      {% else %}
        {% include 'page_list.html' with { pages: pages, pager: pager, viewConfig: viewConfig } %}
      {% endif %}
    </div>

    {# timeline view #}
    {% if isEnabledTimeline() %}
    <div class="tab-pane m-t-30" id="view-timeline" data-shown=0>
      {% for page in pages %}
      <div class="timeline-body" id="id-{{ page.id }}" data-page-id="{{ page.id }}" data-page-path="{{ page.path }}" data-revision="{{ page.revision.toString() }}">
        <div class="panel panel-timeline">
          <div class="panel-heading"><a href="{{ page.path }}">{{ decodeURIComponent(page.path) }}</a></div>
          <div class="panel-body">
            <div class="revision-body wiki"></div>
          </div>
        </div>
        <script type="text/template">{{ page.revision.body.toString() | encodeHTML }}</script>
      </div>
      <hr>
      {% endfor %}
    </div>
    {% endif %}
  </div>
</div>
