{% load i18n %}

<div class="course-widgets">
    {% if can_edit %}
        {% url 'publisher:publisher_course_runs_edit' pk=object.id as edit_page_url %}
        <a href="{% if add_warning_popup %}#{% else %}{{ edit_page_url }}{% endif %}" class="btn btn-neutral btn-courserun-edit">
            {% trans "EDIT" %}
        </a>
        <div class="clearfix"></div>
    {% endif %}
    <div class="approval-widget {% if not publisher_approval_widget_feature %}hidden{% endif %}">
        {% include 'publisher/_approval_widget.html' %}

        <div id="decline-comment" class="hidden clearfix">
            {% trans 'Reason for declining preview' as decline_reason %}
            {% trans 'Submit' as submit %}
            {% include 'publisher/comments/add_auth_comments.html' with comment_type='decline_preview' box_label=decline_reason btn_label=submit %}
        </div>
        {% include 'publisher/course_run_detail/_preview_accept_popup.html' %}

        {% if add_warning_popup %}
            {% include 'publisher/course_run_detail/_edit_warning.html' %}
        {% endif %}
    </div>
</div>
