Просмотр исходного кода

WIP: reconstruct layouts

* not found
Yuki Takei 8 лет назад
Родитель
Сommit
356b7cdb84

+ 1 - 1
lib/views/layout-growi/base/not_found_nosidebar.html

@@ -1,4 +1,4 @@
-{% extends '../../not_found.html' %}
+{% extends '../../layout/layout.html' %}
 
 
 {% block layout_main %}

+ 11 - 4
lib/views/layout-growi/not_found.html

@@ -2,7 +2,6 @@
 
 {% block main_css_class %}
   main-crowi-plus-customized
-  {% parent %}
 {% endblock %}
 
 {% block layout_header %}
@@ -18,16 +17,24 @@
 {% endblock %} {# /content_head #}
 
 
+{% block content_main_before %}
+  {% include '../widget/page_alerts.html' %}
+{% endblock %}
+
+
 {% block content_main %}
   <div class="container-fluid">
-    <div class="row">
 
+    <div class="row">
       <div class="col-lg-10 col-md-9">
+        <h2 class="message-not-found text-muted">
+          <i class="icon-info" aria-hidden="true"></i>
+          Page is not found
+        </h2>
 
-        {% parent %}
+        {% include '../widget/not_found_content.html' %}
 
       </div> {# /.col- #}
-
     </div>
 
   </div>

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

@@ -47,7 +47,7 @@
     </div>
 
     {% if 'crowi-plus' === behaviorType() %}
-    <div class="row page-list">
+    <div class="row page-list m-t-30">
       <div class="col-md-12">
         {% include '../widget/page_list_and_timeline.html' %}
       </div>

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

@@ -50,7 +50,7 @@
 
     </div>
 
-    <div class="row page-list">
+    <div class="row page-list m-t-30">
       <div class="col-md-12">
         {% include '../widget/page_list_and_timeline.html' %}
       </div>

+ 7 - 56
lib/views/not_found.html

@@ -22,74 +22,25 @@
 
 {% endblock %} {# /content_head #}
 
-{% block content_main %}
 
 {% block content_main_before %}
-  {% if req.query.renamed %}
-  <div class="alert alert-info alert-moved">
-    <span>
-      <strong>{{ t('Moved') }}: </strong> {{ t('page_page.notice.moved', req.query.renamed) }}
-    </span>
-  </div>
-  {% endif %}
-  {% if req.query.unlinked %}
-  <div class="alert alert-info alert-unlinked">
-    <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
-  </div>
-  {% endif %}
+  {% include 'widget/page_alerts.html' %}
+{% endblock %}
+
 
-  <h2 class="message-not-found text-muted">
+{% block content_main %}
+  <h2 class="m-l-15 message-not-found text-muted">
     <i class="icon-info" aria-hidden="true"></i>
     Page is not found
   </h2>
-{% endblock %}
-
-<div id="content-main" class="content-main content-main-not-found page-list"
-  data-path="{{ path }}"
-  data-path-shortname="{{ path|path2name }}"
-  data-current-user="{% if user %}{{ user._id.toString() }}{% endif %}"
-  >
-
-  <ul class="nav nav-tabs hidden-print">
-    <li class="active"><a href="#revision-body" data-toggle="tab">{{ t('List View') }}</a></li>
 
-    <li>
-      <a {% if user %}href="#edit-form" data-toggle="tab"{% endif %} class="edit-button {% if not user %}edit-button-disabled{% endif %}">
-        <i class="icon-note"></i> {{ t('Create') }}
-      </a>
-    </li>
-
-    {% if user %}
-    <li class="dropdown pull-right">
-      <a href="#" onclick="history.back();"><i class="icon-close"></i> {{ t('Cancel') }}</a>
-    </li>
-    {% endif %}
-  </ul>
-
-  <div class="tab-content">
-    {# list view #}
-    <div class="active tab-pane page-list-container" id="revision-body">
-      {% if pages.length == 0 %}
-        <div class="m-t-20">
-          There are no pages under <strong>{{ path }}</strong>.
-        </div>
-      {% endif  %}
-
-      {% include 'widget/page_list.html' with { pages: pages, pager: pager, viewConfig: viewConfig } %}
-    </div>
-
-    {# edit view #}
-    <div class="edit-form tab-pane {% if req.body.pageForm %}active{% endif %}" id="edit-form">
-      {% include '_form.html' %}
-    </div>
+  {% include 'widget/not_found_content.html' %}
+{% endblock %}
 
-  </div>
-</div>
 
 {% block content_main_after %}
 {% endblock %}
 
-{% endblock %}
 
 {% block content_footer %}
 {% endblock %}

+ 27 - 0
lib/views/widget/not_found_content.html

@@ -0,0 +1,27 @@
+<div id="content-main" class="content-main content-main-not-found page-list"
+  data-path="{{ path }}"
+  data-path-shortname="{{ path|path2name }}"
+  data-current-user="{% if user %}{{ user._id.toString() }}{% endif %}"
+  >
+
+  {% include 'not_found_tabs.html' %}
+
+  <div class="tab-content">
+    {# list view #}
+    <div class="p-t-10 active tab-pane page-list-container" id="revision-body">
+      {% if pages.length == 0 %}
+        <div class="m-t-20">
+          There are no pages under <strong>{{ path }}</strong>.
+        </div>
+      {% endif  %}
+
+      {% include '../widget/page_list.html' with { pages: pages, pager: pager, viewConfig: viewConfig } %}
+    </div>
+
+    {# edit view #}
+    <div class="edit-form tab-pane {% if req.body.pageForm %}active{% endif %}" id="edit-form">
+      {% include '../_form.html' %}
+    </div>
+
+  </div>
+</div>

+ 9 - 0
lib/views/widget/not_found_tabs.html

@@ -0,0 +1,9 @@
+<ul class="nav nav-tabs hidden-print">
+  <li class="active"><a href="#revision-body" data-toggle="tab">{{ t('List View') }}</a></li>
+
+  <li>
+    <a {% if user %}href="#edit-form" data-toggle="tab"{% endif %} class="edit-button {% if not user %}edit-button-disabled{% endif %}">
+      <i class="icon-note"></i> {{ t('Create') }}
+    </a>
+  </li>
+</ul>