{% macro style() %} {% endmacro %} {% macro hidden_fields(scope, disable_sol, cid, csid, ssid) %} {% if cid %}{% endif %} {% if csid %}{% endif %} {% if ssid %}{% endif %} {% endmacro %} {% macro button(scope, doc, stat, openLabel, closeLabel, cid, csid, ssid) %} {% set state = stat.state if stat and stat.state else '' %} {% set closed = (state == 'closed') or (state == '' and doc and doc.disable_sol) %}
{{ hidden_fields(scope, 'false' if closed else 'true', cid, csid, ssid) }}
{% endmacro %} {% macro menu_item(scope, doc, stat, openLabel, closeLabel, cid, csid, ssid) %} {% set state = stat.state if stat and stat.state else '' %} {% set closed = (state == 'closed') or (state == '' and doc and doc.disable_sol) %} {% endmacro %} {% macro panel(scope, doc, stat, label, openLabel, closeLabel, cid, csid, ssid) %} {% set state = stat.state if stat and stat.state else '' %} {% set closed = (state == 'closed') or (state == '' and doc and doc.disable_sol) %}
{{ label }} {{ '当前关闭' if closed else '当前开放' }}
{{ hidden_fields(scope, 'false' if closed else 'true', cid, csid, ssid) }}
{% endmacro %}