Kadmin

GitHub release

Collection of utility, configuration, etc., for admin areas in different projects. Theme based on Modular Admin

Installation

Add to your gemfile:

gem 'kadmin', git: '[email protected]:barcoo/kadmin.git'

Development

Use local gem

In case you want to test changes locally before commiting to the repository you can setup your environment to use the local version instead:

bundle config local.kadmin $YOUR_LOCAL_KADMIN_PATH/

change Gemfile to:

gem 'kadmin', git: 'https://github.com/barcoo/kadmin', branch: "master" # change branch to your working branch name
bundle install

you should see something similiar to: 'Using kadmin 1.0.8 from https://github.com/barcoo/kadmin (at $YOUR_LOCAL_KADMIN_PATH@9203125)'

When you're finished remove the local setup by changing your Gemfile back and execute

bundle config --delete local.kadmin

Source: How to specify local Ruby gems in your Gemfile

kadmin internals...

Clone, bundle install, run migrations.

Third-party libraries that are manually added should go in vendor/, including assets (e.g. vendor/assets/stylesheets/modular).

Reusable, non page specific components should go into app/components (e.g. Kadmin::Finder, Kadmin::Pager, etc.).

Avoid using helpers, instead create models with presenters (i.e. view models). See lib/presenter.rb and lib/presentable.rb. For an example of a presentable object, see app/components/pager.rb and app/components/pager/presenter.rb.

Make sure to read the following:

If working on the Form objects, do read:

This covers the basics of ActiveModel, on which the Form object is based.

Release

Note: eventually use one of the popular git release scripts to tag, create tag notes, etc., based on git changelog.

When you want to create a new release, use the rake task cim:release (in the main Rakefile)

bundle exec rake cim:release

Roadmap

TODOs:

  • [ ] Finish form objects (destruction and creation) + tests + examples
  • [ ] Make a generic typehead-select form object
  • [x] Wrap Finder objects + view helpers