From a501bdc18491a2c383d8cd0e9543723ce5b71032 Mon Sep 17 00:00:00 2001 From: Alex Demchenko Date: Fri, 29 Mar 2019 11:04:05 +0200 Subject: [PATCH 1/2] Add entity, manage template --- src/Event/EventBundle/Entity/Stage.php | 104 ++++++++++++++++++ src/Event/EventBundle/Entity/WshSchedule.php | 7 +- .../views/Backend/Stage/index.html.twig | 39 +++++++ .../views/Backend/Stage/manage.html.twig | 39 +++++++ 4 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 src/Event/EventBundle/Entity/Stage.php create mode 100644 src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig create mode 100644 src/Event/EventBundle/Resources/views/Backend/Stage/manage.html.twig diff --git a/src/Event/EventBundle/Entity/Stage.php b/src/Event/EventBundle/Entity/Stage.php new file mode 100644 index 0000000..4a33d2e --- /dev/null +++ b/src/Event/EventBundle/Entity/Stage.php @@ -0,0 +1,104 @@ +id; + } + + /** + * Set title + * + * @param string $title + * @return WshSchedule + */ + public function setTitle($title) + { + $this->title = $title; + + return $this; + } + + /** + * Get title + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Get isActive + * + * @return boolean + */ + public function getIsActive() + { + return $this->isActive; + } + + /** + * Set isActive + * + * @param boolean $isActive + * @return Workshop + */ + public function setIsActive($isActive) + { + $this->isActive = $isActive; + + return $this; + } + +} diff --git a/src/Event/EventBundle/Entity/WshSchedule.php b/src/Event/EventBundle/Entity/WshSchedule.php index 45d5c5a..677a161 100644 --- a/src/Event/EventBundle/Entity/WshSchedule.php +++ b/src/Event/EventBundle/Entity/WshSchedule.php @@ -1,10 +1,4 @@ isActive = $isActive; + return $this; } diff --git a/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig b/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig new file mode 100644 index 0000000..20f7382 --- /dev/null +++ b/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig @@ -0,0 +1,39 @@ +{% extends 'EventEventBundle:Backend:layout.html.twig' %} + +{% block data_tables_css %} + + +{% endblock %} + +{% block content %} +
+ + + + + + + + + + + +
idSpeaker NameTitleActions
+
+ {% include 'EventEventBundle:Backend:_confirm_modal.html.twig' + with {'title': 'Confirm action', 'body': 'Do you really want to delete this speech?'} %} +{% endblock %} + +{% block data_tables_js %} + + + +{% endblock %} diff --git a/src/Event/EventBundle/Resources/views/Backend/Stage/manage.html.twig b/src/Event/EventBundle/Resources/views/Backend/Stage/manage.html.twig new file mode 100644 index 0000000..79846d5 --- /dev/null +++ b/src/Event/EventBundle/Resources/views/Backend/Stage/manage.html.twig @@ -0,0 +1,39 @@ +{% extends 'EventEventBundle:Backend:layout.html.twig' %} + +{% block content %} +
+ + + {{ render(controller('EventEventBundle:Backend/Dashboard:localeTabs', {'translations' : speech.translations})) }} + + {{ form_start(form, {'method': 'POST', 'action': path('backend_speech_edit', {'id': speech.id})}) }} +
+
+ {{ form_row(form.speaker) }} +
+ {{ form_row(form.event) }} +
+ {{ form_row(form.title) }} + {{ form_row(form.language) }} + {{ form_row(form.description) }} + {{ form_row(form.slide) }} + {{ form_row(form.video) }} +
+ + {% for translation in form.translations %} +
+ {{ form_widget(translation) }} +
+ {% endfor %} + + {{ form_rest(form) }} + + +
+ {{ form_end(form) }} + +
+{% endblock %} From 40b0806213af083105cbc8ade342c7d35709fb02 Mon Sep 17 00:00:00 2001 From: Alex Demchenko Date: Wed, 21 Aug 2019 18:12:41 +0300 Subject: [PATCH 2/2] Stages list --- .../Resources/views/Backend/Stage/index.html.twig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig b/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig index 20f7382..bf493ea 100644 --- a/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig +++ b/src/Event/EventBundle/Resources/views/Backend/Stage/index.html.twig @@ -11,7 +11,7 @@

Event speeches

{% include 'EventEventBundle:Backend:_events_select.html.twig' %}
@@ -21,7 +21,6 @@ id - Speaker Name Title Actions @@ -29,11 +28,10 @@ {% include 'EventEventBundle:Backend:_confirm_modal.html.twig' - with {'title': 'Confirm action', 'body': 'Do you really want to delete this speech?'} %} + with {'title': 'Confirm action', 'body': 'Do you really want to delete this stage?'} %} {% endblock %} {% block data_tables_js %} - {% endblock %}