= netzke-basepack A pack of basic Rails/ExtJS widgets as a part of the Netzke framework. Live demo/tutorials on http://blog.writelesscode.com. Introduction to the Netzke framework and the Wiki: http://github.com/skozlov/netzke == Prerequisites 1. Rails >= 2.2 2. Netzke assumes that your ExtJS library is in public/extjs, which may be a symbolic link, e.g: cd public && ln -s ~/Developer/extjs/ext-3.1.1 extjs 3. acts_as_list plugin: ./script/plugin install git://github.com/rails/acts_as_list.git 4. netzke-core gem or plugin. Gem: gem install netzke-core Plugin (for the "edge" stuff, recommended): ./script/plugin install git://github.com/skozlov/netzke-core.git = Installation For the "edge" stuff, install as plugin (recommended): ./script/plugin install git://github.com/skozlov/netzke-basepack.git Or install as gem: gem install netzke-basepack == Usage If using as gem, include it into environment.rb: config.gem "netzke-basepack" Include mapping for Netzke controller providing Netzke javascripts and styles (in routes.rb): map.netzke Run the generators (some assets and a migration for dynamically configured columns/fields): ./script/generate netzke_basepack To be able to use persistent on-the-fly configuration of widgets, run netzke-core generators: ./script/generate netzke_core ... then run the migrations: rake db:migrate == Embedding widgets into Rails' view To enable Netzke widgets in Rails' views, you need to add the following helper into your layout template, inside the "head" tag: <%= netzke_init %> This will include both ExtJS-related files (JavaScript and styles), and Netzke-related files. Now let's embed a widget into a view. The following example will provide you with a grid-based scaffold for ActiveRecord-model called Book. You may generate it like this: ./script/generate model Book title:string amount:integer (don't forget to re-run the migrations after it) Now embed a widget into a view like this: <%= netzke :books, :class_name => 'GridPanel', :model => 'Book' %> For more examples, see http://netzke-demo.writelesscode.com == Icons support Netzke-basepack supports FamFamFam Silk icon set (http://www.famfamfam.com/archive/silk-icons-thats-your-lot/). To enable it, download it and put the "icons" folder into your app's public/images folder. Then restart your application. == More info Introduction to Netzke framework and wiki: http://github.com/skozlov/netzke Twitter: http://twitter.com/skozlov Tutorials: http://blog.writelesscode.com Live-demo with sample code: http://netzke-demo.writelesscode.com = Credentials Testing done with the help of http://github.com/pluginaweek/plugin_test_helper --- Copyright (c) 2008-2010 Sergei Kozlov, released under the MIT license