GithubHelp home page GithubHelp logo

hareshpatel1990 / cakephp-adminlte-theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maiconpinto/cakephp-adminlte-theme

0.0 1.0 0.0 20.34 MB

CakePHP AdminLTE Theme

Home Page: http://maiconpinto.github.io/cakephp-adminlte-theme/

License: MIT License

PHP 38.18% CSS 22.65% JavaScript 38.17% HTML 1.00%

cakephp-adminlte-theme's Introduction

CakePHP AdminLTE Theme (1.1.0)

What's the news

The AdminLTE was updated version to 2.4.5.

The CakePHP was updated version compatible to 3.7.0.

This release 1.1.0 is can be considered the stable version, as indicated in the SemVer.org recommendations.

Installation

You can install using composer.

composer require maiconpinto/cakephp-adminlte-theme

Enable Plugin

// src/Application.php

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

Before of CakePHP 3.7

// config/bootstrap.php

Plugin::load('AdminLTE', ['bootstrap' => true, 'routes' => true]);

Enable Theme

// src/Controller/AppController.php

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

    // Before of CakePHP 3.5
    $this->viewBuilder()->theme('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');

Before of CakePHP 3.7

// config/bootstrap.php

Configure::write('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' // default is 'blue'
]);

Customize Layout

If you want to Customize Layout

What's the features

Layouts

There are 10 layout files.

  • 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.

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

One example is src/Template/Pages/home.ctp:

<?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:

<?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:

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

Elements

There are 7 element files.

  • 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.

<?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.

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.

Basically, you overwrite any theme, plugin and prefix files.

  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.

Behavior

  • DatepickerBehavior

When you configure App.defaultLocale to pt_BR this Behavior is util.

Locale

When you configure App.defaultLocale to pt_BR this Locale is util.

Page debug

Added link to default page of CakePHP.

Page debug

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

cakephp-adminlte-theme's People

Contributors

maiconpinto avatar tsmsogn avatar maxmasetti avatar nmeyer-otto avatar dcoturel avatar mirwalk avatar ajibarra avatar anthonnygm avatar waffle-iron avatar ferama avatar nima-rahbar avatar lightbyte avatar ignaciocarre avatar nicolaszanghi avatar yild avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.