Procházet zdrojové kódy

organize layout files

Yuki Takei před 8 roky
rodič
revize
7ea46cfc0f

+ 1 - 1
lib/views/customlayout-selector/not_found.html

@@ -1,5 +1,5 @@
 {% if 'crowi-plus' === layoutType() %}
   {% include '../layout-growi/not_found.html' %}
 {% else %}
-  {% include '../not_found.html' %}
+  {% include '../layout-crowi/not_found.html' %}
 {% endif %}

+ 1 - 1
lib/views/customlayout-selector/page.html

@@ -1,5 +1,5 @@
 {% if 'crowi-plus' === layoutType() %}
   {% include '../layout-growi/page.html' %}
 {% else %}
-  {% include '../page.html' %}
+  {% include '../layout-crowi/page.html' %}
 {% endif %}

+ 1 - 1
lib/views/customlayout-selector/page_list.html

@@ -1,5 +1,5 @@
 {% if 'crowi-plus' === layoutType() %}
   {% include '../layout-growi/page_list.html' %}
 {% else %}
-  {% include '../page_list.html' %}
+  {% include '../layout-crowi/page_list.html' %}
 {% endif %}

+ 1 - 1
lib/views/customlayout-selector/user_page.html

@@ -1,5 +1,5 @@
 {% if 'crowi-plus' === layoutType() %}
   {% include '../layout-growi/user_page.html' %}
 {% else %}
-  {% include '../user_page.html' %}
+  {% include '../layout-crowi/user_page.html' %}
 {% endif %}

+ 1 - 1
lib/views/not_found.html → lib/views/layout-crowi/not_found.html

@@ -1,4 +1,4 @@
-{% extends 'layout/2column.html' %}
+{% extends '../layout/2column.html' %}
 
 {% block layout_header %}
 

+ 6 - 6
lib/views/page.html → lib/views/layout-crowi/page.html

@@ -1,4 +1,4 @@
-{% extends 'layout/2column.html' %}
+{% extends '../layout/2column.html' %}
 
 {% block html_title %}{{ path|path2name }} · {{ path }}{% endblock %}
 
@@ -58,7 +58,7 @@
     </div>
   </div>
   {% else %}
-    {% include 'widget/page_content.html' %}
+    {% include '../widget/page_content.html' %}
   {% endif %}
 {% endblock %}
 
@@ -69,19 +69,19 @@
 
 {% block content_footer %}
   {% if page %}
-    {% include 'widget/page_attachments.html' %}
+    {% include '../widget/page_attachments.html' %}
   {% endif %}
 {% endblock %}
 
 {% block side_header %}
   {% if page and not page.isDeleted() %}
