{% load tom_common_extras %}
<div class="card">
    <div class="card-header">
      Recent Photometry
    </div>
    <table class="table">
        <thead>
            <tr><th>Timestamp</th>
                <th>Magnitude</th>
            </tr>
        </thead>
        <tbody>
        {% for datum in data %}
        <tr>
            <td>{{ datum.timestamp }}</td>
            <td>
                <!-- prepend greater-than sign if this is a magnitude limit -->
                {% if datum.limit %}>{% endif %}
                {{ datum.magnitude|truncate_value_for_display:8 }}
            </td>
        </tr>
        {% empty %}
        <tr>
            <td colspan="2">No recent photometry.</td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
</div>