<% if (consumers.length > 0) { %>
    <table class="list">
      <thead>
        <tr>
<% if (mode == 'queue') { %>
          <th>Channel <span class="help" id="consumer-owner"></th>
          <th>Consumer tag</th>
<% } else { %>
          <th>Consumer tag</th>
          <th>Queue</th>
<% } %>
          <th>Ack required</th>
          <th>Exclusive</th>
          <th>Prefetch count</th>
          <th>Active <span class="help" id="consumer-active"></span></th>
          <th>Activity status</th>
          <th>Arguments</th>
        </tr>
      </thead>
<%
  for (var i = 0; i < consumers.length; i++) {
    var consumer = consumers[i];
%>
      <tr<%= alt_rows(i) %>>
<% if (mode == 'queue') { %>
        <td><%= link_consumer_owner(consumer) %></td>
        <td><%= fmt_string(consumer.consumer_tag) %></td>
<% } else { %>
        <td><%= fmt_string(consumer.consumer_tag) %></td>
        <td><%= link_queue(consumer.queue.vhost, consumer.queue.name) %></td>
<% } %>
        <td class="c"><%= fmt_boolean(consumer.ack_required) %></td>
        <td class="c"><%= fmt_boolean(consumer.exclusive) %></td>
        <td class="c"><%= consumer.prefetch_count %></td>
        <td class="c"><%= fmt_boolean(consumer.active) %></td>
        <td class="c"><%= fmt_activity_status(consumer.activity_status) %></td>
        <td class="c"><%= fmt_table_short(consumer.arguments) %></td>
      </tr>
<% } %>
    </table>
<% } else { %>
  <p>... no consumers ...</p>
<% } %>
