Wednesday, March 19, 2008

A Rails Plugin table_styles to let you easily use up to 42 different css styles for HTML table.

Today I wrote a rails plugin based on CSS Table Gallery .

I upload to google code: http://code.google.com/p/rails-plugin-table-styles/

Installation
script/plugin install http://rails-plugin-table-styles.googlecode.com/svn/trunk/table_styles

Usage

* Use the demo to find one of your favorable style.
# Start your server: >script/server
# Visit http://localhost:3000/table_styles_demo/
# Remember to add map.connect :controller/:action in your routes.rb

* Choose one of table styles in your layout header, use "tagbox" as an example.
<%= table_stylesheet_link_tag "tagbox" %>

* Just use table tag it in your view

* Use form helper if you want to let admin user to choose table style in user preferences page.
table_style_select or table_style_options_for_select

No comments: