Skip to content

Commit

Permalink
fix(admin): adjust chapter editing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Jun 27, 2020
1 parent 3eb6a37 commit 6619934
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion apps/admin/src/app/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import { Title } from 'react-admin';
export default () => (
<Card>
<Title title="Willkommen zur Demokratie erLeben Administratoroberfläche" />
<CardContent>Hier können Kapitel, Bilder, Spiele und Videos bearbeitet werden.</CardContent>
<CardContent>Hier können Kapitel und deren Texte bearbeitet werden.</CardContent>
</Card>
);
15 changes: 3 additions & 12 deletions apps/admin/src/app/chapters/ChapterCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,9 @@ const ChapterCreate = props => (
<SimpleFormIterator>
<ArrayInput label="Inhalt" source="content">
<SimpleFormIterator>
<RadioButtonGroupInput fullWidth="true" label="Typ" source="type" choices={[
{ id: ContentType.Text, name: 'Text' },
{ id: ContentType.Video, name: 'Video' },
{ id: ContentType.Image, name: 'Bild' },
{ id: ContentType.Game, name: 'Spiel' },
{ id: ContentType.Misc, name: 'Sonstiges' },
]} />
<RadioButtonGroupInput label="Ebene" source="layer" choices={[
{ id: Layer.Fore, name: 'Front' },
{ id: Layer.Base, name: 'Mitte' },
{ id: Layer.Back, name: 'Hinten' },
]} />
<TextInput label="Typ" source="type" />
<TextInput label="Ebene" source="layer" />
<TextInput label="Titel" source="title" />
<TextInput multiline label="Wert" fullWidth="true" source="value" />
</SimpleFormIterator>
</ArrayInput>
Expand Down
16 changes: 4 additions & 12 deletions apps/admin/src/app/chapters/ChapterEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@ export const ChapterEdit = props => (
<TextInput label="Pfad" source="link" validate={required()}/>
<ArrayInput label="Inhaltsgruppen" source="groups">
<SimpleFormIterator>
<TextInput label="Info" source="info" />
<ArrayInput label="Inhalt" source="content">
<SimpleFormIterator>
<RadioButtonGroupInput fullWidth="true" label="Typ" source="type" choices={[
{ id: ContentType.Text, name: 'Text' },
{ id: ContentType.Video, name: 'Video' },
{ id: ContentType.Image, name: 'Bild' },
{ id: ContentType.Game, name: 'Spiel' },
{ id: ContentType.Misc, name: 'Sonstiges' },
]} />
<RadioButtonGroupInput label="Ebene" source="layer" choices={[
{ id: Layer.Fore, name: 'Front' },
{ id: Layer.Base, name: 'Mitte' },
{ id: Layer.Back, name: 'Hinten' },
]} />
<TextInput label="Typ" source="type" />
<TextInput label="Ebene" source="layer" />
<TextInput label="Titel" source="title" />
<TextInput multiline label="Wert" fullWidth="true" source="value" />
</SimpleFormIterator>
</ArrayInput>
Expand Down

0 comments on commit 6619934

Please sign in to comment.