Sha256: 03ddd641397f407e354cf444536b6d306c7c0c5bfdcadb1a139ed25d025d9e5f

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

<% title("#{@page_title} | ") %>
<%= render partial: 'datatables' %>
<div class="row">
    <%= render partial: "menu" %>
    <div class="small-9 columns">
        <%= render partial: "date_range" %>
    </div>
    <div class="small-9 columns">
        <h2>Most Frequent Searches</h2>
        <table class="datatable">
            <thead>
                <tr>
                    <th>Rank</th>
                    <th>Query</th>
                    <th>Total</th>
                    <th>Percent of Total</th>
                    <th>Cumulative Percent</th>
                </tr>
            </thead>
            <tbody>
                <% it_count = 0 %>
                <% total_percent = 0 %>
                <% @query_counts.each do |query, count| %>
                    <% it_count += 1 %>
                    <% term_percent = (count / @searches_count.to_f)*100 %>
                    <% total_percent += term_percent %>
                    <tr>
                        <td><%= it_count %></td>
                        <td><%= link_to query, root_path(q: query) %></td>
                        <td><%= number_with_delimiter(count) %></td>
                        <td><%= number_to_percentage(term_percent, precision: 2) %></td>
                        <td><%= number_to_percentage(total_percent, precision: 2)%></td>
                    </tr>
                <% end %>
            </tbody>
        </table>
    </div>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
quick_search-core-0.1.1 app/views/quick_search/appstats/top_searches.html.erb
quick_search-core-0.1.0 app/views/quick_search/appstats/top_searches.html.erb
quick_search-core-0.0.1 app/views/quick_search/appstats/top_searches.html.erb
quick_search-core-0.0.1.test app/views/quick_search/appstats/top_searches.html.erb