app/views/sourcemod_plugins/index.html.erb
<% title SourcemodPlugin.model_name.human.pluralize %>
<% content_for :page_heading do %>
<h1><%= SourcemodPlugin.model_name.human.pluralize %>
<small>
<% if @user %>
<%=t '.title_filter.user_html', user: @user.name %>
<% end %>
<% if @tags && !@tags.empty? %>
<%=t '.title_filter.tagged_html', tags: @tags.join(', ') %>
<% end %>
</small>
</h1>
<% end %>
<div class="row">
<div class="span8">
<% if @sourcemod_plugins.size > 0 %>
<%= render @sourcemod_plugins %>
<% else %>
<%= info_box do %>
<%=t '.no_results_html' %>
<% end %>
<% end %>
</div>
<div class="span3 search-form">
<!-- search form -->
<%= form_tag(search_sourcemod_plugins_path, :method => :get, :class => 'form-stacked') do |f| %>
<h3><%=t '.filter.title' %></h3>
<div class="search-field clearfix">
<label><%= t('.filter.name') %></label>
<%= text_field_tag :name, @sourcemod_plugin.name %>
</div>
<div class="search-field clearfix">
<label><%=t '.filter.user' %></label>
<% if @user %>
<%= hidden_field_tag :user_id, @user.id %>
<span><%= link_to @user.name, @user %> <small>(<a href="#" class="clear-user">clear</a>)</small></span>
<% else %>
<em>All users</em>
<% end %>
</div>
<div class="search-field clearfix">
<label><%= t('.filter.tags') %></label>
<%= text_field_tag :tags, (@tags ? @tags.map(&:name).join(",") : ""),
:data => {taglist: Tag.used.map(&:name).join(",")} %>
</div>
<%
=begin
%>
<div class="control-group search-field clearfix">
<label>% Attempted</label>
<%= text_field_tag :attempted_min, params[:attempted_min], :class => "span1", :placeholder => "min" %>
to
<%= text_field_tag :attempted_max, params[:attempted_max], :class => "span1", :placeholder => "max" %>
</div>
<div class="control-group search-field clearfix">
<label>% Overall</label>
<%= text_field_tag :overall_min, params[:overall_min], :class => "span1", :placeholder => "min" %>
to
<%= text_field_tag :overall_max, params[:overall_max], :class => "span1", :placeholder => "max" %>
</div>
<%
=end
%>
<%= submit_tag t('.submit'), :class => "btn" %>
<% end %>
<!-- / search form -->
</div>
</div>
<p>Showing <%= pluralize @sourcemod_plugins.count, "plugin" %></p>
<% content_for :bottom_scripts do %>
<%#= javascript_include_tag "graphs/participation" %>
<% end %>