{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false, inline=false, small=false) %} {%- if not invalid -%} {% set _linkArgs = { pid:pdoc.pid|default(pdoc.docId) } %} {% if tdoc %}{{ set(_linkArgs, 'query', {tid:tdoc.docId}) }}{% endif %} {% if pdoc.domainId !== handler.domainId %}{{ set(_linkArgs, 'domainId', pdoc.domainId) }}{% endif %} {%- endif -%} {%- if pdoc.domainId !== handler.domainId -%} {{ pdoc.domainId }}# {%- endif -%} {%- if pdoc.pid -%} {{ pdoc.pid }} {%- else -%} {{ 'P'+pdoc.docId if pdoc.domainId === handler.domainId else pdoc.docId }} {%- endif -%} {%- if not small -%}. {{ pdoc.title }}{%- endif -%} {%- if not invalid -%} {%- endif -%} {%- if pdoc.hidden and show_invisible_flag -%} ({{ _('Hidden') }}) {%- endif -%} {%- if show_tags -%} {{ render_problem_tags(pdoc, inline=inline) }} {%- endif -%} {% endmacro %} {% macro render_problem_tags(pdoc, show_none_label=false, inline=false) %} {%- if pdoc.tag|length > 0 %} {%- if not inline %}{% endif -%} {%- else %} {%- if show_none_label %} {{ _('(None)') }} {%- endif %} {%- endif %} {% endmacro %}