Browse Source

Evolution #110: Un lien vers son profil

bastien 13 years ago
parent
commit
26f00c99b7

+ 1 - 0
app/Resources/translations/navigationui.fr.yml View File

@@ -3,6 +3,7 @@ container_menu:
3 3
   the_network:          Le réseau
4 4
   my_network:           Mon réseau
5 5
   my_favorites:         Mes favoris
6
+  my_feeds:             Mes diffusions
6 7
   
7 8
 top_bar:
8 9
   my_account:           Mon compte (%name%)

+ 5 - 0
src/Muzich/CoreBundle/Resources/views/Menu/containerMenu.html.twig View File

@@ -10,6 +10,11 @@
10 10
       {{ 'container_menu.my_network'|trans({}, 'navigationui') }}
11 11
     </a>
12 12
   </li>
13
+  <li {% if active == 'myfeeds' %} class="active" {% endif %}>
14
+    <a href="{{ path('show_user', {'slug': app.user.slug}) }}">
15
+      {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
16
+    </a>
17
+  </li>
13 18
 </ul>
14 19
 
15 20
 <ul class="top-tabs-right">

+ 9 - 8
src/Muzich/HomeBundle/Controller/ShowController.php View File

@@ -37,14 +37,15 @@ class ShowController extends Controller
37 37
     }
38 38
     
39 39
     return array(
40
-      'tags'          => $tags,
41
-      'tags_id_json'  => json_encode($tags_id),
42
-      'viewed_user'   => $viewed_user,
43
-      'elements'      => $search_object->getElements($this->getDoctrine(), $this->getUserId()),
44
-      'following'     => $this->getUser()->isFollowingUserByQuery($this->getDoctrine(), $viewed_user->getId()),
45
-      'user'          => $this->getUser(),
46
-      'more_count'    => ($count)?$count+$this->container->getParameter('search_default_count'):$this->container->getParameter('search_default_count')*2,
47
-      'more_route'    => 'show_user_more'
40
+      'tags'           => $tags,
41
+      'tags_id_json'   => json_encode($tags_id),
42
+      'viewed_user'    => $viewed_user,
43
+      'elements'       => $search_object->getElements($this->getDoctrine(), $this->getUserId()),
44
+      'following'      => $this->getUser()->isFollowingUserByQuery($this->getDoctrine(), $viewed_user->getId()),
45
+      'user'           => $this->getUser(),
46
+      'more_count'     => ($count)?$count+$this->container->getParameter('search_default_count'):$this->container->getParameter('search_default_count')*2,
47
+      'more_route'     => 'show_user_more',
48
+      'topmenu_active' => ($viewed_user->getId() == $this->getUserId()) ? 'myfeeds' : 'public'
48 49
     );
49 50
   }
50 51
   

+ 0 - 10
src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig View File

@@ -4,16 +4,6 @@
4 4
 
5 5
 {% block content %}
6 6
 
7
-  <!--<span class="follow_link following">
8
-    
9
-    <a href="{{ path('favorite_user_list', {'slug' : viewed_user.slug}) }}" >
10
-      {{ 'user.view_favorites'|trans({}, 'users') }}
11
-    </a>
12
-    | 
13
-        
14
-    
15
-  </span>-->
16
-
17 7
   <div class="show_options">
18 8
     
19 9
     <a class="button" href="{{ path('favorite_user_list', {'slug' : viewed_user.slug}) }}" >

+ 5 - 1
src/Muzich/HomeBundle/Resources/views/layout.html.twig View File

@@ -9,7 +9,11 @@
9 9
 
10 10
 {% block main_content %}
11 11
   
12
-    {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with { 'active': 'public' } %}
12
+    {% if topmenu_active is not defined %}
13
+      {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with { 'active': 'public' } %}
14
+    {% else %}
15
+      {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with { 'active': topmenu_active } %}
16
+    {% endif %}
13 17
   
14 18
     {% block content %}{% endblock %}
15 19