diff --git a/docs/changes.md b/docs/changes.md index b1a39af..0afc9ac 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -5,6 +5,16 @@ title: Control Change Log ## Version 2.2 {#v2-2} +### v2.2.2 {#v2-2-2} + +* Allow Roles table to be search and sorted using `Orchestra\Html\Table\Grid` new functionality. +* Use full PHP syntax. + +### v2.2.1 {#v2-2-1} + +* Filter theme to only to be shown when the theme support it. +* Add events to attach fields to roles. + ### v2.2.0 {#v2-2-0} * Bump minimum version to PHP v5.4.0. @@ -12,6 +22,12 @@ title: Control Change Log ## Version 2.1 {#v2-1} +### v2.1.4 {#v2-1-4} + +* Filter theme to only to be shown when the theme support it. +* Add events to attach fields to roles. + + ### v2.1.3 {#v2-1-3} * Added events to hook into the role management. @@ -79,7 +95,7 @@ title: Control Change Log * Revert use of `.checkbox-inline` and use bootstrap grid. * Fixed syncing roles issue on `vendor/package` ACL metric. * Improve ACL name to show extension name if exist. -* Fixed route filter not is called before registered. +* Fixed route filter not is called before registered. ### v2.0.3 {#v2-0-3} diff --git a/src/Control/Presenter/Role.php b/src/Control/Presenter/Role.php index 8d57cb2..406178b 100644 --- a/src/Control/Presenter/Role.php +++ b/src/Control/Presenter/Role.php @@ -19,7 +19,11 @@ public function table($model) { return Table::of('control.roles', function ($table) use ($model) { // attach Model and set pagination option to true. - $table->with($model); + $table->with($model)->paginate(true); + + $table->sortable(); + $table->searchable(array('name')); + $table->layout('orchestra/foundation::components.table'); // Add columns. diff --git a/src/Control/Processor/Role.php b/src/Control/Processor/Role.php index 92dcd79..c5d7dcd 100644 --- a/src/Control/Processor/Role.php +++ b/src/Control/Processor/Role.php @@ -31,7 +31,7 @@ public function __construct(RolePresenter $presenter, RoleValidator $validator) */ public function index($listener) { - $eloquent = $this->model->paginate(); + $eloquent = $this->model->newQuery(); $table = $this->presenter->table($eloquent); $this->fireEvent('list', array($eloquent, $table)); diff --git a/src/views/acl/index.blade.php b/src/views/acl/index.blade.php index 5caf1f1..1faf5e4 100644 --- a/src/views/acl/index.blade.php +++ b/src/views/acl/index.blade.php @@ -1,6 +1,6 @@ @include('orchestra/control::widgets.menu') - +
diff --git a/src/views/widgets/menu.blade.php b/src/views/widgets/menu.blade.php index 3a20569..32cf35e 100644 --- a/src/views/widgets/menu.blade.php +++ b/src/views/widgets/menu.blade.php @@ -1,4 +1,4 @@ -