diff --git a/assets/js/app.js b/assets/js/app.js index 078183b8c0..3068705121 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -26,10 +26,12 @@ var connect_lang = 'ChatConnected'; var disconnect_lang = 'ChatDisconnected'; $( document ).ready(function() { - //$("#menu_courses").prop("onClick", "javascript:return(false);"); $("#menu_courses").click(function(){ return false; }); + $("#menu_social").click(function(){ + return false; + }); }); $(function() { var isInCourse = $("body").data("in-course"); diff --git a/src/CoreBundle/Menu/NavBuilder.php b/src/CoreBundle/Menu/NavBuilder.php index 0878df7941..16a9d895db 100644 --- a/src/CoreBundle/Menu/NavBuilder.php +++ b/src/CoreBundle/Menu/NavBuilder.php @@ -121,6 +121,17 @@ class NavBuilder implements ContainerAwareInterface } } + $menu['courses']->addChild( + $translator->trans('Course history'), + [ + 'route' => 'userportal', + 'routeParameters' => [ + 'type' => 'sessions', + 'filter' => 'history', + ], + ] + ); + if (api_is_allowed_to_create_course()) { $lang = $translator->trans('Create course'); if ($settingsManager->getSetting('course.course_validation') == 'true') { @@ -139,16 +150,6 @@ class NavBuilder implements ContainerAwareInterface ); } - $menu['courses']->addChild( - $translator->trans('Course history'), - [ - 'route' => 'userportal', - 'routeParameters' => [ - 'type' => 'sessions', - 'filter' => 'history', - ], - ] - ); if ($checker->isGranted('ROLE_ADMIN')) { $menu['courses']->addChild( @@ -197,8 +198,51 @@ class NavBuilder implements ContainerAwareInterface ] ); - - + $menu['social']->addChild( + $translator->trans('My profile'), + [ + 'route' => 'legacy_main', + 'routeParameters' => [ + 'name' => 'social/home.php', + ], + ] + ); + $menu['social']->addChild( + $translator->trans('My shared profile'), + [ + 'route' => 'legacy_main', + 'routeParameters' => [ + 'name' => 'social/profile.php', + ], + ] + ); + $menu['social']->addChild( + $translator->trans('Friends'), + [ + 'route' => 'legacy_main', + 'routeParameters' => [ + 'name' => 'social/friends.php', + ], + ] + ); + $menu['social']->addChild( + $translator->trans('Social Groups'), + [ + 'route' => 'legacy_main', + 'routeParameters' => [ + 'name' => 'social/groups.php', + ], + ] + ); + $menu['social']->addChild( + $translator->trans('My Files'), + [ + 'route' => 'legacy_main', + 'routeParameters' => [ + 'name' => 'social/myfiles.php', + ], + ] + ); } if ($checker->isGranted('ROLE_ADMIN')) {