{% load custom_filters %}
{% if component == selected_component and selected_id %} {% url 'configuration:update_survey_component' component_type=component component_id=selected_id as update_url %}
{% csrf_token %} {% endif %}
{% for item in item_list %} {% if component == selected_component and item.id == selected_id %} {% else %} {% url 'configuration:survey' selected_component=component selected_id=item.id as select_url %} {% if item.id >= 0 %} {% if item.can_delete %}
Delete
{% else %}
Can't delete has images
{% endif %} {% else %}
Add {{component}}
{% endif %} {% endif %} {% endfor %}
{% if component == "observatory" %} {% include "./survey_class_entries.html" with title='Observatories' %} {% else %} {% include "./survey_class_entries.html" with title=component|add:'s' %} {% endif %} {% if track_access %}
{% if component == "observatory" %} Observatories {% else %} {{ component }}s {% endif %}
{% for item in item_list %} {% if item.id >= 0 %} {% if item.access %} {% url 'configuration:change_access' new_access=0 selected_component=selected_component selected_id=selected_id target_component=component target_id=item.id as access_url %} {% else %} {% url 'configuration:change_access' new_access=1 selected_component=selected_component selected_id=selected_id target_component=component target_id=item.id as access_url %} {% endif %}
{% if component == 'observer' %} {% if not item.access %} no {% endif %} {{selected_component}} access {% else %} observer has {% if not item.access %} no {% endif %} access {% endif %}
{% endif %} {% endfor %}
{% endif %}
{% if component == selected_component and selected_id %}
{% endif %} {% if component == selected_component and selected_type_id %} {% url 'configuration:update_survey_component_type' component_type=component type_id=selected_type_id as update_url %}
{% csrf_token %} {% endif %}
{% if type_attributes|get_key:component %}
{% for type_entry in types %} {% if component == selected_component and type_entry.id == selected_type_id %} {% else %} {% url 'configuration:survey' selected_component=component selected_type_id=type_entry.id as select_url %} {% if type_entry.can_delete %}
Delete
{% else %} {% if type_entry.id < 0 %}
New Type
{% else %}
Can't delete has {{component}}s
{% endif %}
{% endif %} {% endif %} {% endfor %} {% endif %}
{% if type_attributes|get_key:component %}
{% include "./survey_class_entries.html" with attribute_list=type_attributes|get_key:component track_access=0 title="types" item_list=types selected_id=selected_type_id track_access=0 is_type=1 %}
{% endif %}
{% if component == selected_component and selected_type_id %}
{% endif %}