<% if @results %>
<% unless @clean_list %>
<table width="100%" class="EAconf_moduleFull">
    <tr>
        <td>
            <% if (params[:terms].strip.length > 0) %>
                <% if (@results.size > 0) %>
                    Matched <%= @results.size %> modules for term <em><%=h params[:terms] %>
                <% else %>
                    No matching modules for term <em><%=h params[:terms] %>
                <% end %>
            <% else %>
                Showing all <%= @results.size %> modules
            <% end %>
        </td>
    </tr>
    <tr>
        <td>
<% else %>
    <ul>
<% end %>
<% @results.each do |m| %>
<% unless @clean_list %>
    <tr>
        <td class="EAconf_moduleName">
            <span style="cursor:pointer;" onClick="window.parent.openModuleWindow('<%= @module_type %>', '<%= m.refname.gsub('/', ':') %>', '<%= m.name.gsub('"','').gsub("'","") %>')"><%= h(m.name) %></span>

            <% if m.platform and @module_type =~ /(payloads|exploits)/ %>
                <%= module_platform_icons(m.platform) %>
            <% else %>
                <% if (m.arch.length > 0) %>
                    (<%= h m.arch.join(', ') %>)
                <% end %>
            <% end %>
        </td>
    </tr>
    <tr>
        <td class="EAconf_moduleDescription" colspan="2">
            <%= m.description %>
        </td>
    </tr>
<% else %>
    <li><%= h(m.name) %></li>
<% end %>
<% end %>
<% unless @clean_list %>
</table>
<% else %>
</ul>
<% end %>
<% else %>
<p>
    No results for terms <em><%= h(params[:terms]) %></em>.
</p>
<% end %>

