1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/app/widgets/Contact/_contact.tpl

412 lines
14 KiB
Smarty
Raw Normal View History

{if="$contact != null"}
{$url = $contact->getPhoto('s')}
2015-12-21 22:59:03 +01:00
<header class="big"
{if="$url"}
style="background-image: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%), url('{$contact->getPhoto('xxl')}');"
{else}
style="background-color: rgba(62,81,181,1);"
{/if}
>
<ul class="list middle">
<li>
<span class="primary icon active" onclick="MovimTpl.hidePanel(); Contact_ajaxClear({$page});">
<i class="zmdi zmdi-arrow-back"></i>
</span>
{if="$contactr != null"}
<span class="control icon active" onclick="{$edit}">
<i class="zmdi zmdi-edit"></i>
</span>
<span class="control icon active" onclick="{$delete}">
<i class="zmdi zmdi-delete"></i>
</span>
<p class="line">{$contactr->getTrueName()}</p>
{else}
<span class="control icon active" onclick="Roster_ajaxDisplaySearch('{$contact->jid}')">
<i class="zmdi zmdi-account-add"></i>
</span>
{if="$contact != null"}
<p class="line">{$contact->getTrueName()}</p>
{else}
2015-12-21 22:59:03 +01:00
<p class="line">{$jid}</p>
{/if}
2015-12-21 22:59:03 +01:00
{/if}
</li>
</ul>
2016-01-06 09:18:43 +01:00
<ul class="list thick flex">
<li class="block">
2015-12-21 22:59:03 +01:00
{if="$url"}
<span class="primary icon bubble color {if="isset($presence)"}status {$presence}{/if}">
<img src="{$url}">
</span>
{else}
<span class="primary icon bubble color {$contact->jid|stringToColor} {if="isset($presence)"}status {$presence}{/if}">
<i class="zmdi zmdi-account"></i>
</span>
{/if}
<p class="line">{$contact->getTrueName()}</p>
<p class="line">{$contact->jid}</p>
</li>
{if="$caps"}
2016-01-06 09:18:43 +01:00
<li class="block">
<span class="primary icon">
2015-12-21 22:59:03 +01:00
<i class="zmdi
{if="$caps->type == 'handheld' || $caps->type == 'phone'"}
zmdi-smartphone-android
{elseif="$caps->type == 'bot'"}
zmdi-memory
{else}
zmdi-laptop
{/if}
">
</i>
</span>
2016-01-06 09:18:43 +01:00
<p class="normal line">
2015-12-21 22:59:03 +01:00
{$caps->name}
{if="isset($clienttype[$caps->type])"}
- {$clienttype[$caps->type]}
{/if}
2016-01-06 09:18:43 +01:00
</p>
</li>
2016-01-06 09:18:43 +01:00
{/if}
2015-12-21 22:59:03 +01:00
</ul>
</header>
<div class="block">
<a onclick="{$chat}" class="button action color red">
<i class="zmdi zmdi-comment-text-alt"></i>
</a>
2015-12-21 22:59:03 +01:00
<ul class="list flex">
{if="$contact->delay != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="icon brown"><i class="zmdi zmdi-restore"></i></span>
2015-12-21 22:59:03 +01:00
<p>{$c->__('last.title')}</p>
<p>{$contact->delay}</p>
</li>
{/if}
{if="$contact->fn != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray">{$contact->fn|firstLetterCapitalize}</span>
<p>{$c->__('general.name')}</p>
<p>{$contact->fn}</p>
</li>
{/if}
{if="$contact->nickname != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray">{$contact->nickname|firstLetterCapitalize}</span>
<p>{$c->__('general.nickname')}</p>
<p>{$contact->nickname}</p>
</li>
{/if}
{if="strtotime($contact->date) != 0"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-cake"></i></span>
<p>{$c->__('general.date_of_birth')}</p>
<p>{$contact->date|strtotime|prepareDate:false}</p>
</li>
{/if}
{if="$contact->url != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-link"></i></span>
<p>{$c->__('general.website')}</p>
<p>
{if="filter_var($contact->url, FILTER_VALIDATE_URL)"}
<a href="{$contact->url}" target="_blank">{$contact->url}</a>
{else}
{$contact->url}
{/if}
</p>
</li>
{/if}
{if="$contact->email != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-email"></i></span>
<p>{$c->__('general.email')}</p>
<p><img src="{$contact->getPhoto('email')}"/></p>
</li>
{/if}
{if="$contact->getMarital() != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-accounts"></i></span>
<p>{$c->__('general.marital')}</p>
<p>{$contact->getMarital()}</p>
</li>
{/if}
{if="$contact->getGender() != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-face"></i></span>
<p>{$c->__('general.gender')}</p>
<p>{$contact->getGender()}</p>
</li>
{/if}
{if="$contactr->delay != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-time-countdown"></i></span>
<p>{$c->__('last.title')}</p>
<p>{$contactr->delay|strtotime|prepareDate}</p>
</li>
{/if}
{if="$contact->mood != null"}
{$moods = unserialize($contact->mood)}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-mood"></i></span>
<p>{$c->__('mood.title')}</p>
<p>{loop="$moods"}
{$mood[$value]}
{/loop}
</p>
</li>
{/if}
2015-09-10 15:41:45 +02:00
{if="$contact->description != null && trim($contact->description) != ''"}
2015-12-21 22:59:03 +01:00
<li class="pblock large">
<span class="primary icon gray"><i class="zmdi zmdi-format-align-justify"></i></span>
<p>{$c->__('general.about')}</p>
2015-09-10 15:41:45 +02:00
<p class="all">{$contact->description}</p>
</li>
{/if}
</ul>
2015-09-10 15:41:45 +02:00
<br />
{if="$blog != null"}
2015-12-21 22:59:03 +01:00
<ul class="list middle active block flex">
<li class="block large subheader">
<p>{$c->__('blog.last')}</p>
</li>
{loop="$blog"}
2015-12-21 22:59:03 +01:00
<li class="block" onclick="movim_reload('{$c->route('news', $value->nodeid)}')">
{$url = $value->getContact()->getPhoto('l')}
{if="$url"}
2015-12-21 22:59:03 +01:00
<span class="primary icon bubble" style="background-image: url({$url});">
</span>
{else}
2015-12-21 22:59:03 +01:00
<span class="primary icon thumb color {$value->getContact()->jid|stringToColor}">
<i class="zmdi zmdi-account"></i>
</span>
{/if}
{if="$value->title != null"}
2015-12-21 22:59:03 +01:00
<p class="line">{$value->title}</p>
{else}
2015-12-21 22:59:03 +01:00
<p class="line">{$c->__('hello.contact_post')}</p>
{/if}
2015-12-21 22:59:03 +01:00
<p>{$value->published|strtotime|prepareDate}</p>
<p>{$value->contentcleaned|strip_tags}</p>
</li>
{/loop}
2015-12-15 11:54:49 +01:00
<a href="{$c->route('blog', array($contact->jid))}" target="_blank" class="block large">
2015-12-21 22:59:03 +01:00
<li>
<span class="primary icon">
<i class="zmdi zmdi-portable-wifi"></i>
</span>
2015-12-21 22:59:03 +01:00
<span class="control icon">
<i class="zmdi zmdi-chevron-right"></i>
</span>
<p class="normal">{$c->__('blog.visit')}</p>
</li>
</a>
</ul>
{/if}
2015-09-10 15:41:45 +02:00
{$album = $contact->getAlbum()}
{if="$album"}
2015-12-21 22:59:03 +01:00
<ul class="list flex">
<li class="subheader block large">
<p>{$c->__('general.tune')}</p>
</li>
<li class="
block
2015-09-10 15:41:45 +02:00
action
">
2015-12-21 22:59:03 +01:00
<span class="primary icon bubble">
2015-09-10 15:41:45 +02:00
{if="isset($album->url)"}
<img src="{$album->url}"/>
{else}
<i class="zmdi zmdi-play-circle-fill"></i>
{/if}
</span>
2015-12-21 22:59:03 +01:00
<span class="control icon">
<a href="{$album->url}" target="_blank">
<i class="zmdi zmdi-radio"></i>
</a>
</span>
<p>
{if="$contact->tuneartist"}
{$contact->tuneartist} -
{/if}
{if="$contact->tunesource"}
{$contact->tunesource}
{/if}
2015-12-21 22:59:03 +01:00
</p>
{if="$contact->tunetitle"}
<p>{$contact->tunetitle}</p>
{/if}
</li>
</ul>
<br />
{/if}
{if="$contact->adrlocality != null || $contact->adrcountry != null"}
2015-12-21 22:59:03 +01:00
<ul class="list flex">
<li class="subheader block large">
<p>{$c->__('position.legend')}</p>
</li>
{if="$contact->adrlocality != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-city"></i></span>
<p>{$c->__('position.locality')}</p>
<p>{$contact->adrlocality}</p>
</li>
{/if}
{if="$contact->adrcountry != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray"><i class="zmdi zmdi-pin"></i></span>
<p>{$c->__('position.country')}</p>
<p>{$contact->adrcountry}</p>
</li>
{/if}
</ul>
<br />
{/if}
<div class="clear"></div>
{if="$contact->twitter != null || $contact->skype != null || $contact->yahoo != null"}
2015-12-21 22:59:03 +01:00
<ul class="list flex">
<li class="subheader block large">
<p>{$c->__('general.accounts')}</p>
</li>
{if="$contact->twitter != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray">
<i class="zmdi zmdi-twitter"></i>
</span>
2015-12-21 22:59:03 +01:00
<p>Twitter</p>
<p>
<a
target="_blank"
href="https://twitter.com/{$contact->twitter}">
@{$contact->twitter}
</a>
</p>
</li>
{/if}
{if="$contact->skype != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray">S</span>
<p>Skype</p>
<p>
<a
target="_blank"
href="callto://{$contact->skype}">
{$contact->skype}
</a>
</p>
</li>
{/if}
{if="$contact->yahoo != null"}
2015-12-21 22:59:03 +01:00
<li class="block">
<span class="primary icon gray">Y</span>
<p>Yahoo!</p>
<p>
<a
target="_blank"
href="ymsgr:sendIM?{$contact->yahoo}">
{$contact->yahoo}
</a>
</p>
</li>
{/if}
</ul>
<br />
{/if}
{if="isset($gallery)"}
2015-12-21 22:59:03 +01:00
<ul class="list">
<li class="subheader">
<p>{$c->__('page.gallery')}</p>
</li>
</ul>
<ul class="grid active padded">
{loop="$gallery"}
{$attachements = $value->getAttachements()}
<li style="background-image: url('{$attachements['pictures'][0]['href']}');"
onclick="movim_reload('{$c->route('news', $value->nodeid)}')">
<nav>
2015-12-15 11:54:49 +01:00
<span>{$value->title}</span>
</nav>
</li>
{/loop}
</ul>
{/if}
{if="$contactr && $contactr->rostersubscription != 'both'"}
<div class="card">
2015-12-21 22:59:03 +01:00
<ul class="list middle">
<li>
{if="$contactr->rostersubscription == 'to'"}
2015-12-21 22:59:03 +01:00
<span class="primary icon gray">
<i class="zmdi zmdi-arrow-in"></i>
</span>
2015-12-21 22:59:03 +01:00
<p>{$c->__('subscription.to')}</p>
<p>{$c->__('subscription.to_text')}</p>
2015-12-21 22:59:03 +01:00
<p>
<a class="button flat" onclick="Notifs_ajaxAccept('{$contactr->jid}')">
{$c->__('subscription.to_button')}
</a>
</p>
{/if}
{if="$contactr->rostersubscription == 'from'"}
2015-12-21 22:59:03 +01:00
<span class="primary icon gray">
<i class="zmdi zmdi-arrow-out"></i>
</span>
2015-12-21 22:59:03 +01:00
<p>{$c->__('subscription.from')}</p>
<p>{$c->__('subscription.from_text')}</p>
2015-12-21 22:59:03 +01:00
<p>
<a class="button flat" onclick="Notifs_ajaxAsk('{$contactr->jid}')">
{$c->__('subscription.from_button')}
</a>
</p>
{/if}
{if="$contactr->rostersubscription == 'none'"}
2015-12-21 22:59:03 +01:00
<span class="primary icon gray">
2015-09-10 15:41:45 +02:00
<i class="zmdi zmdi-block"></i>
</span>
2015-12-21 22:59:03 +01:00
<p>{$c->__('subscription.nil')}</p>
<p>{$c->__('subscription.nil_text')}</p>
2015-12-21 22:59:03 +01:00
<p>
<a class="button flat" onclick="Notifs_ajaxAsk('{$contactr->jid}')">
{$c->__('subscription.nil_button')}
</a>
</p>
{/if}
</li>
</ul>
</div>
{/if}
{else}
<ul class="thick">
<li>
<span class="icon bubble"><img src="{$contactr->getPhoto('l')}"></span>
<h2>{$contactr->getTrueName()}</h2>
</li>
</ul>
</div>
{/if}