Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
pass original request to sidebar controller (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst authored Sep 2, 2018
1 parent 500a315 commit 4384077
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ This repository is an upgraded version of the AvanzuAdminThemeBundle, bringing t

Go ahead and [read the full documentation](Resources/docs/), then install and enjoy your new theme!

__AdminLTE-Bundle Demo__

In order to see a working example this bundle is showcased in a separate demo-application: [AdminLTEBundle-Demo](https://github.com/kevinpapst/AdminLTEBundle-Demo).

## Features

Some of the main features of this theme bundle:
Expand Down Expand Up @@ -46,17 +50,26 @@ Installation using the traditional composer approach is almost as simple:
composer require kevinpapst/adminlte-bundle ^2.0
```

This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.

Afterwards copy the default config to your `config/packages/` directory:

```bash
cp vendor/kevinpapst/adminlte-bundle/config/packages/admin_lte.yaml config/packages/
```

## AdminLTE-Bundle Demo
Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

In order to see a working example this bundle is showcased in a separate demo-application: [AdminLTEBundle-Demo](https://github.com/kevinpapst/AdminLTEBundle-Demo).
```php
<?php

The demo is neither fully functional nor showcasing all options right now, but I am working on it!
return [
// ...
KevinPapst\AdminLTEBundle\AdminLTEBundle::class => ['all' => true],
];
```

## Why choose this repository over the original?

Expand Down Expand Up @@ -92,7 +105,7 @@ And a lot of other changes which I added in this repository:
- changed namespaces to allow co-existence with AdminThemeBundle
- changed and extended default configuration
- huge cleanup of the codebase
- changed all codeblock-names (with additional shim files for migration)
- changed all twig block-names (with additional layout shim files for migration)
- changed control-sidebar, content is now configurable from admin_lte.yaml or the ContextHelper
- a [Demo application](https://github.com/kevinpapst/AdminLTEBundle-Demo) as living documentation for first time users and easier testing
- updated composer.json to reflect more up-to-date bundle dependencies
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/Partials/_control-sidebar.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% for name, tab in admin_lte_context.control_sidebar %}
<div class="tab-pane {% if loop.first %}active{% endif %}" id="control-sidebar-{{ name }}-tab">
{% if tab.controller is defined %}
{{ render(controller(tab.controller)) }}
{{ render(controller(tab.controller, {'originalRequest': app.request})) }}
{% elseif tab.template is defined %}
{% include tab.template %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kevinpapst/adminlte-bundle",
"type": "symfony-bundle",
"description": "Admin Theme based on the AdminLTE 2.3 for easy integration with Symfony 4",
"description": "Admin Theme based on the AdminLTE 2.4.8 for easy integration with Symfony 4",
"license": "MIT",
"authors": [
{
Expand Down

0 comments on commit 4384077

Please sign in to comment.