tab_fu
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Plug-in to manage tabbed interfaces with ease in Ruby on Rails (or really any menu navigation)
TabFu 0.2.0
=====

TabFu is a Ruby on Rails plug-in designed to ease the management of a 
tabbed interface such as an admin panel. It allows you to programmatically
create the HTML for the list-based tabs and then choose which of the tabs
is the current one at the controller, action, or view level.

Example
=======

    class ApplicationController
      include TabFu
      tab :home # default tab, optional
    end
    
    class UsersController < ApplicationController
      tab :users
      
      def contact
        tab :contact, :custom_id => :two
        
        # also accepted:
        # - `tab :custom_id => :two`  # main tabs will default to :home
        # - `tab :contact; tab :custom_id => :two` # same result as current
      end
    end
    
    # layout/application.html.erb
    # ...
    
    
    
    

If you then access "/users/contact", the `#menu` div will look like:

    
    
    

To Do
=====

  - **[IMPLEMENTED]** Lists with different `id`s will be treated independently. Choosing the current
    tab will be with a syntax similar to `tab :list_id => :tab_identifier` with the 
    option to specify more than one at once. 
  - Customize list-item html (i.e. choose not to have `` junk)
  - Tests/Specs! (for now this plug-in is just pulling code out from an existing project)
  - RDocs

Copyright
=========

Copyright (c) 2008 Bodaniel Jeanes, released under the MIT license.

In other words, go wild and fork it! Please just send back any additions!

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。