|
@@ -13,11 +13,12 @@ class HomeController extends Controller
|
13
|
13
|
* Page d'accueil ("home") de l'utilisateur. Cette page regroupe le fil
|
14
|
14
|
* d'éléments général et personalisable et de quoi ajouter un élément.
|
15
|
15
|
*
|
16
|
|
- * @Template()
|
17
|
16
|
*/
|
18
|
|
- public function indexAction($count = null, $network = null, $login = false)
|
|
17
|
+ public function indexAction($count = null, $network = null, $login = false, $search_object = null)
|
19
|
18
|
{
|
20
|
|
- $search_object = $this->getElementSearcher($count);
|
|
19
|
+ if (!$search_object)
|
|
20
|
+ $search_object = $this->getElementSearcher($count);
|
|
21
|
+
|
21
|
22
|
$user = $this->getUser(true, array('join' => array(
|
22
|
23
|
'groups_owned'
|
23
|
24
|
)), true);
|
|
@@ -32,7 +33,7 @@ class HomeController extends Controller
|
32
|
33
|
|
33
|
34
|
$elements = $search_object->getElements($this->getDoctrine(), $this->getUserId(true));
|
34
|
35
|
|
35
|
|
- return array(
|
|
36
|
+ return $this->render('MuzichHomeBundle:Home:index.html.twig', array(
|
36
|
37
|
'search_tags_id' => $search_object->getTags(),
|
37
|
38
|
'ids_display' => $search_object->getIdsDisplay(),
|
38
|
39
|
'user' => $user,
|
|
@@ -46,7 +47,15 @@ class HomeController extends Controller
|
46
|
47
|
'display_launch_demo' => true,
|
47
|
48
|
'login' => $login,
|
48
|
49
|
'email_token' => $this->getEmailTokenIfExist()
|
49
|
|
- );
|
|
50
|
+ ));
|
|
51
|
+ }
|
|
52
|
+
|
|
53
|
+ public function showOneElementAction($element_id)
|
|
54
|
+ {
|
|
55
|
+ $es = $this->getNewElementSearcher();
|
|
56
|
+ $es->setNoTags();
|
|
57
|
+ $es->setIds(array($element_id));
|
|
58
|
+ return $this->indexAction(null, null, false, $es);
|
50
|
59
|
}
|
51
|
60
|
|
52
|
61
|
protected function getEmailTokenIfExist()
|