{% from 'partials/make-feed-button.html' import make_feed_button %}

<table class="table">
    <thead>
    <tr>
      <th>Feed</th>
      <th>Name</th>
      <th>Recent paper count</th>
      <th>Publisher</th>
    </tr>
    </thead>
    <tbody>
    {% for journal in journals %}
    <tr>
        <td>
            {% if journal.feed %}
                {% with feed_type="journals", feed_id=journal.issn[0].value %}
                {% include 'partials/rss-button.html' %}
                {% endwith %}
            {% else %}
                {{ make_feed_button("journals", journal.issn[0].value) }}
            {% endif %}
        </td>
        <td><a href="/journals/{{ journal.issn[0].value }}">{{ journal.title }}</a></td>
        <td>{{ journal.recent_paper_count }}</td>
        <td>
            {{ journal.publisher }}
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
