Remove subtitle from room entry
This commit is contained in:
parent
a51a882c1d
commit
90f980fe09
|
|
@ -14,9 +14,7 @@
|
||||||
@input="setContentBlockType"
|
@input="setContentBlockType"
|
||||||
class="contents-form__task"
|
class="contents-form__task"
|
||||||
></checkbox>
|
></checkbox>
|
||||||
<modal-input v-if="blockType === 'RoomEntry'"
|
|
||||||
placeholder="Untertitel für Raumeintrag erfassen"
|
|
||||||
v-model="localContentBlock.subtitle"></modal-input>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<add-content-element class="contents-form__add"
|
<add-content-element class="contents-form__add"
|
||||||
|
|
@ -113,7 +111,6 @@
|
||||||
title: this.contentBlock.title,
|
title: this.contentBlock.title,
|
||||||
contents: [...this.contentBlock.contents],
|
contents: [...this.contentBlock.contents],
|
||||||
id: this.contentBlock.id || undefined,
|
id: this.contentBlock.id || undefined,
|
||||||
subtitle: this.contentBlock.subtitle,
|
|
||||||
isAssignment: this.contentBlock.type && this.contentBlock.type === 'TASK'
|
isAssignment: this.contentBlock.type && this.contentBlock.type === 'TASK'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
return {
|
return {
|
||||||
entry: {
|
entry: {
|
||||||
title: '',
|
title: '',
|
||||||
subtitle: '',
|
|
||||||
contents: []
|
contents: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ fragment RoomEntryParts on RoomEntryNode {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
title
|
title
|
||||||
subtitle
|
|
||||||
contents
|
contents
|
||||||
author {
|
author {
|
||||||
id
|
id
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ mutation AddRoomEntry($input: AddRoomEntryInput!){
|
||||||
#{"input": {
|
#{"input": {
|
||||||
# "roomEntry": {
|
# "roomEntry": {
|
||||||
# "title": "Hi",
|
# "title": "Hi",
|
||||||
# "subtitle": "Marc",
|
|
||||||
# "contents": [{
|
# "contents": [{
|
||||||
# "type": "text_block",
|
# "type": "text_block",
|
||||||
# "value": {"text": "Something more\r\n what what"}
|
# "value": {"text": "Something more\r\n what what"}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
<user-widget v-bind="roomEntry.author"></user-widget>
|
<user-widget v-bind="roomEntry.author"></user-widget>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="article__title">{{roomEntry.title}}</h1>
|
<h1 class="article__title">{{roomEntry.title}}</h1>
|
||||||
<h2 class="article__subtitle">{{roomEntry.subtitle}}</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="article__content">
|
<div class="article__content">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ data = [
|
||||||
'entries': [
|
'entries': [
|
||||||
{
|
{
|
||||||
'title': 'Ein neues Festival auf dem Gurten – und ich bin dabei!',
|
'title': 'Ein neues Festival auf dem Gurten – und ich bin dabei!',
|
||||||
'subtitle': 'Endlich war es soweit. Zum ersten Mal fand am 2. und 3. Juli 1977 das 1. Internationale …',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
@ -45,7 +44,6 @@ data = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'Mein Tagesblog',
|
'title': 'Mein Tagesblog',
|
||||||
'subtitle': 'https://blogger.com/cruel-festivals-around-the-world/',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
@ -71,7 +69,6 @@ data = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'Woodstock',
|
'title': 'Woodstock',
|
||||||
'subtitle': 'In Woodstock hat sich dem Mythos nach vor genau vierzig Jahren das Lebensgefühl …',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
@ -91,7 +88,6 @@ data = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'Das Festival',
|
'title': 'Das Festival',
|
||||||
'subtitle': 'www.meinblog.ch',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
@ -124,7 +120,6 @@ data = [
|
||||||
'entries': [
|
'entries': [
|
||||||
{
|
{
|
||||||
'title': 'Ich heisse Jan und habe am 01. August 2017 meine Ausbildung begonnen. Pünktlich zum …',
|
'title': 'Ich heisse Jan und habe am 01. August 2017 meine Ausbildung begonnen. Pünktlich zum …',
|
||||||
'subtitle': '',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
@ -150,7 +145,6 @@ data = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'Mein Lehrbeginn',
|
'title': 'Mein Lehrbeginn',
|
||||||
'subtitle': 'Was war ich angespannt… und nervös. Das hat sich aber schnell gelegt.',
|
|
||||||
'contents': [
|
'contents': [
|
||||||
{
|
{
|
||||||
'type': 'image_url_block',
|
'type': 'image_url_block',
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ class RoomEntryFactory(factory.django.DjangoModelFactory):
|
||||||
model = RoomEntry
|
model = RoomEntry
|
||||||
|
|
||||||
title = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(8, 12)))
|
title = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(8, 12)))
|
||||||
subtitle = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(8, 12)))
|
|
||||||
description = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(20, 30)))
|
description = factory.LazyAttribute(lambda x: fake.sentence(nb_words=random.randint(20, 30)))
|
||||||
author = factory.Iterator(get_user_model().objects.all())
|
author = factory.Iterator(get_user_model().objects.all())
|
||||||
room = factory.SubFactory(RoomFactory)
|
room = factory.SubFactory(RoomFactory)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class UpdateRoomArgument(RoomInput):
|
||||||
|
|
||||||
class RoomEntryArgument(InputObjectType):
|
class RoomEntryArgument(InputObjectType):
|
||||||
title = graphene.String(required=True)
|
title = graphene.String(required=True)
|
||||||
subtitle = graphene.String()
|
|
||||||
contents = graphene.List(ContentElementInput)
|
contents = graphene.List(ContentElementInput)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 2.0.6 on 2018-11-01 15:06
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('rooms', '0002_auto_20181015_1237'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='roomentry',
|
||||||
|
name='subtitle',
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -27,7 +27,6 @@ class RoomEntry(TitleSlugDescriptionModel):
|
||||||
|
|
||||||
room = models.ForeignKey(Room, blank=False, null=False, on_delete=models.CASCADE, related_name='room_entries')
|
room = models.ForeignKey(Room, blank=False, null=False, on_delete=models.CASCADE, related_name='room_entries')
|
||||||
author = models.ForeignKey(get_user_model(), null=True, on_delete=models.CASCADE)
|
author = models.ForeignKey(get_user_model(), null=True, on_delete=models.CASCADE)
|
||||||
subtitle = models.CharField(blank=True, null=False, max_length=255)
|
|
||||||
|
|
||||||
contents = StreamField([
|
contents = StreamField([
|
||||||
('text_block', TextBlock()),
|
('text_block', TextBlock()),
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class RoomEntrySerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = RoomEntry
|
model = RoomEntry
|
||||||
fields = ('room', 'author', 'subtitle', 'title', 'contents')
|
fields = ('room', 'author', 'title', 'contents')
|
||||||
read_only_fields = ('id', 'slug',)
|
read_only_fields = ('id', 'slug',)
|
||||||
|
|
||||||
def validate_contents(self, value):
|
def validate_contents(self, value):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue