2017 © Pedro Peláez
 

cakephp-plugin nice-admin-bake-scripts

NiceAdminBakeTheme plugin for CakePHP

image

davidyell/nice-admin-bake-scripts

NiceAdminBakeTheme plugin for CakePHP

  • Wednesday, September 13, 2017
  • by davidyell
  • Repository
  • 5 Watchers
  • 11 Stars
  • 1,598 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 19 Versions
  • 5 % Grown

The README.md

Nice Admin Bake Theme

A custom theme using Twitter Bootstrap to bake admin templates in CakePHP 3, using the CakePHP Bake plugin., (*1)

Requirements

  • CakePHP 3
  • PHP 5.6+

What is it?

This is a theme for the CakePHP/Bake plugin which will customise the code which is generated. I've made it because I don't like the default bake theme, or the fact that it outputs the actions sidebar., (*2)

Plus I tend to use Twitter Bootstrap to make my admin areas so this theme will leverage that front-end framework., (*3)

Installation

You should install this plugin into your CakePHP application using composer., (*4)

The recommended way to install composer packages is using,, (*5)

composer require davidyell/nice-admin-bake-scripts

Setup

In your config/bootstrap.php you'll need to load the plugin with Plugin::load('NiceAdminBakeTheme');, (*6)

In your admin layout, you'll need to include the theme and javascript if you're using Twitter Bootstrap. This snippet also includes jQuery, so if you've already loaded that, please remove that line., (*7)

// In the head of your layout
= $this->Html->css([
    '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css',
    '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css'
]) ?>

// Before your script block
= $this->Html->script([
    '//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js',
    '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'
]);?>

Optional extras

If you want to use Twitter Bootstrap for all your forms be sure to enable friendsofcake/bootstrap-UI in your application and loading the helpers in your src/View/AppView.php. Find out more about installing bootstrap-ui in their readme., (*8)

This can be easily coupled with the friendsofcake/crud plugin to pretty much make an entire basic admin in around 5 minutes!, (*9)

A basic stylesheet is included to fix some minor things. You can symlink the stylesheet into your own webroot/css and include it from there, using, (*10)

$ bin/cake plugin assets symlink NiceAdminBakeTheme

Of if you want to create the link manually cd webroot/css && ln -s ../../vendor/davidyell/nice-admin-bake-scripts/webroot/css/nice-admin.css., (*11)

Baking

The theme should be available when you are baking. You can check this by just running a bake command with -h and checking the available themes listed in the --theme option help. If you don't see it make sure you've loaded the plugin., (*12)

Controllers

bin/cake bake controller --theme=NiceAdminBakeTheme Examples

Templates

bin/cake bake template --theme=NiceAdminBakeTheme Examples

Prefixed templates

bin/cake bake template --theme=NiceAdminBakeTheme --prefix=Admin Examples

Example layout, elements and dashboard

A basic admin layout, dashboard and navigation elements are included in the plugin. Which you can symlink, extend, or copy into your project as you see fit., (*13)

If you want to link to the styles. echo $this->Html->css(['nice-admin']);, (*14)

However it's preferable to use a symlink., (*15)

$ bin/cake plugin assets symlink NiceAdminBakeTheme

:warning: These elements are optional, and do not provide a completed admin. You will need to customise this to suit your needs., (*16)

Changes to standard bake

  • Removed the _serialize from the controllers
  • Removed the actions sidebar from all templates
  • Formatted tables with Bootstrap
  • Added a 'New' button to the top of tables
  • Add basic filter form to index templates
  • Tidied up the pagination
  • Made the Actions column links into buttons
  • Added handling for date, datetime and time using the Time helper
  • Added handling for boolean data using Bootstrap icons
  • Updated the View template to use Bootstrap panels
  • Spaced out the Table definition functions
  • Added classes to the columns in index templates
  • Lists are now ordered
  • Index pagination is done with a query

License

See license.md, (*17)

The Versions

13/09 2017

dev-master

9999999-dev

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.12

3.0.12.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.11

3.0.11.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.10

3.0.10.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.9

3.0.9.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.8

3.0.8.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

21/08 2017

3.0.7

3.0.7.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

12/07 2017

3.0.6

3.0.6.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

04/04 2017

3.0.5

3.0.5.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

01/11 2016

3.0.4

3.0.4.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

14/01 2016

3.0.3

3.0.3.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

09/10 2015

3.0.2

3.0.2.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp bootstrap theme admin cakephp3 bake

16/09 2015

3.0.1

3.0.1.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp theme admin cakephp3 bake

25/06 2015

3.0.0

3.0.0.0

NiceAdminBakeTheme plugin for CakePHP

  Sources   Download

GPL-3.0

The Requires

 

cakephp theme admin cakephp3 bake

10/02 2015

2.x-dev

2.9999999.9999999.9999999-dev https://github.com/davidyell/CakePHP-NiceAdminBakeScripts.git

Updated bake scripts to use the davidyell/NiceAdmin helpers and also add some tags for Twitter Bootstrap 2.

  Sources   Download

GPL-3.0

The Requires

 

10/02 2015

v0.0.3

0.0.3.0 https://github.com/davidyell/CakePHP-NiceAdminBakeScripts.git

Updated bake scripts to use the davidyell/NiceAdmin helpers and also add some tags for Twitter Bootstrap 2.

  Sources   Download

GPL-3.0

The Requires

 

18/07 2014

v0.0.2.1

0.0.2.1 https://github.com/davidyell/CakePHP-NiceAdminBakeScripts.git

Updated bake scripts to use the davidyell/NiceAdmin helpers and also add some tags for Twitter Bootstrap 2.

  Sources   Download

GPL-3.0

The Requires

 

18/07 2014

v0.0.2

0.0.2.0 https://github.com/davidyell/CakePHP-NiceAdminBakeScripts.git

Updated bake scripts to use the davidyell/NiceAdmin helpers and also add some tags for Twitter Bootstrap 2.

  Sources   Download

GPL-3.0

The Requires

 

18/02 2014

v0.0.1

0.0.1.0 https://github.com/davidyell/CakePHP-NiceAdminBakeScripts.git

Updated bake scripts to use the davidyell/NiceAdmin helpers and also add some tags for Twitter Bootstrap 2.

  Sources   Download

GPL-3.0

The Requires