gregbell/active_admin — Issue #632: Toggle Panel
Author: fu-media
Created: 2011-10-17 04:56:45+00:00
State: open

//in custom view add a class "toggle" to the panel
.panel.toggle
%h3 Screennames
.panel_contents
your content to display

//add custom stylesheet
.panel.toggle
h3
cursor: pointer
&:hover
text-decoration: underline
.panel_contents
display: none

//add some javascript

$('.panel.toggle h3').live('click', function (e) {
$(this.parentNode.children[1]).toggle();
return false;
});

Voila done :-)