{% from 'macros.html' import content_card with context %}
{% set tg_session_id = project.main_config.get_tg_session_id(instance) %} {% set current_tg_project_id = project.main_config.get_tg_project_id(instance) %} {% set tgproject_handler = project.get_tgp(instance) %} {% set is_valid_session = tgproject_handler.check_session() %} {% set action = 'upload' %}
{% if instance == 'test' %}
Test Environment — Your uploads here are for testing and verification purposes.
{% else %}
Production Environment — Uploads here will be publicly visible. Please verify all data before proceeding.
{% endif %}
{% include 'includes/get_sessionid.html' %}
{% if error %}
{{ error }}
{% endif %} {% include 'includes/set_sessionid.html' %}
{% if is_valid_session %}
{% include 'includes/tg_project_info.html' %} {% if not current_tg_project_id %}
No TextGrid Project Selected

Please select or create a TextGrid project to upload your collections.

{% else %}
Upload Collections
Select collections to upload to TextGrid
{# all_tgp_contents is passed from the route (pre-computed, flask.g-cached) #} {% set project_validation = project.get_validation_results(refresh=False) %} {% for collection_validation in project_validation["subprojects"] %} {{ content_card(title=collection_validation.title, modal_url=url_for('network.upload_collection_manage', collection=collection_validation.title, instance=instance, projectname=project.path), status_url=url_for('network.upload_collection_status', collection=collection_validation.title, instance=instance, projectname=project.path), action='upload', kind='collection', collection=collection_validation) }} {% endfor %} {{ content_card(title='OTHER FILES', modal_url=url_for('network.upload_other_files_manage', projectname=project.path, instance=instance, other_file_type='other_files'), status_url=url_for('network.upload_other_files_status', projectname=project.path, instance=instance, other_file_type='other_files'), action='upload', kind='other_files', content_list=project.project_config.other_files.get_all_other_files()) }} {{ content_card(title='PORTALCONFIG', modal_url=url_for('network.upload_other_files_manage', projectname=project.path, instance=instance, other_file_type='portalconfig'), status_url=url_for('network.upload_other_files_status', projectname=project.path, instance=instance, other_file_type='portalconfig'), action='upload', kind='other_files', content_list=[project.project_config.other_files.portalconfig]) }} {{ content_card(title='README', modal_url=url_for('network.upload_other_files_manage', projectname=project.path, instance=instance, other_file_type='readme'), status_url=url_for('network.upload_other_files_status', projectname=project.path, instance=instance, other_file_type='readme'), action='upload', kind='other_files', content_list=[project.project_config.other_files.readme]) }} {% endif %}
{% endif %}