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

WIP: reconstruct layouts

* page grant alerts
Yuki Takei 8 лет назад
Родитель
Сommit
80cf396bd8

+ 0 - 12
lib/views/layout-crowi/base/layout.html

@@ -30,18 +30,6 @@
 
   <div class="row">
     <div id="main" class="main m-t-15 col-md-9 {% 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 %}
-
       {% block content_main_before %}
       {% endblock %}
 

+ 0 - 13
lib/views/layout-growi/base/layout.html

@@ -13,18 +13,6 @@
 
   <div class="row">
     <div id="main" class="main m-t-15 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 %}
-
       {% block content_main_before %}
       {% endblock %}
 
@@ -33,7 +21,6 @@
 
       {% block content_main_after %}
       {% endblock %}
-
     </div>
 
   </div>

+ 6 - 0
lib/views/widget/page_alerts.html

@@ -1,5 +1,11 @@
 <div class="row row-alerts">
   <div class="col-xs-12">
+    {% if page && page.grant != 1 %}
+    <p class="alert alert-inverse alert-grant">
+      <i class="icon-fw icon-lock"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
+    </p>
+    {% endif %}
+
     {% if page.isDeleted() %}
     <div class="alert alert-warning alert-trash d-flex align-items-center justify-content-between">
       <div>

+ 2 - 21
resource/styles/scss/_page.scss

@@ -89,30 +89,11 @@
 
   }
 
-  // alert component settings for trash page and moved page
-  .alert-trash, .alert-moved, .alert-unlinked {
+  // alert component settings
+  .alert-trash, .alert-moved, .alert-unlinked, .alert-grant {
     padding: 10px 15px;
   }
 
-  /*
-  // {{{ grant related style
-  .main.grant-restricted,
-  .main.grant-specified,
-  .main.grant-owner {
-    background: #333;
-    padding: 16px;
-
-    .page-grant {
-      color: #ccc;
-    }
-
-    article {
-      border-radius: 5px;
-    }
-  }
-  // }}}
-
-  */
 }
 
 .main-container .main .content-main .revision-history { // {{{