Sfoglia il codice sorgente

hide tags on view on new page

yusuketk 7 anni fa
parent
commit
15d8208149

+ 1 - 1
src/client/js/components/Page/TagLabels.jsx

@@ -56,7 +56,7 @@ class TagLabels extends React.Component {
     }
 
     return (
-      <div className="tag-viewer">
+      <div className={`tag-viewer ${this.props.pageId ? 'existed-page' : 'new-page'}`}>
         {this.state.tags.length === 0 && (
           <a className="btn btn-link btn-edit-tags no-tags p-0" onClick={this.showEditor}>
             { t('Add tags for this page') } <i className="manage-tags ml-2 icon-plus"></i>

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

@@ -120,13 +120,8 @@ body.on-edit {
       }
     }
 
-    div#page-tag {
-      display: inline;
-      margin-right: auto;
-
-      .page-tag-form {
-        border-radius: 5px;
-      }
+    .tag-viewer.new-page {
+      display: block;
     }
 
     // hide if screen size is less than tablet

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

@@ -89,6 +89,10 @@
         }
       }
     }
+
+    .tag-viewer.new-page {
+      display: none;
+    }
   }
 
   // alert component settings

+ 1 - 1
src/server/views/layout-crowi/not_found.html

@@ -10,7 +10,7 @@
       <div>
         <div>
           <h1 class="title" id="revision-path"></h1>
-          {% if page and not forbidden and not isTrashPage() %}
+          {% if not forbidden and not isTrashPage() %}
             <div id="tag-label"></div>
           {% endif %}
         </div>

+ 1 - 1
src/server/views/layout-growi/widget/header.html

@@ -8,7 +8,7 @@
       </div>
       <div class="title-container">
         <h1 class="title" id="revision-path"></h1>
-        {% if page and not forbidden and not isTrashPage() %}
+        {% if not forbidden and not isTrashPage() %}
           <div id="tag-label"></div>
         {% endif %}
       </div>

+ 1 - 1
src/server/views/layout-kibela/widget/header.html

@@ -7,7 +7,7 @@
     </div>
     <div class="title-container">
       <h1 class="title" id="revision-path"></h1>
-      {% if page and not forbidden and not isTrashPage() %}
+      {% if not forbidden and not isTrashPage() %}
         <div id="tag-label"></div>
       {% endif %}
     </div>