Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

2.5 KB
Raw Blame
{{#each profile_fields}}
    <li data-type="{{this.type}}" class="field-section custom_user_field" data-field-id="{{this.id}}">
        {{#unless ../for_user_card_popover}}
            <div class="name">{{this.name}}</div>
        {{/unless}}
        {{#if this.is_link}}
            <div class="custom-user-url-field">
                <a tabindex="0" href="{{this.value}}" target="_blank" rel="noopener noreferrer" class="value custom-profile-fields-link {{#if ../for_user_card_popover}}tippy-zulip-tooltip{{/if}}" data-tippy-content="{{this.name}}">{{this.value}}</a>
                <span tabindex="0" class="copy-button copy-custom-field-url tippy-zulip-tooltip" aria-label="{{t 'Copy URL' }}" data-tippy-content="{{t 'Copy URL' }}">
                    <i class="zulip-icon zulip-icon-copy" aria-hidden="true"></i>
                </span>
            </div>
        {{else if this.is_external_account}}
            {{#if this.link}}
                <a tabindex="0" href="{{this.link}}" target="_blank" rel="noopener noreferrer" class="value custom-profile-fields-link external-account-link-field {{#if ../for_user_card_popover}}tippy-zulip-tooltip{{/if}}" data-tippy-content="{{this.name}}">
                    {{> default_external_account_icon subtype=this.subtype}}
                    {{this.value}}
                </a>
            {{else}}
                <div class="external-account-text-field">
                    {{> default_external_account_icon subtype=this.subtype}}
                    {{this.value}}
                    <span tabindex="0" class="copy-button copy-external-account-field tippy-zulip-tooltip" aria-label="{{t 'Copy value' }}" data-tippy-content="{{t 'Copy value' }}" data-clipboard-text="{{this.value}}">
                        <i class="zulip-icon zulip-icon-copy" aria-hidden="true"></i>
                    </span>
                </div>
            {{/if}}
        {{else if this.is_user_field}}
            <div class="user-type-custom-field-pill-container" data-field-id="{{this.id}}"></div>
        {{else}}
            {{#if this.rendered_value}}
            <span class="value rendered_markdown {{#if ../for_user_card_popover}}tippy-zulip-tooltip{{/if}}" data-tippy-content="{{this.name}}">{{rendered_markdown this.rendered_value}}</span>
            {{else}}
            <span class="value {{#if ../for_user_card_popover}}tippy-zulip-tooltip{{/if}}" data-tippy-content="{{this.name}}">{{this.value}}</span>
            {{/if}}
        {{/if}}
    </li>
{{/each}}