Skip to content

Commit

Permalink
Update KnpMenu to use the master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Jul 29, 2012
1 parent e8b5cb2 commit 33a7649
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
20 changes: 10 additions & 10 deletions Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
protected $extensions = array();

protected $labelTranslatorStrategy;

/**
* Setting to true will enable preview mode for
* the entity and show a preview button in the
* edit/create forms
*
* @var boolean
*
* @var boolean
*/
protected $supportsPreviewMode = false;

Expand Down Expand Up @@ -1315,9 +1315,10 @@ public function buildSideMenu($action, AdminInterface $childAdmin = null)

$this->loaded['side_menu'] = true;

$menu = $this->menuFactory->createItem('root');
$menu->setChildrenAttribute('class', 'nav nav-list');
$menu->setCurrentUri($this->getRequest()->getRequestUri());
$menu = $this->menuFactory->createItem('root')
->setChildrenAttribute('class', 'nav nav-list')
->setUri($this->getRequest()->getRequestUri())
;

$this->configureSideMenu($menu, $action, $childAdmin);

Expand Down Expand Up @@ -2515,17 +2516,16 @@ public function getLabelTranslatorStrategy()
{
return $this->labelTranslatorStrategy;
}
/**

/**
* Returning true will enable preview mode for
* the target entity and show a preview button
* when editing/creating an entity
*
*
* @return boolean
*/
public function supportsPreviewMode()
{
return $this->supportsPreviewMode;
}

}
4 changes: 2 additions & 2 deletions Resources/doc/reference/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Sonata dependencies that need to be installed and configured beforehand :
- `SonataCacheBundle <http://sonata-project.org/bundles/cache>`_
- `SonataBlockBundle <http://sonata-project.org/bundles/block>`_
- `SonatajQueryBundle <https://github.com/sonata-project/SonatajQueryBundle>`_
- `KnpMenuBundle <https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/index.md#installation>`_ (Version 1.1.*)
- `KnpMenuBundle <https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc/index.md#installation>`_
- `Exporter <https://github.com/sonata-project/exporter>`_

You will need to install those in their 2.0 branches (or master if they don't
You will need to install those in their 2.1 branches (or master if they don't
have a similar branch). Follow also their configuration step ; you will find
everything you need in their installation chapter.

Expand Down
10 changes: 5 additions & 5 deletions Resources/views/standard_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ file that was distributed with this source code.
<ul class="breadcrumb">
{% if _breadcrumb is empty %}
{% if action is defined %}
{% for label, uri in admin.breadcrumbs(action) %}
{% for item in admin.breadcrumbs(action) %}
{% if not loop.last %}
<li><a href="{{ uri }}">{{ label }}</a><span class="divider">/</span></li>
<li><a href="{{ item.uri }}">{{ item.label }}</a><span class="divider">/</span></li>
{% else %}
<li class="active">{{ label }}</li>
<li class="active">{{ item.label }}</li>
{% endif %}
{% endfor %}
{% endif %}
Expand Down Expand Up @@ -155,9 +155,9 @@ file that was distributed with this source code.
{% if _title is not empty %}
{{ _title|raw }}
{% elseif action is defined %}
{% for label, uri in admin.breadcrumbs(action) %}
{% for item in admin.breadcrumbs(action) %}
{% if loop.last %}
{{ label }}
{{ item.label }}
{% endif %}
{% endfor %}
{% endif%}
Expand Down
4 changes: 4 additions & 0 deletions UPGRADE-2.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ UPGRADE FROM 2.0 to 2.1

** Work In Progress - Please do not use this code in production **

### KnpMenu

* The KnpMenu dependency now used the master branch.

### Form

* Due to some refactoring in the Form Component, some types definition have been changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"symfony/symfony": "2.1.*",
"symfony/framework-bundle": "2.1.*",
"symfony/security-bundle": "2.1.*",
"knplabs/knp-menu-bundle": "1.1.*",
"knplabs/knp-menu-bundle": "dev-master",
"sonata-project/jquery-bundle": "dev-master",
"sonata-project/exporter": "dev-master",
"sonata-project/block-bundle": "dev-master"
Expand Down

0 comments on commit 33a7649

Please sign in to comment.