<%namespace name="util" module="bodhi.server.util"/>
<%namespace name="fragments" file="fragments.html"/>

<%def name="updates(updates, display_user=True, display_request=True, display_release=True, display_karma=True)">
  <table class="table m-b-0 p-a-1">
    <thead><tr>
        <th>Update</th>
        <th class="nowrap">Age</th>
        %if display_user:
        <th class="nowrap">Submitter</th>
        %endif
        %if display_release:
        <th class="hidejs">Release</th>
        %endif
        %if display_karma:
        <th class="hidejs">Karma</th>
        %endif
        %if display_request:
        <th class="hidejs">Request</th>
        %endif
        <th class="hidejs">Status</th>
    </tr></thead>
    <tbody>
    % for update in updates:
    <tr>
      ${fragments.update(update, display_user, display_request, display_release, display_karma)}
    </tr>
    % endfor
    </tbody>
  </table>
</%def>

<%def name="overrides(overrides, display_user=True)">
  <table class="table">
    <thead><tr>
        <th>Override</th>
        <th class="nowrap">Age</th>
        %if display_user:
        <th class="nowrap">Submitter</th>
        %endif
        <th class="hidejs">Status</th>
    </tr></thead>
    <tbody>
    % for override in overrides:
    <tr>
      ${fragments.override(override, display_user)}
    </tr>
    % endfor
    </tbody>
  </table>
</%def>
