{% extends 'base.html' %}

{% block title %} <title>Tagged | BrandX</title>  {% endblock title %}

{% block content %}
    <main class="container">
        <center>
            <h1>
                {% if model_type %}<mark>{{model_type.name}}</mark>{% endif %}
                tagged <mark>{{tag_slug}}</mark>
            </h1>
            {% if not user.is_authenticated %}
                <p>Login to see saved objects you've tagged.</p>
            {% endif %}
        </center>
        {% for obj in user_tagged_objs %}
            {% if forloop.first %}
                <div class="row text-muted">
                    <div class="col">Object bookmarked</div>
                    <div class="col">Type of Object</div>
                </div>
            {% endif %}
            <div class="row">
                <div class="col">
                    <span>{{obj.content_object}}</span>
                    {% if user.is_authenticated %}
                        {{obj.content_object.modal}}
                    {% endif %}
                </div>
                <div class="col">
                    <span>{{obj.content_type.name}}</span>
                </div>
            </div>
        {% endfor %}
    </main>
{% endblock content %}
