      <div class="col">
        <div class="card shadow-sm">
          <div class="card-body">
            <p class="card-text"><strong>{{ d }}</strong></p>
            <table class="table table-striped">
              <thead>
                <tr>
                  <th colspan="2" scope="row">Type</th>
                </tr>
              </thead>
              <tbody class="table-group-divider">
                <tr>
                  <th class="w-33" scope="row">Type</th>
                  <td>{{ d.type }}</td>
                </tr>
                <tr>
                  <th class="w-33" scope="row">Category</th>
                  <td>{{ d.category | title}}</td>
                </tr>
              </tbody>
            </table>
            <div class="d-grid gap-2 mb-1 d-md-block">
              {% with items=d.num_items %}
              <a class="btn btn-sm btn-outline-primary{% if items == 0 %} disabled{% endif %}" href="{% url 'filtered' _filter="type" search=d.slug %}">Show {{ items }} item{{ items | pluralize}}</a>
              {% if request.user.is_staff %}<a class="btn btn-sm btn-outline-danger" href="{% url 'admin:metadata_rollingstocktype_change' d.pk %}">Edit</a>{% endif %}
              {% endwith %}
            </div>
          </div>
        </div>
      </div>

