{% from 'macros.html' import content_card with context %}
{% set tg_session_id = project.main_config.get_tg_session_id(instance) %} {% set tgproject_handler = project.get_tgp(instance) %} {% set is_valid_session = tgproject_handler.check_session() %} {% set current_tg_project_id = project.main_config.get_tg_project_id(instance) %} {% set action = 'publish' %}
{% if instance == 'test' %}
Test Environment — Publishing here makes your project visible on the test repository.
{% else %}
Production Environment — Publishing here makes your project publicly available. This action cannot be undone.
{% 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 publish your collections.

{% else %}
Publish Project
Make your uploaded collections publicly available
{# 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.publish_collection_manage', collection=collection_validation.title, instance=instance, projectname=project.path), status_url=url_for('network.publish_collection_status', collection=collection_validation.title, instance=instance, projectname=project.path), action='publish', kind='collection', collection=collection_validation) }} {% endfor %} {{ content_card(title='OTHER FILES', modal_url=url_for('network.publish_other_files_manage', instance=instance, projectname=project.path, other_file_type='other_files'), status_url=url_for('network.publish_other_files_status', instance=instance, projectname=project.path, other_file_type='other_files'), action='publish', kind='other_files', content_list=project.project_config.other_files.get_all_other_files()) }} {{ content_card(title='PORTALCONFIG', modal_url=url_for('network.publish_other_files_manage', instance=instance, projectname=project.path, other_file_type='portalconfig'), status_url=url_for('network.publish_other_files_status', instance=instance, projectname=project.path, other_file_type='portalconfig'), action='publish', kind='other_files', content_list=[project.project_config.other_files.portalconfig]) }} {{ content_card(title='README', modal_url=url_for('network.publish_other_files_manage', instance=instance, projectname=project.path, other_file_type='readme'), status_url=url_for('network.publish_other_files_status', instance=instance, projectname=project.path, other_file_type='readme'), action='publish', kind='other_files', content_list=[project.project_config.other_files.readme]) }} {% endif %}
{% endif %}