Skip to content

Instantly share code, notes, and snippets.

@JFickel
Created October 8, 2012 12:04
Show Gist options
  • Save JFickel/3852166 to your computer and use it in GitHub Desktop.
Save JFickel/3852166 to your computer and use it in GitHub Desktop.
broken accordion
%aside
%nav#sidenav
#team-sidenav
#accordion2.accordion
- if @current_user.teams.present?
- @current_user.teams.each_with_index do |team, i|
- i += 1
.accordion-group
.accordion-heading
%a.accordion-toggle{"data-parent" => "#accordion2", "data-toggle" => "collapse", :href => "#collapse#{i.to_words.capitalize}"}
= link_to "#{team.name}", team_path(team)
%span.icon
%span.badge
%div{:id => "#collapse#{i.to_words.capitalize}", :class => "accordion-body collapse#{i == 1 ? ' in' : ''}"}
.accordion-inner
.calendar
%a{href: ''}
%span.icon
%span.title Calendar
%span.badge
.ranks
%a{href: ''}
%span.icon
%span.title Ranks
%span.badge
.rules
%a{href: ''}
%span.icon
%span.title Rules
%span.badge
.showcase
%a{href: ''}
%span.icon
%span.title Showcase
%span.badge
.forums
%a{href: ''}
%span.icon
%span.title Forums
%span.badge
.manage
%a{href: "#{edit_user_path(@current_user)}"}
%span.icon
%span.title Manage
%span.badge
= link_to 'Create a Team', teams_path
- else
= link_to 'Create a Team', teams_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment