{% 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 %} {% if component == "observatory" %} {% include "./survey_class_entries.html" with title='Observatories' %} {% else %} {% include "./survey_class_entries.html" with title=component|add:'s' %} {% 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 %} {% with attributes=type_attributes|get_key:component %} {% if type_attributes|get_key:component %} {% include "./survey_class_entries.html" with attribute_list=attributes track_access=0 title="types" item_list=types selected_id=selected_type_id track_access=0 is_type=1 %} {% endif %}
{% endwith %} {% comment %}
{% 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 %}
{% endcomment %} {% if component == selected_component and selected_type_id %}
{% endif %}