{% from 'allura:templates/jinja_master/lib.html' import email_gravatar, abbr_date with context %}
<div>
  {% if show_paging %}
    <div class="grid-19" style="clear:both">
      {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}}
    </div>
  {% endif %}
  <table>
    <thead>
      <tr>
        <th style="text-align:left">Commit</th>
        <th style="text-align:left">Date</th>
        <th>&nbsp;</th>
      </tr>
    </thead>
    <tbody>
      {% for commit in value %}
        <tr>
          <td>
            {{commit.summary}}
            <br/>
            {% if commit.committed.email != commit.authored.email %}
              {% if commit.committer_url %}
                <a href="{{commit.committer_url}}">{{email_gravatar(commit.committed.email, title=commit.committed.name, size=16)}}
                {{commit.committed.name}}</a>
                pushed
              {% else %}
                {{email_gravatar(commit.committed.email, title=commit.committed.name, size=16)}} {{commit.committed.name}}
                pushed
              {% endif %}
            {% endif %}
             <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
            by
              {{email_gravatar(commit.authored.email, title=commit.authored.name, size=16)}} {{commit.authored.name}}
          </td>
          <td>
            {% if commit.committed.date %}{{abbr_date(commit.committed.date)}}{% endif %}
          </td>
          <td style="text-align: right">
            <a href="{{commit.url()}}tree/">Tree</a>
          </td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
  {% if show_paging %}
    <div class="grid-19" style="clear:both">
      {{widget.fields['page_list'].display(limit=limit, page=page, count=count)}}
      {{widget.fields['page_size'].display(limit=limit)}}
    </div>
  {% endif %}
</div>
