8a4aa4efdd
This removes the need for `switch (obj)` in the template which is not allowed in strict mode. Additionally using a named variable speeds up rendering.
14 lines
689 B
HTML
14 lines
689 B
HTML
<li class="{{{ o.role }}} occupant" id="{{{ o.id }}}"
|
|
{[ if (o.role === "moderator") { ]}
|
|
title="{{{ o.jid }}} {{{ o.desc_moderator }}} {{{ o.hint_occupant }}}"
|
|
{[ } ]}
|
|
{[ if (o.role === "occupant") { ]}
|
|
title="{{{ o.jid }}} {{{ o.desc_occupant }}} {{{ o.hint_occupant }}}"
|
|
{[ } ]}
|
|
{[ if (o.role === "visitor") { ]}
|
|
title="{{{ o.jid }}} {{{ o.desc_visitor }}} {{{ o.hint_occupant }}}"
|
|
{[ } ]}
|
|
{[ if (!_.includes(["visitor", "occupant", "moderator"], o.role)) { ]}
|
|
title="{{{ o.jid }}} {{{ o.hint_occupant }}}"
|
|
{[ } ]}><div class="occupant-status occupant-{{{o.show}}} circle" title="{{{o.hint_show}}}"></div>{{{o.nick}}}</li>
|