2017 © Pedro Peláez
 

cakephp-plugin cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

image

maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  • Tuesday, April 10, 2018
  • by maiconpinto
  • Repository
  • 23 Watchers
  • 96 Stars
  • 44,592 Installations
  • JavaScript
  • 6 Dependents
  • 0 Suggesters
  • 74 Forks
  • 11 Open issues
  • 15 Versions
  • 14 % Grown

The README.md

CakePHP AdminLTE Theme (2.0.0)

What's the news, (*1)

The AdminLTE was updated version to 2.4.5., (*2)

The CakePHP was updated version compatible to 4.0.0., (*3)

This release 2.0.0 is can be considered the stable version, as indicated in the SemVer.org recommendations., (*4)

Installation

You can install using composer., (*5)

composer require maiconpinto/cakephp-adminlte-theme

Enable Plugin

// src/Application.php

public function bootstrap()
{
    $this->addPlugin('AdminLTE');
}

Enable Theme

// src/Controller/AppController.php
use Cake\Event\EventInterface;

public function beforeRender(EventInterface  $event)
{
    $this->viewBuilder()->setTheme('AdminLTE');
}

Enable Form

// src/View/AppView.php

public function initialize()
{
    $this->loadHelper('Form', ['className' => 'AdminLTE.Form']);
}

Configure

// new config/adminlte.php file

return [
    'Theme' => [
        'title' => 'AdminLTE',
        'logo' => [
            'mini' => '<b>A</b>LT',
            'large' => '<b>Admin</b>LTE'
        ],
        'login' => [
            'show_remember' => true,
            'show_register' => true,
            'show_social' => true
        ],
        'folder' => ROOT,
        'skin' => 'blue'
    ]
];

// config/bootstrap.php

Configure::load('adminlte', 'default');

Customize Layout

If you want to Customize Layout, (*6)

What's the features

Layouts

There are 10 layout files., (*7)

  • boxed
  • collapsed
  • default it's the main layout
  • documentation
  • fixed
  • lockscreen
  • login
  • print
  • register
  • top

View Blocks

There are 3 Blocks where you can extend your theme., (*8)

  • css
<?php echo $this->fetch('css'); ?>

One example is src/Template/Pages/home.ctp:, (*9)

<?php echo $this->Html->css('AdminLTE./bower_components/morris.js/morris', ['block' => 'css']); ?>
  • script
<?php echo $this->fetch('script'); ?>

One example is src/Template/Pages/home.ctp:, (*10)

<?php echo $this->Html->script('AdminLTE./bower_components/morris.js/morris.min', ['block' => 'script']); ?>
  • scriptBottom
<?php echo $this->fetch('scriptBottom'); ?>

One example is src/Template/Pages/home.ctp:, (*11)

<?php $this->start('scriptBottom'); ?>
    <script>
      $.widget.bridge('uibutton', $.ui.button);
    </script>
<?php  $this->end(); ?>

Elements

There are 7 element files., (*12)

  • Element/
    • aside/
      • form
      • sidebar-menu
      • user-panel
    • aside-control-sidebar
    • aside-main-sidebar
    • footer
    • nav-top

Flash Message

The theme is prepared to show Flash Messages., (*13)

<?php echo $this->Flash->render(); ?>
<?php echo $this->Flash->render('auth'); ?>

Bake

One of the better Cake features. The theme is prepared to use Bake., (*14)

bin/cake bake all user --theme AdminLTE

View

  • AdminLTEView

This is one the better theme feature. It change the pattern how Cake show view files., (*15)

Basically, you overwrite any theme, plugin and prefix files., (*16)

  1. src/Template/Plugin/$theme/Plugin/$plugin/$prefix/
  2. src/Template/Plugin/$theme/Plugin/$plugin/
  3. src/Template/Plugin/$theme/$prefix/
  4. src/Template/Plugin/$theme/

FormHelper

FormHelper by default has format template based on Foundation template. This helper overwrite these templates., (*17)

Behavior

  • DatepickerBehavior

When you configure App.defaultLocale to pt_BR this Behavior is util., (*18)

Locale

When you configure App.defaultLocale to pt_BR this Locale is util., (*19)

Page debug

Added link to default page of CakePHP., (*20)

Page debug, (*21)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

The Versions

10/04 2018

1.1.0.x-dev

1.1.0.9999999-dev https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

31/03 2018

dev-master

9999999-dev https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

31/03 2018

1.0.8

1.0.8.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

25/08 2017

1.0.7

1.0.7.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

09/08 2017

1.0.6

1.0.6.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

18/05 2017

dev-new_version

dev-new_version https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

29/03 2017

dev-form-helper

dev-form-helper https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

26/01 2017

dev-develop

dev-develop https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

26/10 2016

1.0.5

1.0.5.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

17/08 2016

1.0.4

1.0.4.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

12/08 2016

1.0.3

1.0.3.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

27/07 2016

dev-datepicker

dev-datepicker https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

24/05 2016

1.0.2

1.0.2.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

10/05 2016

1.0.1

1.0.1.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates

28/12 2015

1.0.0

1.0.0.0 https://github.com/maiconpinto/cakephp-adminlte-theme

CakePHP 3.x AdminLTE Theme.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates