|
@@ -16,20 +16,22 @@ class ShowController extends Controller
|
16
|
16
|
* @Template()
|
17
|
17
|
* @param string $slug
|
18
|
18
|
*/
|
19
|
|
- public function showUserAction($slug)
|
|
19
|
+ public function showUserAction($slug, $count = null)
|
20
|
20
|
{
|
21
|
21
|
$viewed_user = $this->findUserWithSlug($slug);
|
22
|
22
|
|
23
|
23
|
$search_object = $this->createSearchObject(array(
|
24
|
24
|
'user_id' => $viewed_user->getId(),
|
25
|
|
- 'count' => $this->container->getParameter('search_default_count')
|
|
25
|
+ 'count' => ($count)?$count:$this->container->getParameter('search_default_count')
|
26
|
26
|
));
|
27
|
27
|
|
28
|
28
|
return array(
|
29
|
29
|
'viewed_user' => $viewed_user,
|
30
|
30
|
'elements' => $search_object->getElements($this->getDoctrine(), $this->getUserId()),
|
31
|
31
|
'following' => $this->getUser()->isFollowingUserByQuery($this->getDoctrine(), $viewed_user->getId()),
|
32
|
|
- 'user' => $this->getUser()
|
|
32
|
+ 'user' => $this->getUser(),
|
|
33
|
+ 'more_count' => ($count)?$count+$this->container->getParameter('search_default_count'):$this->container->getParameter('search_default_count')*2,
|
|
34
|
+ 'more_route' => 'show_user_more'
|
33
|
35
|
);
|
34
|
36
|
}
|
35
|
37
|
|
|
@@ -39,13 +41,13 @@ class ShowController extends Controller
|
39
|
41
|
* @Template()
|
40
|
42
|
* @param string $slug
|
41
|
43
|
*/
|
42
|
|
- public function showGroupAction($slug)
|
|
44
|
+ public function showGroupAction($slug, $count = null)
|
43
|
45
|
{
|
44
|
46
|
$group = $this->findGroupWithSlug($slug);
|
45
|
47
|
|
46
|
48
|
$search_object = $this->createSearchObject(array(
|
47
|
49
|
'group_id' => $group->getId(),
|
48
|
|
- 'count' => $this->container->getParameter('search_default_count')
|
|
50
|
+ 'count' => ($count)?$count:$this->container->getParameter('search_default_count')
|
49
|
51
|
));
|
50
|
52
|
|
51
|
53
|
($group->getOwner()->getId() == $this->getUserId()) ? $his = true : $his = false;
|
|
@@ -66,7 +68,9 @@ class ShowController extends Controller
|
66
|
68
|
'elements' => $search_object->getElements($this->getDoctrine(), $this->getUserId()),
|
67
|
69
|
'following' => $this->getUser()->isFollowingGroupByQuery($this->getDoctrine(), $group->getId()),
|
68
|
70
|
'user' => $this->getUser(),
|
69
|
|
- 'add_form' => (isset($add_form)) ? $add_form->createView() : null
|
|
71
|
+ 'add_form' => (isset($add_form)) ? $add_form->createView() : null,
|
|
72
|
+ 'more_count'=> ($count)?$count+$this->container->getParameter('search_default_count'):$this->container->getParameter('search_default_count')*2,
|
|
73
|
+ 'more_route'=> 'show_group_more'
|
70
|
74
|
);
|
71
|
75
|
}
|
72
|
76
|
|