Giter Club home page Giter Club logo

uf_configmanager's Introduction

Configuration Manager Sprinkle for UserFrosting 4

Configuration Manager sprinkle for UserFrosting 4. Lets you edit UserFrosting configs from the interface.

This version only works with UserFrosting 4.1.x !

Help and Contributing

If you need help using this sprinkle or found any bug, feels free to open an issue or submit a pull request. You can also find me on the UserFrosting Chat most of the time for direct support.

Buy Me a Coffee at ko-fi.com

Installation

Edit UserFrosting app/sprinkles.json file and add the following to the require list : "lcharette/uf_configmanager": "^2.0.0". Also add FormGenerator and ConfigManager to the base list. For example:

{
    "require": {
        "lcharette/uf_configmanager": "^2.0.0"
    },
    "base": [
        "core",
        "account",
        "admin",
        "FormGenerator",
        "ConfigManager"
    ]
}

Run composer update then php bakery bake to install the sprinkle.

Permissions

The migration will automatically add the update_site_config permission to the Site Administrator role. To give access to the config UI to another user, simply add the update_site_config permission slug to that user role.

Add link to the menu

The configuration UI is bound to the the /settings route. Simply add a link to this route where you want it. The checkAccess make it so it will appear only for users having the appropriate permission. For example, you can add the following to the sidebar menu :

{% if checkAccess('update_site_config') %}
<li>
    <a href="{{site.uri.public}}/settings"><i class="fa fa-gears fa-fw"></i> <span>{{ translate("SITE.CONFIG.MANAGER") }}</span></a>
</li>
{% endif %}

Adding custom config

! TODO

NOTE Only .json are accepted. Yaml schemas are cannot be used for now.

Licence

By Louis Charette. Copyright (c) 2017, free to use in personal and commercial software as per the MIT license.

uf_configmanager's People

Contributors

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