mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
ui-default: init
将ui-default合并至主存储库便于维护
This commit is contained in:
1 parent
6317c9057f
commit
5faa54c7ca
564 files changed
+23083
-14
No files matched your search
@@ -0,0 +1,37 @@
|
||||
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false) %}
|
||||
{%- if not invalid %}
|
||||
<a
|
||||
{%- if tdoc and tdoc.docType == model.document.TYPE_CONTEST %}
|
||||
href="{{ url('contest_detail_problem', tid=tdoc.docId, pid=pdoc.docId) }}"
|
||||
{%- elif tdoc and tdoc.docType == model.document.TYPE_HOMEWORK %}
|
||||
href="{{ url('homework_detail_problem', tid=tdoc.docId, pid=pdoc.docId) }}"
|
||||
{%- else %}
|
||||
href="{{ url('problem_detail', pid=pdoc.pid|default(pdoc.docId)) }}"
|
||||
{%- endif %}
|
||||
>
|
||||
{%- endif %}
|
||||
{{ pdoc.pid if pdoc.pid else 'P'+pdoc.docId }} {{ pdoc.title }}
|
||||
{%- if not invalid %}
|
||||
</a>
|
||||
{%- endif %}
|
||||
{%- if pdoc.hidden and show_invisible_flag %}
|
||||
<span class="text-orange">({{ _('Hidden') }})</span>
|
||||
{%- endif %}
|
||||
{%- if show_tags %}
|
||||
{{ render_problem_tags(pdoc) }}
|
||||
{%- endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_problem_tags(pdoc, show_none_label=false) %}
|
||||
{%- if pdoc.tag|length > 0 %}
|
||||
<ul class="problem__tags">
|
||||
{%- for tag in pdoc['tag'] %}
|
||||
<li class="problem__tag"><a class="problem__tag-link" href="{{ url('problem_category', category=tag) }}">{{ tag }}</a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
{%- else %}
|
||||
{%- if show_none_label %}
|
||||
{{ _('(None)') }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{% endmacro %}
|
||||
Reference in new issue
Block a user