Adding right menu.

1.10.x
Julio Montoya 10 years ago
parent f35d8493b5
commit a1b90dd1cf
  1. 7
      app/Resources/views/layout.html.twig
  2. 2
      app/config/mopa/mopa_bootstrap.yml
  3. 8
      composer.json
  4. 49
      src/ChamiloLMS/CoreBundle/Menu/SimpleMenuBuilder.php
  5. 3
      web/bundles/sonataadmin/css/styles.css

@ -16,3 +16,10 @@
{{ parent() }}
{% endif %}
{% endblock %}
{% block avanzu_sidebar %}
{{ parent() }}
{{ mopa_bootstrap_menu('ChamiloLMSCoreBundle:SimpleMenuBuilder:mainMenu', {'automenu': 'pills', 'stacked':true}) }}
{% endblock %}

@ -3,4 +3,4 @@ mopa_bootstrap:
show_legend: false
render_optional_text: false
render_required_asterisk: true
# menu: ~ # enables twig helpers for menu
menu: ~ # enables twig helpers for menu

@ -74,13 +74,15 @@
"symfony-cmf/routing-bundle": "~1.1",
"knplabs/gaufrette": "0.1.4",
"knplabs/knp-menu-bundle": "1.1.x-dev",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-menu-bundle": "dev-master as 1.1",
"sonata-project/easy-extends-bundle": "~2.1@dev",
"sonata-project/seo-bundle": "~1@dev",
"sonata-project/doctrine-extensions": "~1@dev",
"sonata-project/intl-bundle": "~2.2@dev",
"sonata-project/admin-bundle": "~2.3@dev",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "~2.3@dev",
"sonata-project/notification-bundle": "~2.2@dev",
"sonata-project/block-bundle": "~2.2@dev",
@ -105,7 +107,9 @@
"simplethings/entity-audit-bundle": "~0.5",
"willdurand/faker-bundle": "~1.0",
"mopa/bootstrap-bundle": "v3.0.0-beta3",
"twbs/bootstrap": "v3.0.0",
"stof/doctrine-extensions-bundle": "~1.1",

@ -26,12 +26,39 @@ class SimpleMenuBuilder extends ContainerAware
{
$isFooter = array_key_exists('is_footer', $options) ? $options['is_footer'] : false;
$menuOptions = array_merge($options, array(
'childrenAttributes' => array('class' => 'nav nav-pills'),
));
$menu = $factory->createItem('main');
$menu = $factory->createItem('main', $menuOptions);
$child = $menu->addChild('News', array('route' => 'sonata_news_home', array("attributes" => array("id" => 'nav'))));
$child = $menu->addChild(
'My courses',
array(
'route' => 'userportal',
array("attributes" => array("id" => 'nav'))
)
);
$child = $menu->addChild(
'Agenda',
array(
'route' => 'userportal',
array("attributes" => array("id" => 'nav'))
)
);
$child = $menu->addChild(
'Progress',
array(
'route' => 'userportal',
array("attributes" => array("id" => 'nav'))
)
);
$child = $menu->addChild(
'Administration',
array(
'route' => 'sonata_admin_dashboard',
array("attributes" => array("id" => 'nav'))
)
);
@ -60,23 +87,23 @@ class SimpleMenuBuilder extends ContainerAware
$menu->addChild($extras);
*/
$menu->addChild('Admin', array(
/*$menu->addChild('Admin', array(
'route' => 'page_slug',
'routeParameters' => array(
'path' => '/user'
),
'id' => 'admin'
));
));*/
if ($isFooter) {
$menu->addChild('Legal notes', array(
//if ($isFooter) {
/*$menu->addChild('Legal notes', array(
'route' => 'page_slug',
'routeParameters' => array(
'path' => '/legal-notes',
),
'id' => 'legal'
));
}
));*/
//}
return $menu;
}

@ -43,8 +43,9 @@ body > .header .logo {
display: inline-block;
line-height: 1;
vertical-align: middle;
width: 140px;
width: 200px;
}
.logo img + span { width: 140px; }
.open > .dropdown-menu {
animation-duration: .3s;

Loading…
Cancel
Save