{% extends "base.html" %} {% block title %}Search KT{% endblock %} {% block content %}

Search KT

{% for n in names %} {% if searched %}Show all colleges{% endif %}
{% if not searched %} {# default view: table of colleges #}

List of Colleges

{{ colleges|length }} total
{% for c in colleges %} {% else %} {% endfor %}
S.NoCollege NameNo. of KTAdded ByAction
{{ loop.index }} {{ c.name }} {{ c.kt_count }} {{ c.added_by or '-' }} View KT
No colleges added yet.
{% else %} {# result view: one table of KT per college #} {% for c in colleges %}

{{ c.name }}

{% if user.role in ('admin', 'lead') %}+ Add KT{% endif %}
{% if user.role in ('admin', 'lead') %}{% endif %} {% for k in kts.get(c.id, []) %} {% if user.role in ('admin', 'lead') %} {% endif %} {% else %} {% endfor %}
S.NoKT TitleKT DescriptionFacultyAdded ByAction
{{ loop.index }} {{ k.title or '-' }} {% if k.kind in ('multiple_choice', 'checkboxes') and k.choices %}
    {% for o, on in k.choices %}
  • {% if k.kind == 'multiple_choice' %}{{ '◉'|safe if on else '○'|safe }}{% else %}{{ '☑'|safe if on else '☐'|safe }}{% endif %} {{ o }}
  • {% endfor %}
{% elif k.kind == 'dropdown' and k.choices %} {{ k.text }}
▾ Options: {{ k.choices|map(attribute=0)|join(', ') }}
{% else %} {{ k.text }} {% endif %}
{{ k.kind_label }}
{% if k.f_first %}{{ k.f_title }} {{ k.f_first }} {{ k.f_last }}{% else %}-{% endif %} {{ k.added_by or '-' }} Edit
No KT added yet.
{% else %}

No matching college found.

{% endfor %} {% endif %} {% endblock %}