{% load i18n yksa_ui %}{% comment %} The only sanctioned rendering of state. Two vocabularies -- health (ok, warning, failed, running, skipped, unknown) and progress (not-started, in-progress, complete, forced, skipped, failed) -- one visual treatment. Never describe one object with both. {% include "yksa/ui/_state.html" with state=run.ui_state %} {% include "yksa/ui/_state.html" with state=plan.ui_state label=plan.progress_label %} `label` overrides the default word; `title` sets a tooltip. Colour is never the only signal, so the icon and the word ship with it. The mapping from a domain status to a state name lives next to the model, not here. A conditional chain choosing a colour inside a template is the bug this partial exists to prevent: it is how the same run status ended up green on one page and grey on another. {% endcomment %}{% state state as s %}{% spaceless %} {{ label|default:s.label }} {% endspaceless %}