Permalink
Browse files

added toggle published flash messages

  • Loading branch information...
inmarelibero committed Nov 6, 2012
1 parent c6f0212 commit d6743478371a15d21e006e39e203c4d61e398c2f
@@ -15,4 +15,7 @@ alert:
delete:
success: Brick deleted successfully
error: Errors occurred while deleting
+ togglePublished:
+ published: Brick has been published successfully
+ unpublished: Brick is now NOT published
@@ -15,4 +15,7 @@ alert:
delete:
success: Brick eliminado con éxito
error: Se han producido errores
+ togglePublished:
+ published: Brick publicado con éxito
+ unpublished: El brick está ahora NO publicado
@@ -15,4 +15,7 @@ alert:
delete:
success: Brick deleted successfully
error: Si sono verificati degli errori durante la cancellazione
+ togglePublished:
+ published: Brick pubblicato con successo
+ unpublished: Il brick è ora NON pubblicato
@@ -273,6 +273,12 @@ public function togglePublishedAction($id)
$em->persist($entity);
$em->flush();
+ if ($entity->getPublished()) {
+ $this->get('session')->setFlash('success', 'alert.brick.togglePublished.published');
+ } else {
+ $this->get('session')->setFlash('information', 'alert.brick.togglePublished.unpublished');
+ }
+
return $this->redirect($this->generateUrl('user_brick'));
}
}

0 comments on commit d674347

Please sign in to comment.