{% macro render_cfa_infoline(event, cfa, show_icon=true, redirect_first=false, abstracts=[]) %}
    {% set can_submit_abstracts = cfa.is_open or (session.user and cfa.can_submit_abstracts(session.user)) %}
    {% set is_future = not cfa.has_started and not cfa.has_ended and cfa.is_scheduled %}
    <div class="action-box highlight">
        <div class="section">
            {% if show_icon %}
                <span class="icon icon-file-content"></span>
            {% endif %}
            <div class="text">
                {%- if can_submit_abstracts %}
                    <div class="label">
                        {% if cfa.is_open %}
                            {%- trans %}The call for abstracts is open{% endtrans -%}
                        {% else %}
                            {%- trans %}You have been authorized to submit abstracts{% endtrans -%}
                        {% endif %}
                    </div>
                    <div>
                        {%- trans %}You can submit an abstract for reviewing.{% endtrans -%}
                    </div>
                {% elif is_future %}
                    <div class="label">{% trans %}The call for abstracts is not open yet.{% endtrans %}</div>
                {% else %}
                    <div class="label">{% trans %}The call for abstracts is closed.{% endtrans %}</div>
                    {% if cfa.modification_end_dt and not cfa.modification_ended and abstracts %}
                        <div>
                            {%- trans %}You may still modify your abstracts.{% endtrans -%}
                        </div>
                    {% endif %}
                {% endif -%}
            </div>
            {% if can_submit_abstracts %}
                <div class="toolbar">
                    {% if session.user and not redirect_first %}
                        <button class="i-button highlight js-show-abstract-form"
                           data-title="{% trans %}Submit new abstract{% endtrans %}"
                           data-href="{{ url_for('abstracts.submit', event) }}"
                           data-confirm-close-unsaved
                           data-ajax-dialog>
                            {%- trans %}Submit new abstract{% endtrans -%}
                        </button>
                    {% else %}
                        {% set submit_url = url_for('abstracts.call_for_abstracts', event, _anchor='submit-abstract') %}
                        {% set url = submit_url if session.user else url_for_login(submit_url) %}
                        <a class="i-button highlight" href="{{ url }}">
                            {%- trans %}Submit new abstract{% endtrans -%}
                        </a>
                    {% endif %}
                </div>
            {% endif %}
        </div>
    </div>
{% endmacro %}
