<commit_before><section>
    {$url = $contact->getPhoto()}
    <header class="big"
        {if="$url"}
            style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%), url('{$contact->getPhoto('xxl')}');"
        {/if}
        >
        <ul class="list thick">
            <li>
                {if="$url"}
                    <span onclick="MovimUtils.reload('{$c->route('contact', $jid)}')"
                    class="primary icon bubble color active
                        {if="$roster && $roster->presence"}status {$roster->presence->presencekey}{/if}
                    ">
                        <img src="{$url}">
                    </span>
                {elseif="!$contact->isFromMuc()"}
                    <span  onclick="MovimUtils.reload('{$c->route('contact', $jid)}')"
                    class="primary icon bubble color {$contact->id|stringToColor} active
                        {if="$roster && $roster->presence"}status {$roster->presence->presencekey}{/if}
                    ">
                        <i class="material-icons">person</i>
                    </span>
                {/if}
                {if="!$contact->isFromMuc()"}
                    <span class="control icon active" onclick="MovimUtils.reload('{$c->route('contact', $contact->id)}')">
                        <i class="material-icons">person</i>
                    </span>
                {/if}
                {if="!$contact->isMe()"}
                    <span class="control icon active divided" onclick="ContactActions_ajaxChat('{$contact->id|echapJS}')">
                        <i class="material-icons">comment</i>
                    </span>
                    {if="$roster && $roster->presences->count() > 0"}
                        {loop="$roster->presences"}
                            {if="$value->capability && $value->capability->isJingleAudio()"}
                                <span title="{$c->__('button.audio_call')}" class="control icon active"
                                    onclick="VisioLink.openVisio('{$value->jid|echapJS}');">
                                    <i class="material-icons">phone</i>
                                </span>
                            {/if}
                            {if="$value->capability && $value->capability->isJingleVideo()"}
                                <span title="{$c->__('button.video_call')}" class="control icon active"
                                    onclick="VisioLink.openVisio('{$value->jid|echapJS}', '', true);">
                                    <i class="material-icons">videocam</i>
                                </span>
                                {break}
                            {/if}
                        {/loop}
                    {/if}
                {/if}
                <div>
                    <p class="line">
                        {$contact->truename}
                        {if="$roster && $roster->group"}
                            <span class="tag color {$roster->group|stringToColor}">{$roster->group}</span>
                        {/if}
                    </p>
                    <p class="line">{$contact->id}</p>
                </div>
            </li>
        </ul>
    </header>

    <ul class="list middle">
        <li>
            <div>
                <p class="normal">
                    {if="$contact->fn != null"}
                        {$contact->fn}
                        {if="$contact->nickname != null"}
                         <span class="second">{$contact->nickname}</span>
                        {/if}
                    {elseif="$contact->nickname != null"}
                        {$contact->nickname}
                    {/if}
                </p>
                <p class="all">
                    {if="$contact->description != null && trim($contact->description) != ''"}
                        {autoescape="off"}
                            {$contact->description|trim|nl2br|addEmojis}
                        {/autoescape}
                        <br />
                    {/if}

                    {if="$roster && $roster->presence && $roster->presence->seen"}
                        <br />
                        <i class="material-icons icon-text">schedule</i>
                        {$c->__('last.title')} {$roster->presence->seen|strtotime|prepareDate:true,true}
                    {/if}

                    {if="$contact->adrlocality != null || $contact->adrcountry != null"}
                        <br />
                        <i class="material-icons icon-text">place</i>
                        {if="$contact->adrlocality != null"}
                            {$contact->adrlocality}
                        {/if}
                        {if="$contact->adrcountry != null"}
                            {$contact->adrcountry}
                        {/if}
                    {/if}

                    {if="strtotime($contact->date) != 0"}
                        <br />
                        <i class="material-icons icon-text">cake</i>
                        <a href="mailto:{$contact->email}">{$contact->date|strtotime|prepareDate:false}</a>
                    {/if}

                    {if="$contact->email"}
                        <br />
                        <i class="material-icons icon-text">email</i>
                        <a href="mailto:{$contact->email}">{$contact->email}</a>
                    {/if}

                    {if="$contact->url != null"}
                        <br />
                        <i class="material-icons icon-text">link</i>
                        {if="filter_var($contact->url, FILTER_VALIDATE_URL)"}
                            <a href="{$contact->url}" target="_blank">{$contact->url}</a>
                        {else}
                            {$contact->url}<commit_msg>Remove a wrong link in the Contact drawer<commit_after><section>
    {$url = $contact->getPhoto()}
    <header class="big"
        {if="$url"}
            style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%), url('{$contact->getPhoto('xxl')}');"
        {/if}
        >
        <ul class="list thick">
            <li>
                {if="$url"}
                    <span onclick="MovimUtils.reload('{$c->route('contact', $jid)}')"
                    class="primary icon bubble color active
                        {if="$roster && $roster->presence"}status {$roster->presence->presencekey}{/if}
                    ">
                        <img src="{$url}">
                    </span>
                {elseif="!$contact->isFromMuc()"}
                    <span  onclick="MovimUtils.reload('{$c->route('contact', $jid)}')"
                    class="primary icon bubble color {$contact->id|stringToColor} active
                        {if="$roster && $roster->presence"}status {$roster->presence->presencekey}{/if}
                    ">
                        <i class="material-icons">person</i>
                    </span>
                {/if}
                {if="!$contact->isFromMuc()"}
                    <span class="control icon active" onclick="MovimUtils.reload('{$c->route('contact', $contact->id)}')">
                        <i class="material-icons">person</i>
                    </span>
                {/if}
                {if="!$contact->isMe()"}
                    <span class="control icon active divided" onclick="ContactActions_ajaxChat('{$contact->id|echapJS}')">
                        <i class="material-icons">comment</i>
                    </span>
                    {if="$roster && $roster->presences->count() > 0"}
                        {loop="$roster->presences"}
                            {if="$value->capability && $value->capability->isJingleAudio()"}
                                <span title="{$c->__('button.audio_call')}" class="control icon active"
                                    onclick="VisioLink.openVisio('{$value->jid|echapJS}');">
                                    <i class="material-icons">phone</i>
                                </span>
                            {/if}
                            {if="$value->capability && $value->capability->isJingleVideo()"}
                                <span title="{$c->__('button.video_call')}" class="control icon active"
                                    onclick="VisioLink.openVisio('{$value->jid|echapJS}', '', true);">
                                    <i class="material-icons">videocam</i>
                                </span>
                                {break}
                            {/if}
                        {/loop}
                    {/if}
                {/if}
                <div>
                    <p class="line">
                        {$contact->truename}
                        {if="$roster && $roster->group"}
                            <span class="tag color {$roster->group|stringToColor}">{$roster->group}</span>
                        {/if}
                    </p>
                    <p class="line">{$contact->id}</p>
                </div>
            </li>
        </ul>
    </header>

    <ul class="list middle">
        <li>
            <div>
                <p class="normal">
                    {if="$contact->fn != null"}
                        {$contact->fn}
                        {if="$contact->nickname != null"}
                         <span class="second">{$contact->nickname}</span>
                        {/if}
                    {elseif="$contact->nickname != null"}
                        {$contact->nickname}
                    {/if}
                </p>
                <p class="all">
                    {if="$contact->description != null && trim($contact->description) != ''"}
                        {autoescape="off"}
                            {$contact->description|trim|nl2br|addEmojis}
                        {/autoescape}
                        <br />
                    {/if}

                    {if="$roster && $roster->presence && $roster->presence->seen"}
                        <br />
                        <i class="material-icons icon-text">schedule</i>
                        {$c->__('last.title')} {$roster->presence->seen|strtotime|prepareDate:true,true}
                    {/if}

                    {if="$contact->adrlocality != null || $contact->adrcountry != null"}
                        <br />
                        <i class="material-icons icon-text">place</i>
                        {if="$contact->adrlocality != null"}
                            {$contact->adrlocality}
                        {/if}
                        {if="$contact->adrcountry != null"}
                            {$contact->adrcountry}
                        {/if}
                    {/if}

                    {if="strtotime($contact->date) != 0"}
                        <br />
                        <i class="material-icons icon-text">cake</i>
                        {$contact->date|strtotime|prepareDate:false}
                    {/if}

                    {if="$contact->email"}
                        <br />
                        <i class="material-icons icon-text">email</i>
                        <a href="mailto:{$contact->email}">{$contact->email}</a>
                    {/if}

                    {if="$contact->url != null"}
                        <br />
                        <i class="material-icons icon-text">link</i>
                        {if="filter_var($contact->url, FILTER_VALIDATE_URL)"}
                            <a href="{$contact->url}" target="_blank">{$contact->url}</a>
                        {else}
                            {$contact->url}
{'fraction_non_alphanumeric': 0.1611058964075433, 'fraction_numerical': 0.002901271439542623, 'mean_word_length': 1.0761736049601418, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 272, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6982489', 'n_tokens_mistral': 3079, 'n_tokens_neox': 2887, 'n_words': 425}