-    {% include 'widget/page_side_header.html' %}
+    {% include '../widget/page_side_header.html' %}
   {% endif %}
 {% endblock %} {# side_header #}
 
 {% block side_content %}
   {% if page and not page.isDeleted() %}
-    {% include 'widget/page_side_content.html' %}
+    {% include '../widget/page_side_content.html' %}
   {% endif %}
 {% endblock %}
 
@@ -93,5 +93,5 @@
     <div id="presentation-container"></div>
   </div>
 
-  {% include 'widget/page_modals.html' %}
+  {% include '../widget/page_modals.html' %}
 {% endblock %}

+ 6 - 6
lib/views/page_list.html → lib/views/layout-crowi/page_list.html

@@ -1,4 +1,4 @@
-{% extends 'layout/2column.html' %}
+{% extends '../layout/2column.html' %}
 
 {% block html_title %}{{ path|path2name }} · {{ path }}{% endblock %}
 
@@ -75,11 +75,11 @@
   {% endif %}
   {% endif %}
 
-  {% include 'widget/page_content.html' %}
+  {% include '../widget/page_content.html' %}
 
   <div class="row page-list">
     <div class="col-md-12">
-      {% include 'widget/page_list_and_timeline.html' %}
+      {% include '../widget/page_list_and_timeline.html' %}
     </div>
   </div>
 
@@ -106,15 +106,15 @@
   </div>
 </div>
 {% else %}
-  {% include 'widget/page_side_header.html' %}
+  {% 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' %}
+  {% include '../modal/what_is_portal.html' %}
+  {% include '../modal/unportalize.html' %}
 </div>
 <div class="modal fade portal-warning-modal" id="portal-warning-modal">
   <div class="modal-dialog">

+ 2 - 2
lib/views/user_page.html → lib/views/layout-crowi/user_page.html

@@ -5,7 +5,7 @@
 
 {% block layout_header %}
   {% if pageUser %}
-    {% include 'widget/user_page_header.html' %}
+    {% include '../widget/user_page_header.html' %}
   {% else %}
     {% parent %}
   {% endif %}
@@ -14,6 +14,6 @@
 
 {% block content_main_before %}
   <div class="m-l-15 m-r-15 m-b-30">
-    {% include 'widget/user_page_content.html' %}
+    {% include '../widget/user_page_content.html' %}
   </div>
 {% endblock %}

+ 0 - 0
lib/views/layout-growi/base/not_found_nosidebar.html → lib/views/layout-growi/base/layout.html


+ 0 - 38
lib/views/layout-growi/base/page_list_nosidebar.html

@@ -1,38 +0,0 @@
-{% extends '../../layout/layout.html' %}
-
-
-{% block layout_main %}
-<div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
-  {% if page && page.grant != 1 %}
-  <p class="page-grant">
-    <i class="fa fa-lock"></i> {{ consts.pageGrants[page.grant] }} ({{ t('Browsing of this page is restricted') }})
-  </p>
-  {% endif %}
-  {% if page && page.grant == 2 %}
-  <p class="alert alert-info">
-    {{ t('Shareable Link') }}
-    <input type="text" class="copy-link form-control" value="{{ baseUrl }}/{{ page._id.toString() }}" readonly>
-  </p>
-  {% endif %}
-  <article>
-    {% block content_main_before %}
-    {% endblock %}
-
-    {% block content_main %}
-    {% endblock content_main %}
-
-    {% block content_main_after %}
-    {% endblock %}
-
-    {% block content_footer %}
-    {% endblock %}
-  </article>
-</div>
-
-{% endblock %} {# layout_main #}
-
-
-{% block layout_footer %}
-  {% parent %}
-  {% include '../widget/system-version.html' %}
-{% endblock %}

+ 0 - 38
lib/views/layout-growi/base/page_nosidebar.html

@@ -1,38 +0,0 @@
-{% extends '../../layout/layout.html' %}
-
-
-{% block layout_main %}
-<div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
-  {% if page && page.grant != 1 %}
-  <p class="page-grant">
-    <i class="fa fa-lock"></i> {{ consts.pageGrants[page.grant] }} ({{ t('Browsing of this page is restricted') }})
-  </p>
-  {% endif %}
-  {% if page && page.grant == 2 %}
-  <p class="alert alert-info">
-    {{ t('Shareable Link') }}
-    <input type="text" class="copy-link form-control" value="{{ baseUrl }}/{{ page._id.toString() }}" readonly>
-  </p>
-  {% endif %}
-  <article>
-    {% block content_main_before %}
-    {% endblock %}
-
-    {% block content_main %}
-    {% endblock content_main %}
-
-    {% block content_main_after %}
-    {% endblock %}
-
-    {% block content_footer %}
-    {% endblock %}
-  </article>
-</div>
-
-{% endblock %} {# layout_main #}
-
-
-{% block layout_footer %}
-  {% parent %}
-  {% include '../widget/system-version.html' %}
-{% endblock %}

+ 0 - 62
lib/views/layout-growi/base/user_page_nosidebar.html

@@ -1,62 +0,0 @@
-{% extends '../../layout/layout.html' %}
-
-
-{% block layout_main %}
-<div id="main" class="main col-md-12 {% if page %}{{ css.grant(page) }}{% endif %} {% block main_css_class %}{% endblock %}">
-  {% if page && page.grant != 1 %}
-  <p class="page-grant">
-    <i class="fa fa-lock"></i> {{ consts.pageGrants[page.grant] }} ({{ t('Browsing of this page is restricted') }})
-  </p>
-  {% endif %}
-  {% if page && page.grant == 2 %}
-  <p class="alert alert-info">
-    {{ t('Shareable Link') }}
-    <input type="text" class="copy-link form-control" value="{{ baseUrl }}/{{ page._id.toString() }}" readonly>
-  </p>
-  {% endif %}
-  <article>
-    <div class="container-fluid">
-      <div class="row">
-
-        <div class="col-lg-10 col-md-9">
-
-          {#
-           # ensure to insert 'content_head' block to col-xx-xx
-           #
-           #   Because this block has content like 'Bookmarks' or 'Recent Created' whose height changes dynamically,
-           #   setting of 'revision-toc' (affix) is hindered.
-           #}
-          {% block content_main_before %}
-          {% endblock %}
-
-          {% block content_main %}
-          {% endblock content_main %}
-
-        </div> {# /.col- #}
-
-        {# relocate #revision-toc #}
-        <div class="col-lg-2 col-md-3 visible-lg visible-md">
-          <div id="revision-toc" class="revision-toc" data-spy="affix" data-offset-top="54">
-            <div id="revision-toc-content" class="revision-toc-content"></div>
-          </div>
-        </div> {# /.col- #}
-
-      </div>
-    </div>
-
-    {% block content_main_after %}
-    {% endblock %}
-
-    {% block content_footer %}
-      {% parent %}
-    {% endblock %}
-  </article>
-</div>
-
-{% endblock %} {# layout_main #}
-
-
-{% block layout_footer %}
-  {% parent %}
-  {% include '../widget/system-version.html' %}
-{% endblock %}

+ 1 - 1
lib/views/layout-growi/not_found.html

@@ -1,4 +1,4 @@
-{% extends 'base/not_found_nosidebar.html' %}
+{% extends 'base/layout.html' %}
 
 {% block main_css_class %}
   main-crowi-plus-customized

+ 1 - 1
lib/views/layout-growi/page.html

@@ -1,4 +1,4 @@
-{% extends 'base/page_nosidebar.html' %}
+{% extends 'base/layout.html' %}
 
 {% block main_css_class %}
   {% parent %}

+ 1 - 1
lib/views/layout-growi/page_list.html

@@ -1,4 +1,4 @@
-{% extends 'base/page_nosidebar.html' %}
+{% extends 'base/layout.html' %}
 
 {% block main_css_class %}
   main-crowi-plus-customized