ns/color-admin-bundle 0.2.17

Template bundle for Color Admin

Platform: Packagist

Language: HTML

Keywords: template

Repository: https://github.com/NobletSolutions/ColorAdminBundle

View on registry: https://packagist.org/packages/ns/color-admin-bundle#0.2.17

Intro to Color Admin Bundle


        use_knp_menu: false #if set to true and KnpMenuBundle is installed, we'll set the template to our knp_menu.html.twig template 
            theme: default|red|blue|purple|orange|black # template theme; Default: 'default'
                template: string # template for KNP Paginator - Default: 'NSColorAdminBundle:Pagination:pagination.html.twig'
                wrapper_class: string # css classname for wrapper <div> - Default: 'paginator-md'
                labels: true|false # select whether to display "Previous/Next" labels - Default: false
            use_pace: true|false # use the pace.js preloader script for fancy page-load animations - Do not use in development as page content will not display on 500-errors - Default: false
                fixed: true|false # page header fixed to top of window - Default: true
                inverse: true|false # Inverse (white on black) style for page header - Default: false
                fixed: true|false # sidebar fixed to top left of window - Default: true
                scrolling: true|false # sidebar scrolls independently - Default: true
                grid: true|false # alternate sidebar style with borders - Default: false
                gradient: true|false # alternate colors with gradient style - Default: false

Twig functions

There are some additional helper functions for creating common UI elements in twig:


{{ beginPanel(label, parameters, headerContent) }}

Creates a new widget panel with the opening tags for the widget content.


  • label: the widget title
  • parameters: additional configuration parameters:
    • style: default|inverse|primary|info|success|warning|danger; default: inverse
    • background: white|black|blue|green|orange|red|aqua; default: white
    • text: white|black; default: black
    • sortable: the sortable-id when using the sortables
  • headerContent: an html string containg any additional header markup (controls, buttons, etc). Appears before the widget title. (so use pull-left, etc)


{{ endPanel() }}

Closes an open widget panel


{{ button(text, href, class) }}

Creates a simple button.


  • text: the button text
  • href: the button url
  • class: the css classname for the button; default: "btn-default"


{{ buttonDropdown(text, primary_action, items, group_class, primary_class) }}

Creates a button with dropdown menu.


  • text: The button text
  • primary_action: the url for the "main" button
  • items: the list of dropdown items (see buttonDropdownItems)
  • group_class: css class for the button group
  • primary_class: css class for the primary button; default: "btn-primary"


{{ buttonDropdownItems(items) }}

Create items for a dropdown button. Called by buttonDropdown.


  • items: array of key-value pairs; {'Button Label':'url'}. Keys must be unique. Use false for the value to create a separator.
{{ buttonDropdownItems({'Item 1':'http://www.google.com', 'Item 2':'http://www.yahoo.com', 'Separator 1':false, 'Item 3':'http://www.microsoft.com'}) }}

Main navigation configuration


See sample MenuBuilder in ColorAdminBundle/Menu/MenuBuilder.php

Services config

        class: NS\ColorAdminBundle\Menu\MenuBuilder
        arguments: ["@knp_menu.factory"]
            - { name: knp_menu.menu_builder, method: createSidebarMenu, alias: sidebar } # The alias is what is used to retrieve the menu
            - { name: knp_menu.menu_builder, method: createSidebarMenu, alias: breadcrumbs }

Other config

        template: NS\ColorAdminBundle\Resources\Paginator\paginator.html.twig #optional

Error Templates

There are error templates located in views/Exception; Copy/extend these in app/Resources/TwigBundle/views/Exception to use the custom error page templates.

Development Dependencies Requirements Latest Stable Latest Release Licenses
phpunit/phpunit ^4.8||^5.0 6.1.2 6.1.2 BSD-3-Clause
Explore the resolved development dependency tree for ns/color-admin-bundle 0.2.17
Dependencies Requirements Latest Stable Latest Release Licenses
symfony/symfony ^2.8|~3.0 v3.2.7 v3.2.7 MIT
Explore the resolved dependency tree for ns/color-admin-bundle 0.2.17


0.2.17 April 13, 2017
0.2.16 April 05, 2017
0.2.15 March 15, 2017
0.2.14 February 03, 2017
0.2.13 February 01, 2017
0.2.12 January 13, 2017
0.2.11 January 13, 2017
0.2.10 January 12, 2017
0.2.9 January 12, 2017
0.2.8 January 12, 2017
See all 40 releases

Project Statistics

SourceRank 6
Dependencies 1
Dependent projects 1
Dependent repositories 1
Total releases 40
Latest release
First release
Stars 0
Forks 0
Watchers 1
Contributors 2
Repo Size: 224 KB

Top Contributors See all

Nathanael Noblet mwoynarski

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-04-13 20:22:46 UTC

Login to resync this project