[%- PROCESS "statistics/macros-header.tt" -%]
[% WRAPPER 'statistics/layout.tt' title=l('Editors') full_width=1 page='editors' %]
[%- MACRO display_editor_stats(data_points, table_label, editor_label, count_label) BLOCK -%]
  <h3>[% table_label %]</h3>
  <table class="tbl">
    <thead>
      <tr>
        <th class="pos">[% l('Rank') %]</th>
        <th>[% editor_label %]</th>
        <th>[% count_label %]</th>
      </tr>
    </thead>
    <tbody>
    [%- FOR data_point=data_points -%]
      [%- IF !data_point.count AND loop.count == 1 -%]
      <tr class="even"><td colspan=3>[% l('There is no data to display here.') %]</td></tr>
      [%- END -%]
      [%- LAST UNLESS data_point.count -%]
      <tr class="[% loop.parity %]">
        <td class="t">[% loop.count %]</td>
        <td>[% link_editor(data_point.editor) %]</td>
        <td>[% add_commas(data_point.count) %]</td>
      </tr>
    [%- END -%]
    </tbody>
  </table>
[%- END -%]

<p>[%- l('Last updated: {date}', { date => stats.date_collected }) -%]</p>

<p>[% l('For the vote statistics, only yes or no votes are counted, abstain
    votes are not counted.') %]</p>

<div style="float:left; display:inline-block; margin-right: 50px;">
  <h2 style="margin-top:0;">[%- l('Editors') -%]</h2>
  [% display_editor_stats(top_recently_active_editors, l('Most active editors in the past week'), l('Editor'), l('Open and applied edits in past week')) %]
  [% display_editor_stats(top_editors, l('Top editors overall'), l('Editor'), l('Total applied edits')) %]
</div>

<div style="float:left; display:inline-block; margin-right: 50px;">
  <h2 style="margin-top:0;">[%- l('Voters') -%]</h2>
  [% display_editor_stats(top_recently_active_voters, l('Most active voters in the past week'), l('Voter'), l('Votes in past week')) %]
  [% display_editor_stats(top_voters, l('Top voters overall'), l('Voter'), l('Total votes')) %]
</div>

[%- PROCESS "statistics/macros-footer.tt" -%]
[% END %]
