crecto-admin

Admin dashboard for Crecto and your database
0.1.0 released
Crecto/crecto-admin
32 5 8
Crecto

Crecto Admin

Admin dashboard for Crecto and your database. Similar to Rails Admin or Active Admin.

Work in progress.

Installation

Add this to your application's shard.yml:

dependencies:
  crecto-admin:
    github: Crecto/crecto-admin

Usage

require "crecto-admin"

# add your models
admin_resource(User, Repo)
admin_resource(Project, Repo)

# Right now Crystal Admin is using kemal to render views
Kemal.run

To modify the behaviour and display of index, show, form fields and search fields, the following methods can be added to Crecto model classes. All return an array of string values for fields of the model.

  • The attributes shown on the index page: def collection_attributes() : Array(String)

  • The attributes show on the show page: def show_page_attributes() : Array(String)

  • The attributes in the create and update forms: def form_attributes() : Array(String)

  • The attributes used when searching: def search_attributes() : Array(String)

Development

TODO: Write development instructions here

Contributing

  1. Fork it ( https://github.com/[your-github-name]/CrectoAdmin/fork )
  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 a new Pull Request

Contributors

crecto-admin:
  github: Crecto/crecto-admin
  version: ~> 0.1.0
License MIT
Crystal 0.22.0

Authors

Dependencies 1

Development Dependencies 3

  • crecto master
    {'branch' => 'master', 'github' => 'crecto/crecto'}
  • kemal 0.19.0
    {'github' => 'kemalcr/kemal', 'version' => '0.19.0'}
  • pg 0.13.3
    {'github' => 'will/crystal-pg', 'version' => '0.13.3'}

Dependents 0

Last synced .
search fire star recently