Code Monkey home page Code Monkey logo

adminthemebundle's Introduction

AdminThemeBundle

Admin Theme based on the AdminLTE Template for easy integration into symfony. This bundle integrates several commonly used javascripts and the awesome AdminLTE Template.

Installation

Installation using composer is really easy: this command will add "avanzu/admin-theme-bundle": "~1.3" to your composer.json and will download the bundle:

php composer.phar require avanzu/admin-theme-bundle

Notice: if you prefer to stay with the AdminLTE theme v1.x, manually reference "avanzu/admin-theme-bundle": "~1.1" in composer.json "require" part and run php composer.phar update

Enable the bundle in your kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
	$bundles = array(
		// ...
		new Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),
	);
}

Install assets (preferably using symlink method but hardcopy works as well)...

php app/console assets:install --symlink

... and fetch vendors:

php app/console avanzu:admin:fetch-vendor

Symfony 2.8 notice

This bundle requires assetic, but it isn't shipped with symfony anymore since version 2.8. To install assetic, follow these steps:

php composer.phar require symfony/assetic-bundle

Enable the bundle in your kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
	$bundles = array(
		// ...
		new Symfony\Bundle\AsseticBundle\AsseticBundle(),
	);
}

Add the following lines at app/config/config_dev.yml:

assetic:
    use_controller: false

Changing default values from templates

If you want to change any default value as for example admin_skin all you need to do is define the same at app/config/config.yml under [twig] section. See example below:

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        admin_skin: skin-blue

You could also define those values at app/config/parameters.yml:

admin_skin: skin-blue

and then use as follow in app/config/config.yml:

# Twig Configuration
twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    globals:
        admin_skin: "%admin_skin%"

AdminLTE skins are: skin-blue (default for this bundle), skin-blue-light, skin-yellow, skin-yellow-light, skin-green, skin-green-light, skin-purple, skin-purple-light, skin-red, skin-red-light, skin-black and skin-black-light. If you want to know more then go ahead and check docs for AdminLTE here.

There are a few values you could change for sure without need to touch anything at bundle, just take a look under Resources/views. That's all.

Upgrade notice

Version >= 1.3 comes with pre packaged asset files located under Resources/public/static/[prod|dev]. So, there is no longer a strict requirement for bower and/or assetic. The assetic groups hovever, are still there and should work as usual.

Next Steps

adminthemebundle's People

Contributors

avanzu avatar dr0bz avatar glensc avatar hjanuschka avatar holicz avatar jmontoyaa avatar kuldipem avatar lucasaba avatar martinlyne avatar mrmitch avatar mskurski avatar oskarstark avatar pdesmarais avatar piogrek avatar plozmun avatar quentin-st avatar secit-pl avatar surivrox avatar zghosts avatar

Watchers

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