diff --git a/web/templates/concepts.html b/web/templates/concepts.html index 58e51414b..fb4a93b00 100644 --- a/web/templates/concepts.html +++ b/web/templates/concepts.html @@ -23,6 +23,17 @@

{{ title }}

the language column{{ languages | length | pluralize }} to correct any information.

+ {% for lang in languages %} + {% if lang.is_incomplete %} + + {% endif %} + {% endfor %} {% for category in categories %} @@ -38,14 +49,6 @@

Concept

{{ lang.name }}'s Implementation

- {% with i=forloop.counter %} - {% if category.is_incomplete|slice:i|last %} - - {% endif %} - {% endwith %}
{% endfor %} diff --git a/web/views.py b/web/views.py index cb8b1c42e..5e013fa34 100644 --- a/web/views.py +++ b/web/views.py @@ -194,7 +194,7 @@ def concepts(request): category_entry = { "key": category_key, "concepts": concepts_list, - "is_incomplete": [False for _ in languages], + "is_incomplete": [False] * len(languages) } for i in range(len(languages)): for concept in concepts_list: @@ -205,6 +205,11 @@ def concepts(request): category_entry["is_incomplete"][i] = True break all_categories.append(category_entry) + + for lang in languages: + booleans = [category["is_incomplete"][languages.index(lang)] for category in all_categories] + lang._is_incomplete = any(booleans) + return render_concepts(request, languages, meta_structure, all_categories) @@ -227,6 +232,7 @@ def render_concepts(request, languages, structure, all_categories): "key": language.key, "version": language.version, "name": language.name, + "is_incomplete": language._is_incomplete, } for language in languages ],