{% extends 'main.html' %}

{% block content %}
<div class="container">
    <div>
        <h3>{{bap_submission.club.name}}</h3>
        <h5>
            Aquarist: &nbsp;<a href="{% url 'aquarist' bap_submission.aquarist.id %}">{{bap_submission.aquarist.first_name}} {{bap_submission.aquarist.last_name}}</a>
            &nbsp;({{bap_submission.aquarist.get_display_name}})
        </h5>
        <h5>Species: &nbsp;<a href="{% url 'speciesInstance' bap_submission.speciesInstance.id %}">{{bap_submission.speciesInstance.name}}</a></h5>
        <small>&nbsp;</small>
    </div>
    <div>
        <h4>BAP Submission:</h4>
        <p><b>Status:</b> &nbsp;&nbsp;{{bap_submission.get_status_display}}</p>
        <p><b>Year:</b>&nbsp;&nbsp;{{bap_submission.year}}</p>

        {% if bap_submission.request_points_review %}
            <p><b>Points:</b> &nbsp;&nbsp;{{bap_submission.points}} <font style="color:#860404;" >&nbsp;&nbsp;Review Requested</font></p>
        {% else %} 
            <p><b>Points:</b> &nbsp;&nbsp;{{bap_submission.points}}</p>
        {% endif %}  
        
        <p><b>Submission:</b> &nbsp;&nbsp;{{bap_submission.created | date:'Y-m-d'}}</p>

        <div style="background-color: rgba(255, 255, 255, 0.3); padding: 1rem; padding-left: 2rem; border-radius: 10px; border: 1px solid black;">
            <p><b>Submission Notes:</b></p>
            </p>{{bap_submission.notes|linebreaks }}</p>
        </div>

        <small>&nbsp;</small>
        {% if bap_submission.breeder_comments %}
            <p><b>Breeder Comments:</b> &nbsp;&nbsp;{{bap_submission.breeder_comments}}</p>
        {% endif %} 

        {% if userCanEdit %}
            {% if bap_submission.admin_comments %}
                <p><b>Admin Comments:</b> &nbsp;&nbsp;{{bap_submission.admin_comments}}</p>
            {% endif %} 
            <p><a class="btn btn-secondary" href="{% url 'editBapSubmission' bap_submission.id  %}" role="button">&nbsp;Edit BAP Submission&nbsp;</a></p>
        {% endif %}
        <p><a class="btn btn-secondary" href="{% url 'bapSubmissions' bap_submission.club.id  %}" role="button">&nbsp;{{bap_submission.club.acronym}} BAP Submissions&nbsp;</a></p>

    </div>
</div>
{% endblock content %}
