page_list.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {% extends 'layout/2column.html' %}
  2. {% block html_title %}{{ path|path2name }} · {{ path }}{% endblock %}
  3. {% block html_base_attr %}
  4. data-spy="scroll"
  5. data-target="#search-result-list"
  6. {% endblock %}
  7. {% block layout_header %}
  8. {% block layout_header_before %}
  9. {% endblock %}
  10. <div class="header-wrap">
  11. <header id="page-header" class="{% if page %}has-page{% endif %}">
  12. <div class="d-flex align-items-center">
  13. <div class="title-container">
  14. <div class="d-flex">
  15. <h1 class="title flex-item-title" id="revision-path"></h1>
  16. {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
  17. {% if searchConfigured() && !isTopPage() && !isTrashPage() %}
  18. <form id="search-listpage-form" class="m-l-10 input-group search-input-group hidden-xs hidden-sm"
  19. data-toggle="tooltip" data-placement="bottom" title="{{ path }} 以下から検索" data-container="body">
  20. <div class="input-group">
  21. <input id="search-listpage-input" type="text" class="form-control input-sm" data-path="{{ path }}" placeholder="Search for...">
  22. <span class="input-group-btn">
  23. <button class="btn btn-default btn-sm"><i class="icon-magnifier"></i></button>
  24. </span>
  25. </div><!-- /input-group -->
  26. <a class="search-listpage-clear" id="search-listpage-clear"><i class="fa fa-times-circle"></i></a>
  27. </form>
  28. {% endif %}
  29. {% endif %}
  30. </div>
  31. <div id="revision-url" class="url-line"></div>
  32. </div>
  33. {% if page %}
  34. <div>
  35. {% if user %}
  36. <button
  37. data-csrftoken="{{ csrf() }}"
  38. data-liked="{% if page.isLiked(user) %}1{% else %}0{% endif %}"
  39. class="like-button btn btn-default btn-outline btn-circle {% if page.isLiked(user) %}active{% endif %}"
  40. ><i class="icon-like"></i></button>
  41. {% endif %}
  42. </div>
  43. <div>
  44. {% if user %}
  45. <span id="bookmark-button"></span>
  46. {% endif %}
  47. </div>
  48. {% endif %}
  49. </div>
  50. </header>
  51. </div>
  52. {% endblock %}
  53. {% block content_main %}
  54. {% block content_main_before %}
  55. {% endblock %}
  56. {# page-list-search should be fully managed by react.js,
  57. # but now the header and page list content is rendered separately by the server,
  58. # so now bind the values through the hidden fields.
  59. #}
  60. {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
  61. {% if searchConfigured() && !isTopPage() && !isTrashPage() %}
  62. <div id="page-list-search">
  63. </div>
  64. {% endif %}
  65. {% endif %}
  66. {% include 'widget/page_content.html' %}
  67. <div class="row page-list">
  68. <div class="col-md-12">
  69. {% include 'widget/page_list_and_timeline.html' %}
  70. </div>
  71. </div>
  72. {% endblock %}
  73. {% block content_main_after %}
  74. {% endblock %}
  75. {% block content_footer %}
  76. <footer>
  77. </footer>
  78. {% endblock %}
  79. {% block side_header %}
  80. {% if not page and not isUserPageList(path) and !isTrashPage() %}
  81. <div class="portal-side">
  82. <div class="portal-form-button">
  83. <button class="btn btn-primary" id="create-portal-button">Create Portal</button>
  84. <p class="help-block"><a href="#" data-target="#help-portal" data-toggle="modal"><i class="fa fa-question-circle"></i> What is Portal?</a></p>
  85. </div>
  86. </div>
  87. {% else %}
  88. {% include 'widget/page_side_header.html' %}
  89. {% endif %}
  90. {% endblock %} {# side_header #}
  91. {% block body_end %}
  92. <div id="crowi-modals">
  93. {% include 'modal/what_is_portal.html' %}
  94. {% include 'modal/unportalize.html' %}
  95. </div>
  96. <div class="modal fade portal-warning-modal" id="portal-warning-modal">
  97. <div class="modal-dialog">
  98. <div class="modal-content">
  99. <div class="modal-header">
  100. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  101. <h4 class="modal-title">ポータルに関するヒント</h4>
  102. </div>
  103. <div class="modal-body">
  104. <strong>Warning!</strong><br>
  105. <p>既に <strong><a href="{{ path|removeLastSlash }}">{{ path|removeLastSlash }}</a></strong> のページが存在します。</p>
  106. <p>
  107. <a href="{{ path|removeLastSlash }}">{{ path|removeLastSlash }}</a> をポータル化するには、
  108. <a href="{{ path|removeLastSlash }}">{{ path|removeLastSlash }}</a> に移動し、「ページを移動」させてください。<br>
  109. <a href="{{ path|removeLastSlash }}">{{ path|removeLastSlash }}</a> とは別に、このページ(<code>{{ path }}</code>)にポータルを作成する場合、このまま編集を続けて作成してください。
  110. </p>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. {% endblock %} {# body_end #}