Skip to content

Instantly share code, notes, and snippets.

@bumble-bee-chuna
Created August 10, 2017 18:43
Show Gist options
  • Save bumble-bee-chuna/f6d2db4b62ce30d785e389906869f79e to your computer and use it in GitHub Desktop.
Save bumble-bee-chuna/f6d2db4b62ce30d785e389906869f79e to your computer and use it in GitHub Desktop.
<% if defined? project %>
<%
components = retrieve_components(project)
previous_component = {}
components.each do |component|
%>
<%= open_or_close_unordered_list(previous_component, component).html_safe %>
<% if !containsLetter(component.description) %>
<li>
<a href="#">
<i class="fa <%= $component_symbol_hash[component.name] %>"></i>
<span class="nav-label"><%= truncate(component.name, length: 20) %></span>
<span class="fa arrow"></span>
</a>
<% else %>
<li class=""><a href="#"><%= component.name %></a></li>
<% end %>
<% previous_component = component %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment