2017 © Pedro Peláez
 

cakephp-plugin nice-admin

A roll up plugin of various bits to improve the look of admin areas index view.

image

davidyell/nice-admin

A roll up plugin of various bits to improve the look of admin areas index view.

  • Tuesday, May 1, 2018
  • by davidyell
  • Repository
  • 4 Watchers
  • 8 Stars
  • 590 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 18 Versions
  • 6 % Grown

The README.md

CakePHP-NiceAdmin

This plugin is designed to make admin areas baked from CakePHP look a little nicer and be easier to use and understand., (*1)

Requirements

  • CakePHP 3.x
  • PHP 5.4.16+
  • TwitterBootstrap (optional - just for styling)

What do you get in the box?

ActionButtons Helper

Helper for replacing the 'Actions' cell contents in index views with buttons rather than textual links., (*2)

StatusLights Helper

Helper for replacing a Status column in an index view with a nice coloured label based on the status_id., (*3)

Boolean Helper

This will change boolean display fields into ticks (✔) and crosses (✘) rather than 1/0., (*4)

Get the code

composer require davidyell/nice-admin:dev-master, (*5)

Installation

The plugin will need to be loaded using Plugin::load('NiceAdmin') in your /config/bootstrap.php., (*6)

Usage

To use the helpers you will need to add them to your helpers array in your AppView., (*7)

$this->loadHelper('NiceAdmin.StatusLights', $options);
$this->loadHelper('NiceAdmin.Actions');
$this->loadHelper('NiceAdmin.Gravatar');
$this->loadHelper('NiceAdmin.Boolean');

Loading StatusLights Helper

You can pass in an array of options into the StatusLights helper. The key of the array is the status_id then an array of the label to display and the class of the item output., (*8)

$options = [
    1 => [
        'label'=>'Live',
        'class'=>'label label-success'
    ],
    2 => [
        'label'=>'Inactive',
        'class'=>'label label-inverse'
    ],
    3 => [
        'label'=>'Deleted',
        'class'=>'label'
    ]
);

The example here replicates the default settings in the helper. So if you are happy with the defaults, you don't need to pass these options in., (*9)

StatusLights Helper

This will convert a status link into a nice visually identifiable label., (*10)

<td>
    <?= $this->StatusLights->status($entity->id); ?>
</td>

ActionButtons Helper

You can output either buttons or icons depending on which you need. The helper will, by default, output all three links as buttons. Passing in an array of buttons you want to ouput as v,e and/or d. For 'View', 'Edit', and 'Delete'. Then you'll need to pass in the controller. The last option is either icons or buttons., (*11)

<td class="actions">
    <?php echo $this->Actions->actions($entity->id, ['e','d'], 'myController', 'icons');?>
</td>

Loading Boolean Helper

Similar to the StatusLights helper you can pass in an array of options to customise the display of the output., (*12)

$optons = 
    1 => [ // true
        'class'=>'badge badge-success',
        'display'=>'&#10004;'
    ],
    0 => [ // false
        'class'=>'badge badge-important',
        'display'=>'&#10008;'
    ]
)

Boolean Helper

<?= $this->Boolean->display(1); ?>

What's it look like?

Table row, (*13)

Further development

Let me know what features you'd like or feel free to fork and create a pull request., (*14)

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License., (*15)

The Versions

01/05 2018

dev-master

9999999-dev https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

01/05 2018

1.0.10

1.0.10.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

30/04 2018

1.0.9

1.0.9.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

30/04 2018

1.0.7

1.0.7.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

30/04 2018

1.0.8

1.0.8.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

06/02 2017

1.0.6

1.0.6.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

21/12 2016

1.0.5

1.0.5.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

22/03 2016

1.0.4

1.0.4.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

22/03 2016

1.0.3

1.0.3.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

11/03 2016

1.0.2

1.0.2.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

10/03 2016

1.0.1

1.0.1.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

15/01 2016

1.0.0

1.0.0.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

10/07 2015

2.x-dev

2.9999999.9999999.9999999-dev https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

10/07 2015

0.1.2

0.1.2.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

16/02 2015

v0.1.1

0.1.1.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

10/05 2013

v0.1.0

0.1.0.0 https://github.com/davidyell/CakePHP-NiceAdmin

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

GPL-3.0

The Requires

 

30/01 2013

v0.0.1.1

0.0.1.1

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

The Requires

 

13/12 2012

v0.0.1

0.0.1.0

A roll up plugin of various bits to improve the look of admin areas index view.

  Sources   Download

The Requires