Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
added route definitions for add/edit
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Jun 28, 2018
1 parent 38d9dcc commit e78274d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Admin/EventAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,22 @@ public function getRoutes(): array
(new Route('example_event.event_datagrid', '/events', 'sulu_admin.datagrid'))
->addOption('title', 'example_event.events')
->addOption('adapters', ['table'])
->addOption('resourceKey', 'events')
->addOption('addRoute', 'example_event.event_add_form.detail')
->addOption('editRoute', 'example_event.event_edit_form.detail'),
(new Route('example_event.event_add_form', '/events/add', 'sulu_admin.resource_tabs'))
->addOption('resourceKey', 'events'),
(new Route('example_event.event_add_form.detail', '/details', 'sulu_admin.form'))
->addOption('tabTitle', 'example_event.details')
->addOption('backRoute', 'example_event.event_datagrid')
->addOption('editRoute', 'example_event.event_edit_form.detail')
->setParent('example_event.event_add_form'),
(new Route('example_event.event_edit_form', '/events/:id', 'sulu_admin.resource_tabs'))
->addOption('resourceKey', 'events'),
(new Route('example_event.event_edit_form.detail', '/details', 'sulu_admin.form'))
->addOption('tabTitle', 'example_event.details')
->addOption('backRoute', 'example_event.event_datagrid')
->setParent('example_event.event_edit_form'),
];
}
}
29 changes: 29 additions & 0 deletions Resources/config/forms/Event.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" ?>
<properties xmlns="http://schemas.sulu.io/template/template"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/properties-1.0.xsd">
<property name="title" type="text_line">
<meta>
<title lang="de">Titel</title>
<title lang="en">Title</title>
</meta>
</property>
<property name="description" type="text_area">
<meta>
<title lang="de">Beschreibung</title>
<title lang="en">Description</title>
</meta>
</property>
<property name="startDate" type="date">
<meta>
<title lang="de">Start</title>
<title lang="en">Start</title>
</meta>
</property>
<property name="endDate" type="date">
<meta>
<title lang="de">Ende</title>
<title lang="en">End</title>
</meta>
</property>
</properties>
3 changes: 2 additions & 1 deletion Resources/translations/sulu/admin.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"example_event.created": "Erstellt am",
"example_event.creator": "Erstellt von",
"example_event.changed": "Bearbeitet am",
"example_event.changer": "Bearbeitet von"
"example_event.changer": "Bearbeitet von",
"example_event.details": "Details"
}
3 changes: 2 additions & 1 deletion Resources/translations/sulu/admin.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"example_event.created": "Created at",
"example_event.creator": "Created by",
"example_event.changed": "Changed at",
"example_event.changer": "Changed by"
"example_event.changer": "Changed by",
"example_event.details": "Details"
}

0 comments on commit e78274d

Please sign in to comment.