2014-02-01 08:57:19 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# this code generates the list of icons in the filter by metacode box in the upper right menu area
|
|
|
|
#%>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
// keep an array of which metacodes are currently visible.
|
|
|
|
var categoryVisible = new Object();
|
|
|
|
|
|
|
|
<% @list = '' %>
|
|
|
|
<% Metacode.order("name").all.each_with_index do |m, index| %>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% @list += '<li><img src="' + m.icon + '" alt="' + m.name + '" /><p>' + m.name.downcase + '</p></li>' %>
|
2014-02-01 08:57:19 +00:00
|
|
|
|
|
|
|
categoryVisible['<%= m.name %>'] = true;
|
|
|
|
<% end %>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="filter_by_metacode">
|
|
|
|
<ul>
|
|
|
|
<%= @list.html_safe %>
|
|
|
|
</ul>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
</div>
|