Hi. I''m going to start writting an ajax "tabs"" helper, but before starting to reinvent the wheel (and in order to avoid DRO : don''t Repeat Ourselves :-) ) I wish to know if there is any project for this already. Thanks.
What would this helper do? I''m using the Havoc Studio tabs, all javascript/css. Stephan Matias Surdi wrote:> Hi. > > I''m going to start writting an ajax "tabs"" helper, but before starting to > reinvent the wheel (and in order to avoid DRO : don''t Repeat > Ourselves :-) ) I wish to know if there is any project for this already. > > Thanks. > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Stephan Wehner wrote:> What would this helper do? I''m using the Havoc Studio tabs, all > javascript/css. > Stephan > > Matias Surdi wrote: >> Hi. >> >> I''m going to start writting an ajax "tabs"" helper, but before starting >> to reinvent the wheel (and in order to avoid DRO : don''t Repeat >> Ourselves :-) ) I wish to know if there is any project for this already. >> >> Thanks. >> >> >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >>This is what I was talking about :-) Thanks.
> -----Original Message----- > From: rails-bounces@lists.rubyonrails.org > [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of > Stephan Wehner > Sent: Friday, April 28, 2006 9:48 AM > To: rails@lists.rubyonrails.org > Subject: Re: [Rails] Existing Tabs Helper? > > > What would this helper do? I''m using the Havoc Studio tabs, all > javascript/css. > StephanI''m not positive what the OP is referring to, but I''d like some sort of plugin where my views show up as tabs on a page that users could click on for easier navigation. Does something like that exist? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
The havoc tabs are really easy to use, but depend on javascript and css being available. See http://www.havocstudios.com/articles/ajax/ajax_tabs/ In essence, here is your "index" page: <html> <head> <title>havocStudios: Ajax Tabs Demo</title> <style type="text/css" media="screen">@import "tabs.css";</style> <script src="ajax.js" type="text/javascript"></script> <script src="tabs.js" type="text/javascript"></script> <script type="text/javascript"> function doOnLoad() { OpenTab("tab_page1", "Page 1", "page1.html", false, ''''); } </script> </head> <body onload="doOnLoad()"> <div id="tabContainer"> <div id="tabs"> <ul id="tabList"> </ul> </div> <div id="tabPanels"></div> </div> </body> </html> Then you add lines OpenTab(......) for all the views that you like. But it doesn''t work well when there are too many tabs. So if you can get a handle on the available views, you could add methods/fields to their controllers to fill in the OpenTab paramaters for the tab (viewname, title, can be closed, colour,...), and that would be what you are looking for: collect that information in another index view. and produce the HTML from above, with the OpenTab lines. But maybe that doesn''t need to be automated. Adding the required lines manually, and placing the file in the public folder should be enough. The Havoc tabs also allow opening new tabs later on, closing them, ... If you don''t want to rely on javascript, I don''t know. Stephan