{% extends 'base/layout.html' %}


{% block html_base_attr %}
  data-spy="scroll"
  data-target="#search-result-list"
{% endblock %}

{% block content_header %}

{% block content_header_before %}
{% endblock %}

<div class="header-wrap">
  <header id="page-header" class="{% if page %}has-page{% endif %}">

    <div class="d-flex align-items-center">
      <div class="title-container">
        <div class="d-flex">
          <h1 class="title" id="revision-path"></h1>
          {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
          {% if searchConfigured() && !isTopPage() && !isTrashPage() %}
          <form id="search-listpage-form" class="m-l-10 input-group search-input-group hidden-xs hidden-sm"
              data-toggle="tooltip" data-placement="bottom" title="{{ path }} 以下から検索" data-container="body">
            <div class="input-group">
              <input id="search-listpage-input" type="text" class="form-control input-sm" data-path="{{ path }}" placeholder="Search for...">
              <span class="input-group-btn">
                <button class="btn btn-default btn-sm"><i class="icon-magnifier"></i></button>
              </span>
            </div><!-- /input-group -->
            <a class="search-listpage-clear" id="search-listpage-clear"><i class="fa fa-times-circle"></i></a>
          </form>
          {% endif %}
          {% endif %}
        </div>
        <div id="revision-url" class="url-line"></div>
      </div>
      {% include '../widget/header-buttons.html' %}
    </div>

  </header>
</div>

{% endblock %}

{% block content_main %}

  {% block content_main_before %}
  {% endblock %}

  {# page-list-search should be fully managed by react.js,
  # but now the header and page list content is rendered separately by the server,
  # so now bind the values through the hidden fields.
  #}
  {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
  {% if searchConfigured() && !isTopPage() && !isTrashPage() %}
  <div id="page-list-search">
  </div>
  {% endif %}
  {% endif %}

  <div>
    {% include '../widget/page_content.html' %}
  </div>

  <div class="row page-list hidden-print {% if page.isPortal() %}m-t-30{% endif %}">
    <div class="col-md-12">
      {% include '../widget/page_list_and_timeline.html' %}
    </div>
  </div>

{% endblock %}


{% block content_main_after %}
{% endblock %}


{% block content_footer %}
<footer>
</footer>
{% endblock %}


{% block side_header %}

{% if not page and not isUserPageList(path) and !isTrashPage() %}
  {% include '../widget/create_portal.html' %}
{% else %}
  {% include 'widget/page_side_header.html' %}
{% endif %}

{% endblock %} {# side_header #}

{% block body_end %}
<div id="crowi-modals">
  {% include '../modal/what_is_portal.html' %}
  {% include '../modal/unportalize.html' %}
</div>
{% endblock %} {# body_end #}
