Browse Source

Evolution #176: Modération commentaire

bastien 13 years ago
parent
commit
c5bd28b782

+ 5 - 1
src/Muzich/CoreBundle/Command/CheckModerateCommand.php View File

@@ -39,11 +39,14 @@ class CheckModerateCommand extends ContainerAwareCommand
39 39
       ->countToModerate();
40 40
     $count_elements = $doctrine->getRepository('MuzichCoreBundle:Element')
41 41
       ->countToModerate();
42
+    $count_comments = $doctrine->getRepository('MuzichCoreBundle:Element')
43
+      ->countForCommentToModerate();
42 44
     
43 45
     $output->writeln('<info>Nombre de tags a modérer: '.$count_tags.'</info>');
44 46
     $output->writeln('<info>Nombre d\'élément a modérer: '.$count_elements.'</info>');
47
+    $output->writeln('<info>Nombre d\'élément avec commentaire a modérer: '.$count_comments.'</info>');
45 48
     
46
-    if ($count_tags || $count_elements)
49
+    if ($count_tags || $count_elements || $count_comments)
47 50
     {
48 51
       $output->writeln('<info>Envoie du courriel ...</info>');
49 52
 
@@ -54,6 +57,7 @@ class CheckModerateCommand extends ContainerAwareCommand
54 57
           ->setBody($this->getContainer()->get('templating')->render('MuzichCoreBundle:Email:checkmoderate.txt.twig', array(
55 58
             'tags'     => $count_tags,
56 59
             'elements' => $count_elements,
60
+            'comments' => $count_comments,
57 61
             'url'      => $this->getContainer()->get('router')->generate('MuzichAdminBundle_moderate_index', array(), true)
58 62
           )))
59 63
       ;

+ 1 - 0
src/Muzich/CoreBundle/Resources/views/Email/checkmoderate.txt.twig View File

@@ -1,6 +1,7 @@
1 1
 {% autoescape false %}
2 2
   Il y a des choses a modérer:
3 3
   Elements: {{ elements }}.
4
+  Elements avec commentaires: {{ comments }}.
4 5
   Tags: {{ tags }}
5 6
   Page de modération: {{ url }}
6 7
 {% endautoescape %}