<div class="center jumbotron">
  <p>
  <a href='https://github.com/linuxfoundation/cii-best-practices-badge/blob/master/doc/criteria.md'>Criteria information is on GitHub</a>.</p>
</div>

<div class="center jumbotron">
  <h1>Criteria</h1>
  <!-- This page quickly shows some information about the Criteria. -->
  <p>
  <a href='https://github.com/linuxfoundation/cii-best-practices-badge/blob/master/doc/criteria.md'>Criteria information is on GitHub</a>.</p>
  <p>
  <%
    active_criteria = Criteria.all.select {|c| !c.future?}
    future_criteria = Criteria.all.select {|c| c.future?}
  %>
  Current number of criteria:
    <%= active_criteria.count %> (active)
    + <%= future_criteria.count %> (future)
    = <%= Criteria.all.count %> (total)
  <br>
  Among active criteria, there are
    <%= active_criteria.select {|c| c.category == 'MUST'}.count %> MUST,
    <%= active_criteria.select {|c| c.category == 'SHOULD'}.count %> SHOULD, and
    <%= active_criteria.select {|c| c.category == 'SUGGESTED'}.count %>
    SUGGESTED criteria.
  Among active criteria,
    <%= active_criteria.select {|c| c.na_allowed}.count %> allow N/A,
    <%= active_criteria.select {|c| c.met_url_required}.count %>
    require a URL when met, and
    <%= active_criteria.select {|c| c.details.present?}.count %>
    have details in their description.
  <p>
</div>

Add statistics display to "/criteria"
Add statistics display to "/criteria"

  Add display of some statistics to the /criteria page.
  This makes it easy to get some basic statistics.

  At this time it reports:
  Current number of criteria: 66 (active) + 8 (future) = 74 (total)
  Among active criteria, there are 42 MUST, 10 SHOULD,
  and 14 SUGGESTED criteria.
  Among active criteria, 21 allow N/A, 8 require a URL when met,
  and 37 have details in their description.

Signed-off-by: David A. Wheeler <9ae72d22d8b894b865a7a496af4fab6320e6abb2@dwheeler.com>
