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

Merge pull request #1815 from weseek/imprv/page-alert-fix-all

Imprv/page alert fix all
Yuki Takei 6 лет назад
Родитель
Сommit
f00dfac34c

+ 1 - 2
src/client/styles/scss/_on-edit.scss

@@ -34,12 +34,11 @@ body.on-edit {
   .users-info,
   .users-info,
   .user-page-content-container,
   .user-page-content-container,
   .portal-form-button,
   .portal-form-button,
-  .alert-info.alert-moved,
-  .alert-info.alert-unlinked,
   .btn-like,
   .btn-like,
   .btn-bookmark,
   .btn-bookmark,
   .btn-edit,
   .btn-edit,
   .authors,
   .authors,
+  .hide-on-edit,
   footer {
   footer {
     display: none !important;
     display: none !important;
   }
   }

+ 0 - 8
src/client/styles/scss/_page.scss

@@ -30,14 +30,6 @@
   }
   }
 }
 }
 
 
-// alert component settings
-.alert-trash,
-.alert-moved,
-.alert-unlinked,
-.alert-grant {
-  padding: 10px 15px;
-}
-
 .main .content-main .revision-history {
 .main .content-main .revision-history {
   .revision-history-list {
   .revision-history-list {
     .revision-history-outer {
     .revision-history-outer {

+ 1 - 1
src/server/views/widget/forbidden_content.html

@@ -14,7 +14,7 @@
 
 
   <div class="row row-alerts">
   <div class="row row-alerts">
     <div class="col-xs-12">
     <div class="col-xs-12">
-        <p class="alert alert-inverse alert-grant">
+        <p class="alert alert-inverse alert-grant"> <!-- TODO remove inverse and grant -->
           <i class="icon-fw icon-lock" aria-hidden="true"></i> Browsing of this page is restricted
           <i class="icon-fw icon-lock" aria-hidden="true"></i> Browsing of this page is restricted
         </p>
         </p>
     </div>
     </div>

+ 6 - 6
src/server/views/widget/page_alerts.html

@@ -2,7 +2,7 @@
   <div class="col-sm-12">
   <div class="col-sm-12">
     {% if page && page.grant && page.grant > 1 %}
     {% if page && page.grant && page.grant > 1 %}
 
 
-      <p class="alert alert-inverse alert-grant">
+      <p class="alert alert-primary py-3 px-4">
       {% if page.grant == 2 %}
       {% if page.grant == 2 %}
         <i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
         <i class="icon-fw icon-link"></i><strong>{{ consts.pageGrants[page.grant] }}</strong> ({{ t('Browsing of this page is restricted') }})
       {% elseif page.grant == 4 %}
       {% elseif page.grant == 4 %}
@@ -29,7 +29,7 @@
     {% endif %}
     {% endif %}
 
 
     {% if redirectFrom or req.query.renamed or req.query.redirectFrom %}
     {% if redirectFrom or req.query.renamed or req.query.redirectFrom %}
-    <div class="alert alert-info alert-moved d-flex align-items-center justify-content-between">
+    <div class="alert alert-info hide-on-edit py-3 px-4 d-flex align-items-center justify-content-between">
       <span>
       <span>
         {% set fromPath = req.query.renamed or req.query.redirectFrom %}
         {% set fromPath = req.query.renamed or req.query.redirectFrom %}
         {% if redirectFrom or req.query.redirectFrom %}
         {% if redirectFrom or req.query.redirectFrom %}
@@ -43,7 +43,7 @@
       <form role="form" id="unlink-page-form" onsubmit="return false;">
       <form role="form" id="unlink-page-form" onsubmit="return false;">
         <input type="hidden" name="_csrf" value="{{ csrf() }}">
         <input type="hidden" name="_csrf" value="{{ csrf() }}">
         <input type="hidden" name="path" value="{{ path }}">
         <input type="hidden" name="path" value="{{ path }}">
-        <button type="submit" class="btn btn-default btn-sm float-right">
+        <button type="submit" class="btn btn-light btn-sm float-right">
           <i class="ti-unlink" aria-hidden="true"></i>
           <i class="ti-unlink" aria-hidden="true"></i>
           Unlink
           Unlink
         </button>
         </button>
@@ -53,7 +53,7 @@
     {% endif %}
     {% endif %}
 
 
     {% if req.query.duplicated and not page.isDeleted() %}
     {% if req.query.duplicated and not page.isDeleted() %}
-    <div class="alert alert-success alert-moved">
+    <div class="alert alert-success py-3 px-4">
       <span>
       <span>
         <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
         <strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
       </span>
       </span>
@@ -61,7 +61,7 @@
     {% endif %}
     {% endif %}
 
 
     {% if req.query.unlinked %}
     {% if req.query.unlinked %}
-    <div class="alert alert-info alert-unlinked">
+    <div class="alert alert-info hide-on-edit py-3 px-4">
       <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
       <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }}
     </div>
     </div>
     {% endif %}
     {% endif %}
@@ -81,7 +81,7 @@
     {% endif %}
     {% endif %}
 
 
     {% if isTrashPage() %}
     {% if isTrashPage() %}
-    <div class="alert alert-warning alert-trash d-flex align-items-center justify-content-between">
+    <div class="alert alert-warning py-3 px-4 d-flex align-items-center justify-content-between">
       <div>
       <div>
         This page is in the trash <i class="icon-trash" aria-hidden="true"></i>.
         This page is in the trash <i class="icon-trash" aria-hidden="true"></i>.
         {% if page.isDeleted() %}
         {% if page.isDeleted() %}