diff --git a/client/components/profile.vue b/client/components/profile.vue
index ab407bda..aa96883d 100644
--- a/client/components/profile.vue
+++ b/client/components/profile.vue
@@ -22,7 +22,7 @@
//- v-list-item-title {{$t('profile:comments.title')}}
//- v-list-item-subtitle.caption.grey--text.text--lighten-1 Coming soon
- v-content
+ v-content(:class='darkMode ? "grey darken-4" : "grey lighten-5"')
transition(name='profile-router')
router-view
diff --git a/client/components/profile/pages.vue b/client/components/profile/pages.vue
index 2f9804fa..65a6f558 100644
--- a/client/components/profile/pages.vue
+++ b/client/components/profile/pages.vue
@@ -1,5 +1,5 @@
- v-container(fluid, fill-height, grid-list-lg)
+ v-container(fluid, grid-list-lg)
v-layout(row wrap)
v-flex(xs12)
.profile-header
@@ -7,13 +7,111 @@
.profile-header-title
.headline.primary--text.animated.fadeInLeft {{$t('profile:pages.title')}}
.subheading.grey--text.animated.fadeInLeft {{$t('profile:pages.subtitle')}}
+ v-spacer
+ v-btn.animated.fadeInDown.wait-p1s(color='grey', outlined, @click='refresh', large)
+ v-icon.grey--text mdi-refresh
+ v-flex(xs12)
+ v-card.animated.fadeInUp
+ v-data-table(
+ :items='pages'
+ :headers='headers'
+ :page.sync='pagination'
+ :items-per-page='15'
+ :loading='loading'
+ must-sort,
+ sort-by='updatedAt',
+ sort-desc,
+ hide-default-footer
+ )
+ template(slot='item', slot-scope='props')
+ tr.is-clickable(:active='props.selected', @click='goToPage(props.item.id)')
+ td
+ .body-2: strong {{ props.item.title }}
+ .caption {{ props.item.description }}
+ td.admin-pages-path
+ v-chip(label, small, :color='$vuetify.theme.dark ? `grey darken-4` : `grey lighten-4`') {{ props.item.locale }}
+ span.ml-2.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-2`') / {{ props.item.path }}
+ td {{ props.item.createdAt | moment('calendar') }}
+ td {{ props.item.updatedAt | moment('calendar') }}
+ template(slot='no-data')
+ v-alert.ma-3(icon='mdi-alert', :value='true', outlined, color='grey')
+ em.caption {{$t('profile:pages.emptyList')}}
+ .text-center.py-2.animated.fadeInDown(v-if='this.pageTotal > 1')
+ v-pagination(v-model='pagination', :length='pageTotal')
diff --git a/server/graph/resolvers/page.js b/server/graph/resolvers/page.js
index 1f54daca..325c8800 100644
--- a/server/graph/resolvers/page.js
+++ b/server/graph/resolvers/page.js
@@ -97,6 +97,18 @@ module.exports = {
if (args.locale) {
queryBuilder.where('localeCode', args.locale)
}
+ if (args.creatorId && args.authorId && args.creatorId > 0 && args.authorId > 0) {
+ queryBuilder.where(function () {
+ this.where('creatorId', args.creatorId).orWhere('authorId', args.authorId)
+ })
+ } else {
+ if (args.creatorId && args.creatorId > 0) {
+ queryBuilder.where('creatorId', args.creatorId)
+ }
+ if (args.authorId && args.authorId > 0) {
+ queryBuilder.where('authorId', args.authorId)
+ }
+ }
if (args.tags && args.tags.length > 0) {
queryBuilder.whereIn('tags.tag', args.tags)
}
diff --git a/server/graph/schemas/page.graphql b/server/graph/schemas/page.graphql
index a2875caf..35501e92 100644
--- a/server/graph/schemas/page.graphql
+++ b/server/graph/schemas/page.graphql
@@ -38,6 +38,8 @@ type PageQuery {
orderByDirection: PageOrderByDirection
tags: [String!]
locale: String
+ creatorId: Int
+ authorId: Int
): [PageListItem!]! @auth(requires: ["manage:system", "read:pages"])
single(