mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
12 lines
624 B
HTML
12 lines
624 B
HTML
{% import "components/user.html" as user with context %}
|
|
{% macro render_time(tdoc_time) %}
|
|
{{ datetimeSpan(tdoc_time, false, 'YYYY-M-D H:mm')|safe }}
|
|
{% endmacro %}
|
|
|
|
{% macro render_duration(tdoc) %}
|
|
{{ tdoc.duration|round(1) if tdoc.duration else ((tdoc.endAt.getTime() - tdoc.beginAt.getTime()) /1000 / 3600)|round(1) }}
|
|
{% endmacro %}
|
|
|
|
{% macro render_clarification_subject(tdoc, pdict, subject) %}
|
|
{% if subject == 0 %}{{ _('General Issue') }}{% elif subject == -1 %}{{ _('Technical Issue') }}{% else %}{{ String.fromCharCode(65 + tdoc.pids.indexOf(subject)) + 1 }}. {{ pdict[subject].title }}{% endif %}
|
|
{% endmacro %} |