ns/color-admin-bundle 0.2.14

Template bundle for Color Admin

Platform: Packagist

Language: PHP

Keywords: template

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

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


Intro to Color Admin Bundle

Configuration

    ns_color_admin:
        use_knp_menu: false #if set to true and KnpMenuBundle is installed, we'll set the template to our knp_menu.html.twig template 
        templates:
            theme: default|red|blue|purple|orange|black # template theme; Default: 'default'
            pagination:
                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
            header:
                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
            sidebar:
                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

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

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

Parameters:

  • 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

{{ endPanel() }}

Closes an open widget panel

button

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

Creates a simple button.

Parameters:

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

buttonDropdown

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

Creates a button with dropdown menu.

Parameters:

  • 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

{{ buttonDropdownItems(items) }}

Create items for a dropdown button. Called by buttonDropdown.

Parameters:

  • 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

MenuBuilder

See sample MenuBuilder in ColorAdminBundle/Menu/MenuBuilder.php

Services config

    ns_color_admin.menu.sidebar:
        class: NS\ColorAdminBundle\Menu\MenuBuilder
        arguments: ["@knp_menu.factory"]
        tags:
            - { 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

    knp_paginator:
        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.0.8 6.0.8 BSD-3-Clause
Explore the resolved development dependency tree for ns/color-admin-bundle 0.2.14
Dependencies Requirements Latest Stable Latest Release Licenses
symfony/symfony ^2.8|~3.0 v3.2.6 v3.2.6 MIT
Explore the resolved dependency tree for ns/color-admin-bundle 0.2.14

Releases

  • 0.2.14 - February 03, 2017 18:01
  • 0.2.13 - February 01, 2017 18:00
  • 0.2.12 - January 13, 2017 23:52
  • 0.2.11 - January 13, 2017 05:34
  • 0.2.10 - January 12, 2017 22:42
  • 0.2.9 - January 12, 2017 22:26
  • 0.2.8 - January 12, 2017 00:28
  • 0.2.7 - January 12, 2017 00:25
  • 0.2.6 - January 11, 2017 18:13
  • 0.2.5 - January 11, 2017 05:49
See all 37 releases

Project Statistics

SourceRank 5
Dependencies 1
Dependent projects 1
Dependent repositories 1
Total releases 37
Latest release
First release
Stars 0
Forks 0
Watchers 1
Contributors 2
Repo Size: 197 KB

Top Contributors See all

mwoynarski Nathanael Noblet

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-02-03 18:48:29 UTC

Login to resync this project