Commit e8756e91 authored by Jean Rabreau's avatar Jean Rabreau
Browse files

馃攢Merge branch 'feature/publicity' into develop

parents 082e8129 b8cbb5e6
Pipeline #61657 passed with stages
in 3 minutes and 51 seconds
<template>
<v-switch
v-model="visible"
:label="$t(`visibility.${visible ? 'public' : 'restricted'}`)"
:input-value="isPublic"
:prepend-icon="`mdi-eye${isPublic ?'':'-off-outline'}`"
:label="$t(`visibility.${isPublic ? 'public' : 'restricted'}`)"
@change="$emit('update:is-public', $event)"
/>
</template>
......@@ -11,15 +13,8 @@ export default {
props: {
isPublic: {
type: Boolean,
default: false
}
},
computed: {
visible: {
get() { return this.isPublic },
set() { this.$emit('update:is-public', !this.isPublic) }
}
}
}
</script>
......
......@@ -7,16 +7,14 @@
/>
</v-col>
<v-col>
<v-checkbox
:label="$t('visibility.public')"
v-model="item.isPublic"
/>
<Visibility :is-public.sync="item.isPublic"/>
</v-col>
</v-row>
</template>
<script>
import RichText from '@/components/common/RichTextInput';
import Visibility from '@/components/common/Visibility'
export default {
name: 'ItemFormDetail',
......@@ -34,6 +32,7 @@ export default {
},
components: {
RichText,
Visibility,
},
data: function() {
return {
......
......@@ -15,10 +15,7 @@
/>
</v-col>
<v-col>
<v-switch
:label="$t('visibility.public')"
v-model="project.isPublic"
/>
<Visibility :is-public.sync="project.isPublic" />
</v-col>
</v-row>
</template>
......@@ -26,6 +23,7 @@
<script>
import RulesMixin from '@/mixins/RulesMixin';
import RichText from '@/components/common/RichTextInput'
import Visibility from '@/components/common/Visibility'
export default {
name: 'ProjectForm',
......@@ -51,6 +49,7 @@ export default {
],
components: {
RichText,
Visibility,
},
data: function() {
return {
......
......@@ -33,10 +33,7 @@
/>
</v-col>
<v-col>
<v-checkbox
:label="$t('visibility.public')"
v-model="set.isPublic"
/>
<Visibility :is-public.sync="set.isPublic" />
</v-col>
</v-row>
</template>
......@@ -46,6 +43,7 @@ import { mapGetters } from 'vuex'
import RulesMixin from '@/mixins/RulesMixin';
import RichText from '@/components/common/RichTextInput'
import {TEMPLATE_SCOPE} from '@/store/template'
import Visibility from '@/components/common/Visibility'
export default {
name: 'SetForm',
......@@ -86,6 +84,7 @@ export default {
],
components: {
RichText,
Visibility,
},
data: function() {
return {
......
......@@ -60,5 +60,14 @@ export default {
.v-expansion-panel-header {
padding: 0 0 0 8px;
}
> div:last-child {
position: sticky;
top: 74px;
}
#UsfActionButtonsContainer {
button:first-child{ // preview button
display: none;
}
}
}
</style>
......@@ -13,52 +13,37 @@
</v-btn>
</v-toolbar>
<v-sheet class="pa-3">
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type="item"
:object-id="item.id"
:thumbnail="item.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider />
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{ $t('project.generalInfo.label') }}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form ref="itemEdit">
<item-form-detail
ref="itemFormDetail"
:presentation="item.description"
:is-public="item.isPublic"
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<section>
<h3>{{ $t('project.generalInfo.label') }}</h3><v-form ref="itemEdit">
<item-form-detail
ref="itemFormDetail"
:presentation="item.description"
:is-public="item.isPublic"
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider />
<section>
<h3>Avatar</h3>
<thumbnail-upload
object-type="item"
:object-id="item.id"
:thumbnail="item.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</template>
......@@ -92,3 +77,9 @@ export default {
},
};
</script>
<style lang="scss" scoped>
section {
padding: 2rem;
}
</style>
......@@ -87,9 +87,13 @@ export default {
title: this.project.name,
subtitles: [
this.$t('project.subtitles.managers', { names, label }),
this.visibility
],
};
},
visibility() {
return this.$t(`visibility.${this.project.isPublic ? 'public' : 'restricted'}`)
},
tabs() {
const tabs = [
{
......
......@@ -12,56 +12,42 @@
{{ $t('btn.back') }}
</v-btn>
</v-toolbar>
<v-sheet class="pa-3">
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type="project"
:object-id="project.id"
:thumbnail="project.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider />
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{ $t('project.generalInfo.label') }}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form ref="projectEdit">
<project-form
ref="projectForm"
:name="project.name"
:description="project.description"
:is-public="project.isPublic"
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
</v-col>
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<v-sheet>
<section>
<h3>{{ $t('project.generalInfo.label') }}</h3>
<v-form ref="projectEdit">
<project-form
ref="projectForm"
:name="project.name"
:description="project.description"
:is-public="project.isPublic"
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
</v-col>
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider></v-divider>
<section>
<h3>Avatar</h3>
<thumbnail-upload
object-type="project"
:object-id="project.id"
:thumbnail="project.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</template>
......@@ -95,3 +81,9 @@ export default {
},
};
</script>
<style lang="scss" scoped>
section {
padding: 2rem;
}
</style>
......@@ -12,57 +12,43 @@
{{ $t('btn.back') }}
</v-btn>
</v-toolbar>
<v-sheet class="pa-3">
<v-expansion-panels
tile
flat
hover
>
<v-expansion-panel>
<v-expansion-panel-header>
Avatar
</v-expansion-panel-header>
<v-expansion-panel-content>
<thumbnail-upload
object-type="set"
:object-id="set.id"
:thumbnail="set.thumbnails.m"
/>
</v-expansion-panel-content>
<v-divider />
</v-expansion-panel>
<v-expansion-panel>
<v-expansion-panel-header>
{{ $t('project.generalInfo.label') }}
</v-expansion-panel-header>
<v-expansion-panel-content>
<v-form ref="setEdit">
<set-form
ref="setForm"
:title="set.title"
:description="set.description"
:publisher="set.publisher"
:template="set.template.id"
:is-public="set.isPublic"
edit
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-content>
</v-expansion-panel>
</v-expansion-panels>
<v-sheet>
<section>
<h3>{{ $t('project.generalInfo.label') }}</h3>
<v-form ref="setEdit">
<set-form
ref="setForm"
:title="set.title"
:description="set.description"
:publisher="set.publisher"
:template="set.template.id"
:is-public="set.isPublic"
edit
/>
</v-form>
<v-row>
<v-spacer />
<v-col class="flex-grow-0">
<v-btn
tile
elevation="0"
color="primary"
@click="onSubmit"
>
{{ $t('btn.validate') }}
</v-btn>
</v-col>
</v-row>
</section>
<v-divider />
<section>
<h3>Avatar</h3>
<thumbnail-upload
object-type="set"
:object-id="set.id"
:thumbnail="set.thumbnails.m"
/>
</section>
</v-sheet>
</div>
</template>
......@@ -96,3 +82,9 @@ export default {
},
};
</script>
<style lang="scss" scoped>
section {
padding: 2rem;
}
</style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment