Forum: Ruby on Rails RE: Existing Tabs Helper?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Berger, Daniel (Guest)
on 2006-05-03 20:57
(Received via mailing list)
> javascript/css.
> Stephan

I'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?



This communication is the property of Qwest and may contain confidential
privileged information. Unauthorized use of this communication is
prohibited and may be unlawful.  If you have received this communication
in error, please immediately notify the sender by reply e-mail and
all copies of the communication and any attachments.
Stephan W. (Guest)
on 2006-05-03 20:57
(Received via mailing list)
The havoc tabs are really easy to use, but depend on javascript and css
being available.


In essence, here is your "index" page:

		<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, '');

	<body onload="doOnLoad()">
		<div id="tabContainer">
			<div id="tabs">
				<ul id="tabList">
			<div id="tabPanels"></div>


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
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.

This topic is locked and can not be replied to.