{% load ietf_streams %}
<table class="ietf-ballot ietf-stream">
<tr>
  <td class="left">
    {% if workflow %}
      <ul class="ietf-stream-tag-list">
      {% for tag in tags %}
        <li{% if tag.setted %} class="tag_set"{% endif %}>{{ tag }}</li>
      {% endfor %}
      </ul>
    {% endif %}
  </td>
  <td class="right">
    <div class="ietf-stream-head">
      {% if stream %}
        <h2>
          {{ stream|default:"Without stream" }}{% if stream.with_groups and streamed.group %} :: {{ streamed.group|default:"" }}{% endif %}
        </h2>
        <h3>Current state: {{ state|default:"None" }}</h3>
      {% else %}
        <h2>Without stream</h2>
      {% endif %}
    </div>

    {% if history %}
    <div class="ietf-stream-history">
      {% if show_more %}
        <p> Viewing the last 20 entries. <a href="">Show full log</a>.</p>
      {% endif %}
      {% for entry in history %}
        {% workflow_history_entry entry %}
      {% endfor %}
      {% if show_more %}
        <p> Viewing the last 20 entries. <a href="">Show full log</a>.</p>
      {% endif %}
    </div>
    {% else %}
    <p>
        There is no stream history for this document.
    </p>
    {% endif %}
  </td>
</tr>
</table>
