ali 2 gadi atpakaļ
vecāks
revīzija
116c893f17

+ 7 - 0
src/components/Template/SideBar/AdminPanelSideBar.vue

@@ -114,6 +114,13 @@ export default {
               show: true,
               active: false
             },
+            {
+              title: 'لیست فیش ها',
+              roles: ['superuser'],
+              routeName: 'Admin.ContentTopic.List',
+              show: true,
+              active: false
+            },
             {
               title: 'دسته بندی موضوعی',
               roles: ['superuser'],

+ 5 - 0
src/components/Widgets/Content/AdminContentTopicList/AdminContentTopicList.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="AdminContentTopicList"
        :style="localOptions.style">
+    <div class="more-action">
+      <q-btn label="فیش جدید"
+             color="primary"
+             :to="{name: 'Admin.ContentTopic.Create'}" />
+    </div>
     <entity-index v-if="mounted"
                   v-model:value="inputs"
                   title="لیست فیش ها"

+ 23 - 0
src/pages/Admin/ContentTopic/Create.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.ContentTopic.Create',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminContentTopicCreate' }], options: {} }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '10px', alignment: { justifyContent: { global: null, xl: null, lg: null, md: null, sm: null, xs: null }, alignItems: { global: null, xl: null, lg: null, md: null, sm: null, xs: null }, alignContent: { global: null, xl: null, lg: null, md: null, sm: null, xs: null } }, style: { maxWidth: '1200px', width: '1200px' } } }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/ContentTopic/List.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.ContentTopic.List',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminContentTopicList' }], options: {} }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '10px', alignment: { justifyContent: { global: null, xl: null, lg: null, md: null, sm: null, xs: null }, alignItems: { global: null, xl: null, lg: null, md: null, sm: null, xs: null }, alignContent: { global: null, xl: null, lg: null, md: null, sm: null, xs: null } }, style: { maxWidth: '1200px', width: '1200px' } } }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 2 - 0
src/router/routes/Admin.js

@@ -213,6 +213,8 @@ export default {
       name: 'Admin.ContentTopic',
       component: () => import('layouts/bareLayout.vue'),
       children: [
+        { path: '', name: 'Admin.ContentTopic.List', component: () => import('src/pages/Admin/ContentTopic/List.vue') },
+        { path: 'create', name: 'Admin.ContentTopic.Create', component: () => import('src/pages/Admin/ContentTopic/Create.vue') },
         { path: ':id', name: 'Admin.ContentTopic.Show', component: () => import('src/pages/Admin/ContentTopic/Show.vue') }
       ]
     },