<h1>Privileges</h1>
<p>Here you can define the reputation required to gain each available privilege. Click on a value to edit it.</p>

<div class="button-list is-gutterless">
  <%= link_to 'Reputation', query_url(sort: 'rep'), class: "button is-outlined is-muted " + (active_search?('threshold') ? "is-active" : "") %>
  <%= link_to 'Name', query_url(sort: 'name'), class: "button is-outlined is-muted " + (active_search?('name') ? "is-active" : "") %>
</div>

<table class="table has-margin-top-4">
  <thead>
    <th>Privilege</th>
    <th>Threshold</th>
  </thead>
  <tbody>
    <% @privileges.each do |priv| %>
      <tr>
        <td><strong><%= priv.name %></strong></td>
        <td class="js-privilege-threshold" data-name="<%= priv.name %>"><%= priv.threshold %></td>
      </tr>
    <% end %>
  </tbody>
</table>