diff --git a/Controller/ActivityTypeController.php b/Controller/ActivityTypeController.php
index 308f698ec..0c61040b8 100644
--- a/Controller/ActivityTypeController.php
+++ b/Controller/ActivityTypeController.php
@@ -101,11 +101,8 @@ class ActivityTypeController extends Controller
throw $this->createNotFoundException('Unable to find ActivityType entity.');
}
- $deleteForm = $this->createDeleteForm($id);
-
return $this->render('ChillActivityBundle:ActivityType:show.html.twig', array(
'entity' => $entity,
- 'delete_form' => $deleteForm->createView(),
));
}
@@ -124,12 +121,10 @@ class ActivityTypeController extends Controller
}
$editForm = $this->createEditForm($entity);
- $deleteForm = $this->createDeleteForm($id);
return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array(
'entity' => $entity,
- 'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
+ 'edit_form' => $editForm->createView()
));
}
@@ -164,8 +159,7 @@ class ActivityTypeController extends Controller
if (!$entity) {
throw $this->createNotFoundException('Unable to find ActivityType entity.');
}
-
- $deleteForm = $this->createDeleteForm($id);
+
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
@@ -178,47 +172,6 @@ class ActivityTypeController extends Controller
return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
- 'delete_form' => $deleteForm->createView(),
));
}
- /**
- * Deletes a ActivityType entity.
- *
- */
- public function deleteAction(Request $request, $id)
- {
- $form = $this->createDeleteForm($id);
- $form->handleRequest($request);
-
- if ($form->isValid()) {
- $em = $this->getDoctrine()->getManager();
- $entity = $em->getRepository('ChillActivityBundle:ActivityType')->find($id);
-
- if (!$entity) {
- throw $this->createNotFoundException('Unable to find ActivityType entity.');
- }
-
- $em->remove($entity);
- $em->flush();
- }
-
- return $this->redirect($this->generateUrl('chill_activity_activitytype'));
- }
-
- /**
- * Creates a form to delete a ActivityType entity by id.
- *
- * @param mixed $id The entity id
- *
- * @return \Symfony\Component\Form\Form The form
- */
- private function createDeleteForm($id)
- {
- return $this->createFormBuilder()
- ->setAction($this->generateUrl('chill_activity_activitytype_delete', array('id' => $id)))
- ->setMethod('DELETE')
- ->add('submit', 'submit', array('label' => 'Delete'))
- ->getForm()
- ;
- }
}
diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml
index 5728aa5de..0d4086327 100644
--- a/Resources/translations/messages.fr.yml
+++ b/Resources/translations/messages.fr.yml
@@ -63,3 +63,10 @@ ActivityReasonCategory edit: Modification d'une catégorie de sujet
ActivityReasonCategory: Catégorie de sujet d'activité
ActivityReasonCategory is active and will be proposed: La catégorie est active et sera proposée
ActivityReasonCategory is inactive and won't be proposed: La catégorie est inactive et ne sera pas proposée
+
+# activity type admin
+ActivityType list: Types d'activités
+Create a new activity type: Créer un nouveau type d'activité
+ActivityType creation: Nouveau type d'activité
+ActivityType: Type d'activité
+ActivityType edit: Modifier une activité
\ No newline at end of file
diff --git a/Resources/views/ActivityType/edit.html.twig b/Resources/views/ActivityType/edit.html.twig
index 6d6d7660b..124e41065 100644
--- a/Resources/views/ActivityType/edit.html.twig
+++ b/Resources/views/ActivityType/edit.html.twig
@@ -17,16 +17,18 @@
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
-
ActivityType edit
+ {{ 'ActivityType edit'|trans }}
- {{ form(edit_form) }}
+ {{ form_start(edit_form) }}
+ {{ form_row(edit_form.name) }}
+ {{ form_row(edit_form.submit, { 'attr' : { 'class' : 'sc-button orange' } } ) }}
+ {{ form_end(edit_form) }}
{% endblock %}
diff --git a/Resources/views/ActivityType/index.html.twig b/Resources/views/ActivityType/index.html.twig
index 5ade83943..e1b714888 100644
--- a/Resources/views/ActivityType/index.html.twig
+++ b/Resources/views/ActivityType/index.html.twig
@@ -17,28 +17,26 @@
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
- ActivityType list
+ {{ 'ActivityType list'|trans }}
- Id |
- Name |
- Actions |
+ {{ 'Name'|trans }} |
+ {{ 'Actions'|trans }} |
{% for entity in entities %}
- {{ entity.id }} |
- {{ entity.name|localize_translatable_string }} |
+ {{ entity.name|localize_translatable_string }} |
|
@@ -50,7 +48,7 @@
diff --git a/Resources/views/ActivityType/new.html.twig b/Resources/views/ActivityType/new.html.twig
index 3310cd011..0b1f17829 100644
--- a/Resources/views/ActivityType/new.html.twig
+++ b/Resources/views/ActivityType/new.html.twig
@@ -17,14 +17,17 @@
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
- ActivityType creation
+ {{ 'ActivityType creation'|trans }}
- {{ form(form) }}
+ {{ form_start(form) }}
+ {{ form_row(form.name) }}
+ {{ form_row(form.submit, { 'attr' : { 'class' : 'sc-button blue' } } ) }}
+ {{ form_end(form) }}
diff --git a/Resources/views/ActivityType/show.html.twig b/Resources/views/ActivityType/show.html.twig
index 9d100684d..6e4e656be 100644
--- a/Resources/views/ActivityType/show.html.twig
+++ b/Resources/views/ActivityType/show.html.twig
@@ -17,16 +17,12 @@
{% extends "ChillActivityBundle::Admin/layout_activity.html.twig" %}
{% block admin_content %}
- ActivityType
+ {{ 'ActivityType'|trans }}
- Id |
- {{ entity.id }} |
-
-
- Name |
+ {{ 'Name'|trans }} |
{{ entity.name|localize_translatable_string }} |
@@ -35,14 +31,13 @@
{% endblock %}