discourse/app/assets/javascripts/select-kit/addon/templates/components/email-group-user-chooser-row.hbs
Krzysztof Kotlarek 22249806a8 FEATURE: decorate username in email-group-user-chooser-row
We are allowing plugins to decorate username selector:

1f1aa6a0d8/app/assets/javascripts/discourse/app/lib/plugin-api.js (L1154)

1472e47aae/app/assets/javascripts/discourse/app/templates/user-selector-autocomplete.hbr (L9)

The same decoration can be beneficial for email-group-user-chooser-row. An example use case is to show the icon that a user is on holiday when assigning a user to post/topic.
2022-01-11 09:49:27 +08:00

14 lines
426 B
Handlebars

{{#if item.isUser}}
{{avatar item imageSize="tiny"}}
<span class="identifier">{{format-username item.id}}</span>
<span class="name">{{item.name}}</span>
{{decorate-username-selector item.id}}
{{else if item.isGroup}}
{{d-icon "users"}}
<span class="identifier">{{item.id}}</span>
<span class="name">{{item.full_name}}</span>
{{else}}
{{d-icon "envelope"}}
<span class="identifier">{{item.id}}</span>
{{/if}}