{% from 'message_box.html' import message_box %} {% from 'attachments/_management_info_column.html' import render_attachment_info %} {% from 'events/management/_affiliation.html' import render_affiliation %} {% from 'events/management/_lists.html' import render_num_reviews_tooltip %} {% macro _get_track_full_title(track, searchable=false) -%} {% if track.code -%} {{ track.code }} {% if not searchable %}- {% endif %} {%- endif -%} {{ track.title }} {%- endmacro %} {% macro _get_track_titles(tracks, searchable=false) -%} {% for track in tracks -%} {{ _get_track_full_title(track, searchable=searchable) }} {%- if not loop.last -%} {% if searchable %} {% else %}, {% endif %} {%- endif %} {%- endfor %} {%- endmacro %} {% macro _render_multi_track_column(tracks) -%} {%- for track in tracks | sort(attribute='title') -%}
{{ track.short_title }}
{%- endfor %} {%- if not tracks %} {%- trans %}No track{% endtrans %} {%- endif -%} {%- endmacro %} {% macro _render_abstract_state(abstract) %} {% set abstract_css_class = abstract.reviewing_state.css_class if abstract.can_convene(session.user) else abstract.public_state.css_class %}
{% if abstract.public_state.name == 'under_review' and abstract.can_judge(session.user) %} {% trans count=abstract.reviews|length -%} {{- count }} review {%- pluralize -%} {{- count }} reviews {%- endtrans %} ( {%- trans count=abstract.reviewed_for_tracks|length -%} {{- count }} track {%- pluralize -%} {{- count }} tracks {%- endtrans -%} ) {% else %} {{- abstract.public_state.title -}} {% endif %}
{% endmacro %} {% macro _render_proposed_contrib_types(review_list) %} {%- for type, reviews in review_list|selectattr('proposed_contribution_type')|groupby('proposed_contribution_type.name') %} {{- reviews|selectattr('proposed_contribution_type.name', 'equalto', type)|list|length }} {{ type -}} {{- ", " if not loop.last -}} {% endfor -%} {% endmacro %} {% macro render_abstract_list(abstracts, dynamic_columns, static_columns, total_abstracts, context_track=none, reviewed_abstracts=none, can_create_invited_abstracts=false) %} {% if abstracts %}
{% set num_filtered_abstracts = abstracts | length %} {% if num_filtered_abstracts != total_abstracts %}
{%- trans -%} Filtering is enabled. Displaying {{ num_filtered_abstracts }} out of {{ total_abstracts }} abstracts. {%- endtrans -%}
{% endif %}
{% for item in static_columns if item.id != 'description' %} {% endfor %} {% for item in dynamic_columns %} {% endfor %} {% if reviewed_abstracts is not none %} {% endif %} {% for abstract in abstracts %} {% if (context_track is not none and abstract.state.name == 'accepted' and abstract.accepted_track != context_track) %} {% set accepted_other = true %} {% set accepted_other_msg -%} {% if abstract.accepted_track %} {%- trans other_track=abstract.accepted_track.full_title -%} This abstract has already been accepted for the track "{{ other_track }}" {%- endtrans -%} {% else %} {%- trans -%} This abstract has already been accepted {%- endtrans -%} {% endif %} {%- endset %} {% else %} {% set accepted_other = false %} {% set accepted_other_msg = '' %} {% endif %} {% for item in static_columns %} {% if item.id == 'state' %} {% set acceptances = abstract.reviews|selectattr('proposed_action.name', 'equalto', 'accept')|list|length %} {% set sort_text = '{}-{}-{}'.format('1' if abstract.is_in_final_state else '0', abstract.state.name, acceptances) %} {% elif item.id == 'submitter' %} {% elif item.id == 'authors' %} {% elif item.id == 'submitted_contrib_type' %} {% set contrib_type = abstract.submitted_contrib_type.name if abstract.submitted_contrib_type else '' %} {% elif item.id == 'accepted_contrib_type' %} {% set contrib_type = abstract.accepted_contrib_type.name if abstract.accepted_contrib_type else '' %} {% elif item.id == 'submitted_for_tracks' %} {{ _render_multi_track_column(abstract.submitted_for_tracks) }} {% elif item.id == 'reviewed_for_tracks' %} {{ _render_multi_track_column(abstract.reviewed_for_tracks) }} {% elif item.id == 'accepted_track' %} {% set track = abstract.accepted_track %} {% if track %} {% set track_text = track.short_title %} {% set track_full = _get_track_full_title(track) %} {% set track_searchable = _get_track_full_title(track, searchable=true) | lower %} {% else %} {% set track_text = '' %} {% set track_full = '' %} {% set track_searchable = '' %} {% endif %} {% elif item.id == 'score' %} {% elif item.id == 'submitted_dt' %} {% elif item.id == 'modified_dt' %} {% endif %} {% endfor %} {% set data = abstract.data_by_field %} {% for item in dynamic_columns %} {% set friendly_data = data[item.id].friendly_data if item.id in data else '' %} {% endfor %} {% if reviewed_abstracts is not none %} {% set is_reviewed = abstract in reviewed_abstracts %} {% endif %} {% for item in static_columns if item.id == 'description' %} {% endfor %} {% endfor %}
{% trans %}ID{% endtrans %} {% trans %}Title{% endtrans %}{{ item.caption }}{{ item.title }} {%- trans %}Reviewed{% endtrans -%}
{{- abstract.friendly_id -}} {{- abstract.title -}} {{ _render_abstract_state(abstract) }} {% if context_track is not none and abstract.state.name == 'accepted' and abstract.accepted_track != context_track %} {% endif %} {{- abstract.submitter.display_full_name }} {% if abstract.submitter.affiliation %} ({{ render_affiliation(abstract.submitter) }}) {% endif %} {% for author in abstract.primary_authors | sort(attribute='display_order_key_lastname') -%}
{{- author.display_full_name }} {% if author.affiliation %} ({{ render_affiliation(author) }}) {% endif %}
{%- endfor %}
{%- if contrib_type %} {{- contrib_type }} {%- else %} {%- trans %}n/a{% endtrans %} {%- endif -%} {%- if contrib_type %} {{- contrib_type }} {%- else %} {%- trans %}n/a{% endtrans %} {%- endif -%} {%- if track %} {{- track_text }} {%- else %} {%- trans %}No track{% endtrans %} {%- endif -%} {{- abstract.score | round(1) if abstract.score is not none else '-' }} {{- abstract.submitted_dt | format_datetime('short', timezone=abstract.event.timezone) -}} {{ abstract.modified_dt | format_datetime('short', timezone=abstract.event.timezone) if abstract.modified_dt else '-' }} {{- friendly_data if friendly_data else '-' -}} {% if is_reviewed %} {% endif %}
{% if abstract.state.name == 'accepted' and abstract.contribution %} {% endif %}
{{ abstract.description }}
{%- else %} {%- call message_box('info') %} {%- if total_abstracts %} {%- trans -%} The filtering criteria do not match with any of the existing abstracts. Try to clear the filters. {%- endtrans %} {%- else %} {%- trans %}There are no abstracts yet.{% endtrans %} {%- endif %} {%- endcall %} {%- endif %} {% endmacro %}