Przeglądaj źródła

Evolution #110: Un lien vers son profil

bastien 13 lat temu
rodzic
commit
26f00c99b7

+ 1 - 0
app/Resources/translations/navigationui.fr.yml Wyświetl plik

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

+ 5 - 0
src/Muzich/CoreBundle/Resources/views/Menu/containerMenu.html.twig Wyświetl plik

10
       {{ 'container_menu.my_network'|trans({}, 'navigationui') }}
10
       {{ 'container_menu.my_network'|trans({}, 'navigationui') }}
11
     </a>
11
     </a>
12
   </li>
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
 </ul>
18
 </ul>
14
 
19
 
15
 <ul class="top-tabs-right">
20
 <ul class="top-tabs-right">

+ 9 - 8
src/Muzich/HomeBundle/Controller/ShowController.php Wyświetl plik

37
     }
37
     }
38
     
38
     
39
     return array(
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 Wyświetl plik

4
 
4
 
5
 {% block content %}
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
   <div class="show_options">
7
   <div class="show_options">
18
     
8
     
19
     <a class="button" href="{{ path('favorite_user_list', {'slug' : viewed_user.slug}) }}" >
9
     <a class="button" href="{{ path('favorite_user_list', {'slug' : viewed_user.slug}) }}" >

+ 5 - 1
src/Muzich/HomeBundle/Resources/views/layout.html.twig Wyświetl plik

9
 
9
 
10
 {% block main_content %}
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
     {% block content %}{% endblock %}
18
     {% block content %}{% endblock %}
15
   
19