Merge branch 'show-draft-status-in-admin' into 'master'

Show draft status in admin

Closes #413

See merge request framasoft/mobilizon!734
This commit is contained in:
Thomas Citharel 2020-12-01 10:16:02 +01:00
commit 1ed6fbae4e
4 changed files with 9 additions and 4 deletions

View File

@ -84,7 +84,6 @@ export const GROUP_FIELDS_FRAGMENTS = gql`
id id
url url
} }
mediaSize
organizedEvents( organizedEvents(
afterDatetime: $afterDateTime afterDatetime: $afterDateTime
beforeDatetime: $beforeDateTime beforeDatetime: $beforeDateTime
@ -96,6 +95,7 @@ export const GROUP_FIELDS_FRAGMENTS = gql`
uuid uuid
title title
beginsOn beginsOn
draft
options { options {
maximumAttendeeCapacity maximumAttendeeCapacity
} }
@ -213,6 +213,7 @@ export const GET_GROUP = gql`
$organisedEventslimit: Int $organisedEventslimit: Int
) { ) {
getGroup(id: $id) { getGroup(id: $id) {
mediaSize
...GroupFullFields ...GroupFullFields
} }
} }

View File

@ -8,6 +8,7 @@ export const POST_FRAGMENT = gql`
slug slug
url url
body body
draft
author { author {
id id
preferredUsername preferredUsername

View File

@ -9,7 +9,6 @@ const DEFAULT_LOCALE = "en_US";
let language = let language =
getLocaleData() || (document.documentElement.getAttribute("lang") as string); getLocaleData() || (document.documentElement.getAttribute("lang") as string);
console.log("lang1", language);
language = language =
language || language ||
@ -17,14 +16,12 @@ language =
/-/, /-/,
"_" "_"
); );
console.log("language2", language);
export const locale = export const locale =
language && Object.prototype.hasOwnProperty.call(langs, language) language && Object.prototype.hasOwnProperty.call(langs, language)
? language ? language
: language.split("-")[0]; : language.split("-")[0];
console.log("lang3", locale);
Vue.use(VueI18n); Vue.use(VueI18n);
export const i18n = new VueI18n({ export const i18n = new VueI18n({

View File

@ -200,6 +200,9 @@
:to="{ name: RouteName.EVENT, params: { uuid: props.row.uuid } }" :to="{ name: RouteName.EVENT, params: { uuid: props.row.uuid } }"
> >
{{ props.row.title }} {{ props.row.title }}
<b-tag type="is-info" v-if="props.row.draft">{{
$t("Draft")
}}</b-tag>
</router-link> </router-link>
</b-table-column> </b-table-column>
<b-table-column <b-table-column
@ -240,6 +243,9 @@
:to="{ name: RouteName.POST, params: { slug: props.row.slug } }" :to="{ name: RouteName.POST, params: { slug: props.row.slug } }"
> >
{{ props.row.title }} {{ props.row.title }}
<b-tag type="is-info" v-if="props.row.draft">{{
$t("Draft")
}}</b-tag>
</router-link> </router-link>
</b-table-column> </b-table-column>
<b-table-column <b-table-column