SyuanYu 2 лет назад
Родитель
Сommit
9b1861d15f

+ 16 - 4
backstage/templates/blogs.html

@@ -4,11 +4,16 @@
 <script src="https://cdn.jsdelivr.net/npm/@editorjs/image@latest"></script><!-- Image -->
 <script type="text/javascript" src="/static/js/yo.js"></script>
 {% for idx in range(0, length) %}
-{% if blogs[idx].url != '/blogs' %}
 <tbody>
   <tr>
     <td class="table__data">{{ idx+1 }}</td>
-    <td class="table__data">{{ blogs[idx].title }}</td>
+    <td class="table__data">
+      {{ blogs[idx].title }}
+      {% if blogs[idx].url == '/blog' %}
+      <span class="badge bg-secondary text-white ml-2">根目錄</span>
+      <span class="badge bg-danger text-white">請勿刪除</span>
+      {% endif %}
+    </td>
     <td class="table__data">{{ blogs[idx].date }}</td>
     <td class="table__data"><input type="checkbox" {{ 'checked' if (blogs[idx].draft.lower()=='false' ) }}
         onclick="toggleDraft(this,'{{ blogs[idx].url }}');" /></td>
@@ -26,7 +31,6 @@
     </td>
   </tr>
 </tbody>
-{% endif %}
 {% endfor %}
 {% endblock table_body %}
 {% block modal_body %}
@@ -129,11 +133,19 @@
                 <div class="mt-1">目錄使用,將說明本文章可以解決的問題</div>
               </td>
             </tr>
+            <tr>
+              <td>
+                <h4>標籤名稱</h4>
+              </td>
+              <td>
+                <input class="form-control" id="cblogtags" type="text" />
+              </td>
+            </tr>
             <tr class="d-none">
               <td>
                 <h4>是否顯示</h4>
               </td>
-              <td><input id="cdraft" type="checkbox"/></td>
+              <td><input id="cdraft" type="checkbox" /></td>
             </tr>
           </tbody>
         </table>

+ 7 - 3
backstage/templates/collections.html

@@ -4,11 +4,16 @@
 <script src="https://cdn.jsdelivr.net/npm/@editorjs/image@latest"></script><!-- Image -->
 <script type="text/javascript" src="/static/js/yo.js"></script>
 {% for idx in range(0, length) %}
-{% if collections[idx].url != '/collection' %}
 <tbody>
   <tr>
     <td class="table__data">{{ idx + 1 }}</td>
-    <td class="table__data">{{ collections[idx].title }}</td>
+    <td class="table__data">
+      {{ collections[idx].title }}
+      {% if collections[idx].url == '/collection' %}
+      <span class="badge bg-secondary text-white ml-2">根目錄</span>
+      <span class="badge bg-danger text-white">請勿刪除</span>
+      {% endif %}
+    </td>
     <td class="table__data">{{ collections[idx].date }}</td>
     <!-- <td class="table__data">1</td> -->
     <td class="table__data"><input type="checkbox" {{ 'checked' if (collections[idx].draft.lower()=='false' ) }}
@@ -28,7 +33,6 @@
     </td>
   </tr>
 </tbody>
-{% endif %}
 {% endfor %}
 {% endblock table_body %}
 

+ 7 - 1
backstage/templates/solid_wood_furniture.html

@@ -8,7 +8,13 @@
     {% for idx in range(0, length) %}
     <tr>
         <td class="table__data">{{ idx + 1 }}</td>
-        <td class="table__data">{{ furnitures[idx].title }}</td>
+        <td class="table__data">{{ furnitures[idx].title }}
+            <!-- 判斷是否為根目錄 -->
+            {% if furnitures[idx].url == '/furniture_design/cabinet' or furnitures[idx].url == '/furniture_design/desk' or furnitures[idx].url == '/furniture_design/dining_chair' or furnitures[idx].url == '/furniture_design/dining_table' or furnitures[idx].url == '/furniture_design/mattress' or furnitures[idx].url == '/furniture_design/mattress/bed' or furnitures[idx].url == '/furniture_design/other_furniture' or furnitures[idx].url == '/furniture_design/side_cabinet' or furnitures[idx].url == '/furniture_design/side_table' or furnitures[idx].url == '/furniture_design/sofa' or furnitures[idx].url == '/furniture_design/wardrobe' %}
+            <span class="badge bg-secondary text-white ml-2">根目錄</span>
+            <span class="badge bg-danger text-white">請勿刪除</span>
+            {% endif %}
+        </td>
         <td class="table__data">{{ furnitures[idx].date }}</td>
         <!-- <td class="table__data">1</td> -->
         <td class="table__data"><input type="checkbox" {{ 'checked' if (furnitures[idx].draft.lower()=='false' ) }}