mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 17:35:16 +08:00
22249806a8
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.
14 lines
426 B
Handlebars
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}}
|