Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Jul 22, 2014
2 parents 942b70d + ea00ae6 commit 2c07540
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 4 deletions.
100 changes: 100 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: Control Change Log

---

## Version 2.2 {#v2-2}

### v2.2.0 {#v2-2-0}

* Bump minimum version to PHP v5.4.0.
* Add support for Orchestra Platform 2.2.

## Version 2.1 {#v2-1}

### v2.1.3 {#v2-1-3}

* Added events to hook into the role management.

### v2.1.2 {#v2-1-2}

* Fixes `Orchestra\Control\ExtensionConfigHandler` type-hint to use `Illuminate\Support\Fluent` instead of array.
* Fixes control theme switcher CSS issue.

### v2.1.1 {#v2-1-1}

* Fixed missing `Orchestra\Control\Presenter\AbstractablePresenter` class and add some tests.

### v2.1.0 {#v2-1-0}

* Update support for Orchestra Platform v2.1
* Implement passive controllers for `orchestra/control`.

## Version 2.0 {#v2-0}

### v2.0.13 {#v2-0-13}

* Implement [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) coding standard.

### v2.0.12 {#v2-0-12}

* Update menu to support subdomain handling.
* Implement `Orchestra\Model\Role::setDefaultRoles()`.

### v2.0.11 {#v2-0-11}

* Fixed Bootstrap 3 panel CSS.

### v2.0.10 {#v2-0-10}

* Use facade instead of alias.
* Update PHPUnit configuration.
* Fixed CSS styling based on Bootstrap 3-RC2.
* Remove `src/orchestra.php` as no longer required.

### v2.0.9 {#v2-0-9}

* Update Form/Table builder to use view from orchestra/foundation.

### v2.0.8 {#v2-0-8}

* Move bootstrap process to `Orchestra\Control\ControlServiceProvider`.
* Tweak Travis-CI integration.

### v2.0.7 {#v2-0-7}

* Add .img-thumbnail to theme screenshot.

### v2.0.6 {#v2-0-6}

* Fixed unable to save ACL metric.

### v2.0.5 {#v2-0-5}

* Optimised UX.

### v2.0.4 {#v2-0-4}

* Fixed usage of `Orchestra\Resources` visible option.
* 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.

### v2.0.3 {#v2-0-3}

* Move folder structure to follow strict PSR-0.
* Changes CSS and HTML structure to follow current Orchestra Platform structure.

### v2.0.2 {#v2-0-2}

* Tweak design to match Bootstrap 3.

### v2.0.1 {#v2-0-1}

* Fixed unable to change backend theme.

### v2.0.0 {#v2-0-0}

* Add Role, ACL and Theme Management support.

2 changes: 1 addition & 1 deletion src/Control/ExtensionConfigHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

use Illuminate\Support\Fluent;
use Illuminate\Support\Facades\Config;
use Orchestra\Support\Facades\App;
use Orchestra\Model\Role;
use Orchestra\Support\Facades\App;

class ExtensionConfigHandler
{
Expand Down
17 changes: 15 additions & 2 deletions src/Control/Presenter/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\HTML;
use Orchestra\Html\Table\TableBuilder;
use Orchestra\Model\Role as Eloquent;
use Orchestra\Support\Facades\Form;
use Orchestra\Support\Facades\Table;
use Orchestra\Model\Role as Eloquent;

class Role extends AbstractablePresenter
{
Expand All @@ -23,6 +24,18 @@ public function table($model)

// Add columns.
$table->column(trans('orchestra/foundation::label.name'), 'name');
});
}

/**
* Table actions View Generator for Orchestra\Model\User.
*
* @param \Orchestra\Html\Table\TableBuilder $table
* @return \Orchestra\Html\Table\TableBuilder
*/
public function actions(TableBuilder $table)
{
return $table->extend(function ($table) {
$table->column('action', function ($column) {
$column->label('');
$column->escape(false);
Expand Down Expand Up @@ -62,7 +75,7 @@ public function table($model)
* View form generator for Orchestra\Model\Role.
*
* @param \Orchestra\Model\Role $model
* @return Orchestra\Html\Form\FormBuilder
* @return \Orchestra\Html\Form\FormBuilder
*/
public function form(Eloquent $model)
{
Expand Down
9 changes: 8 additions & 1 deletion src/Control/Processor/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ public function index($listener)
$eloquent = $this->model->paginate();
$table = $this->presenter->table($eloquent);

$this->fireEvent('list', array($eloquent, $table));

// Once all event listening to `orchestra.list: role` is executed,
// we can add we can now add the final column, edit and delete
// action for roles.
$this->presenter->actions($table);

return $listener->indexSucceed(compact('eloquent', 'table'));
}

Expand Down Expand Up @@ -153,7 +160,7 @@ public function destroy($listener, $id)
/**
* Save the role.
*
* @param Orchestra\Model\Role $role
* @param \Orchestra\Model\Role $role
* @param array $input
* @param string $type
* @return boolean
Expand Down
9 changes: 9 additions & 0 deletions src/Control/Validation/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ class Role extends Validator
'name' => array('required'),
);

/**
* List of events.
*
* @var array
*/
protected $events = array(
'orchestra.control.validate: roles',
);

/**
* On create validations.
*
Expand Down

0 comments on commit 2c07540

Please sign in to comment.