xmpp.chapril.org-conversejs/src/templates/occupant.html
JC Brand 8a4aa4efdd Use a named variable for _.template
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.
2017-11-05 18:59:29 +01:00

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>