metamaps--metamaps/app/views/shared/_metacodeoptions.html.erb

35 lines
928 B
Text
Raw Normal View History

<%#
# @file
# this code generates the list of icons that will drop down in the metacode select list on the topic card
#%>
<div id="metacodeOptions">
<ul>
2014-09-16 01:57:34 +00:00
<% MetacodeSet.order("name").all.each do |set| %>
<li>
<span><%= set.name %></span>
<ul>
<% set.metacodes.sort { |a, b| a.name <=> b.name }.each do |m| %>
<li data-id="<%= m.id.to_s %>">
<img width="16" height="16" src="<%= m.icon %>" alt="<%= m.name %>" />
<span class="mSelectName"><%= m.name %></span>
<div class="clearfloat"></div>
</li>
<% end %>
</ul>
</li>
<% end %>
<li>
<span>All</span>
<ul>
<% Metacode.order("name").all.each do |m| %>
<li data-id="<%= m.id.to_s %>">
<img width="16" height="16" src="<%= m.icon %>" alt="<%= m.name %>" />
<span class="mSelectName"><%= m.name %></span>
<div class="clearfloat"></div>
</li>
<% end %>
</ul>
</li>
</ul>
</div>