{{#*inline "object_details"}}
<tbody{{#if this.removed}} data-removed="true"{{/if}}{{#if this.pinned}} data-pinned="true"{{/if}}>
    <tr>
        <td data-id="avatar">
            <img src="{{#is this.type "user"}}{{this.object.avatar_url}}{{else}}/res/{{this.type}}_avatar.svg{{/is}}" width="36" height="36">
        </td>
        <td data-id="name">
            {{#is this.type "user"}}
            <div data-id="name" data-role="hover_tip_container">
                {{dash_empty (object_name this.object)}}
                {{#unless this.bot}}{{> contacts_tip this}}{{/unless}}
            </div>
            {{else}}
            <div data-id="name">
                {{#if this.pinned}}
                {{dash_empty (object_name this.object)}}
                {{else}}
                <a href="{{this.url}}">{{dash_empty (object_name this.object)}}</a>
                {{/if}}
            </div>
            {{/is}}
            <div data-id="extended_description">
                {{~#if this.removed}}<span class="badge" data-id="removed">{{i18n "user_details.status.removed"}}</span>{{/if}}
                {{~#is this.is_enabled false}}<span class="badge" data-id="blocked">{{i18n "user_details.status.blocked"}}</span>{{/is}}
                {{#unless (empty this.object.members_count)}}<span data-id="contents" title="{{object_contents this.object}}">{{formatted_number this.object.members_count}}</span>{{/unless}}
                {{#unless (is this.visibility "normal")}}<span data-id="hidden" title="{{i18n "user_details.tip." this.visibility}}">{{i18n "user_details.status.hidden"}}</span>{{/unless}}
                <span data-id="description" title="{{i18n "user_details.tip.description." this.type}}">{{object_description this.object}}</span>
            </div>
        </td>
        <td data-id="email_name">
            <div data-id="email_name">{{dash_empty (fallback this.object.nickname this.object.label)}}</div>
            <div data-id="aliases">{{object_aliases this.object}}</div>
        </td>
        <td data-id="object_id">
            <div data-id="object_id">{{dash_empty (ternary (is this.type "user") this.object.id this.object.uid)}}</div>
            <div data-id="object_type">{{dash_empty (join " / " (unique this.type this.object.type (ternary this.object.external "external" "") this.object.role this.object.user_type))}}</div>
        </td>
        <td data-id="extra">
            {{#is this.type "user"}}
            <div data-id="extra">{{join ", " this.object.birth_date (i18n "user_details.gender." this.object.gender) this.object.language}}</div>
            {{#unless this.bot}}<div data-id="age">{{age this.object.birth_date}}</div>{{/unless}}
            {{else}}
            <div data-id="creation_date" data-date="{{this.object.created}}" title="{{i18n "user_details.prop.creation_date"}}">
                {{{html_date this.object.created}}}
            </div>
            {{/is}}
        </td>
        <td data-id="karma">
            {{this.object.karma}}
        </td>
    </tr>
</tbody>
{{/inline}}
{{#if (or this.list.length this.container)}}
<table class="ordinary full-width object-list" width="100%"{{#if this.container}} data-subcontainer="true"{{/if}}>
<thead>
    <tr>
        <td data-id="navigation">
            {{#is this.container.type "department"}}
            <a href="/organizations/{{org.id}}{{#if this.container.object.parent_id}}/departments/{{this.container.object.parent_id}}{{else}}/staff{{/if}}" class="parent">&uarr;</a>
            {{/is}}
            {{#is this.container.type "group"}}
            <a href="/organizations/{{org.id}}/staff" class="parent">&uarr;</a>
            {{/is}}
        </td>
        <td></td>
        <td data-order="desc">{{i18n "user_details.prop.email_name_and_aliases"}}</td>
        <td>{{i18n "user_details.prop.uid_and_object_type"}}</td>
        <td></td>
        <td>{{i18n "user_details.prop.karma"}}</td>
    </tr>
</thead>
{{#if this.container}}
{{> object_details this.container pinned=true}}
{{/if}}
{{#each this.list}}
{{> object_details this}}
{{/each}}
</table>
{{/if}}
{{#unless this.list.length}}
<div class="blank-list">{{i18n "staff.no_objects"}}</div>
{{/unless}}
