by Paolo Dona
Tabnav: Do We Really Need a Plugin for Tabbed Navigation?
by Paolo Dona
“will code for food”
why rails?
speed!
leaving
more time for conversation with customers
more time for interface design
traditionally
40% time design
60% code
with rails
70% design
30% code
Design/Navigation
tabbed navigation links
tabs everywhere!!!
TABNAV
ruby script/generate tabnav
in the views:
< %= tabnav :tabname %>
auto-generate partials
note: Tabnav auto-magically finds your controllers and by default it creates a “tab” for every controller
nested tabs
ajax calls
dynamic attributes
highlighting rules
define which tabs get highlighted and when it happens
CSS customization
key points about tabnav and widgets in general
- easy and readable
- quick to setup
- no monkey business (no html or css!)
NAVIGATION
ruby ./script/generate navigation in the views (no cluttering of the views!) SHOWHIDE typical hide/show div for object details < %= show_detail_for user%> TABLEIZER start from a collection! use partials TOOLTIPS < %= tooltip image_tag('imagenmae') do xxxx tooltip zzzzz COLUMN LAYOUTS column_layout :columns => 3 do add_part do … add_part do end NUBBINS define sensible areas with_nubbin_for(item) do DON’T BE A CODE MONKEY!! http://www.seesaw.it http://blog.seesaw.it
< %= navigation
< %= tableize :customers, @customers,
:header => ‘xxx’
:generate_css => yes %>
< %= tableize :customers, @customers,
:partial => ‘xxx’%>
end
%>
end
end
…
end