publiclab/plots2

View on GitHub
app/views/stats/subscriptions.html.erb

Summary

Maintainability
Test Coverage
<div class="col-lg-3">
  <h4>About this page </h4>
  <p>People subscribe to tags so that they can be updated when a research is posted with the tag they are subscribed to. This page shows the number of subscriptions for every tag on the site. </p>
</div>
<div class="col-lg-8 col-lg-offset-1">
  <h2><%= translation('layout._header.subscriptions') %></h2>
  <p>This data is cached every 24 hours.</p>
  <table class="table inline-grid">
  <tr>
    <thead>
    <th><%= translation('layout._header.subscriptions') %></th>
    <th><%= translation('tag_controller.tags') %></th>
    </thead>
  </tr>
  <% @tags.each do |range,tags| %>
  <tr>
    <td>
      <%= range * 10 %> - <%= range * 10 + 9 %>
    </td>
    <td>
      <% tags = tags.sort %>
      <% tags.each do |tag| %>
      <a class="badge badge-primary" href="/tag/<%= tag[0] %>">
        <%= tag[0]%> 
        <span class="badge badge-light"><%= tag[1] %></span>
      </a>
      <% end %>
    </td>
  </tr>
  <% end  %>
  </table>
</div>