2013-05-04 17:10:22 +03:00
|
|
|
|
{**
|
|
|
|
|
* Блок с фотографией пользователя в профиле
|
|
|
|
|
*
|
|
|
|
|
* @styles css/blocks.css
|
2013-07-30 11:36:48 +03:00
|
|
|
|
* @scripts <framework>/js/livestreet/user.js
|
2013-05-04 17:10:22 +03:00
|
|
|
|
*}
|
|
|
|
|
|
|
|
|
|
{extends file='blocks/block.aside.base.tpl'}
|
|
|
|
|
|
2013-05-06 07:33:38 +03:00
|
|
|
|
{block name='block_type'}profile-photo{/block}
|
2013-07-29 07:28:52 +03:00
|
|
|
|
{block name='block_class'}js-ajax-photo-upload{/block}
|
2013-05-04 17:10:22 +03:00
|
|
|
|
|
2013-10-02 17:09:30 +03:00
|
|
|
|
{block name='block_content'}
|
2013-05-04 17:10:22 +03:00
|
|
|
|
<div class="profile-photo-wrapper">
|
2014-01-25 14:44:57 +02:00
|
|
|
|
{* Статус онлайн\оффлайн *}
|
|
|
|
|
{if $oSession}
|
|
|
|
|
{if $oUserProfile->isOnline() && $smarty.now - strtotime($oSession->getDateLast()) < 60*5}
|
|
|
|
|
<div class="status status-online">{$aLang.user_status_online}</div>
|
|
|
|
|
{else}
|
|
|
|
|
<div class="status status-offline">
|
|
|
|
|
|
|
|
|
|
{if $oUserProfile->getProfileSex() != 'woman'}
|
|
|
|
|
{$aLang.user_status_was_online_male}
|
|
|
|
|
{else}
|
|
|
|
|
{$aLang.user_status_was_online_female}
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{date_format date=$oSession->getDateLast() hours_back="12" minutes_back="60" day_back="8" now="60*5" day="day H:i" format="j F в G:i"}</div>
|
|
|
|
|
{/if}
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{* Фото *}
|
2013-07-29 07:28:52 +03:00
|
|
|
|
<a href="{$oUserProfile->getUserWebPath()}">
|
2013-10-23 10:02:40 +03:00
|
|
|
|
<img src="{$oUserProfile->getProfileFotoPath()}" alt="{$oUserProfile->getDisplayName()} photo" class="profile-photo js-ajax-image-upload-image" />
|
2013-07-29 07:28:52 +03:00
|
|
|
|
</a>
|
2013-05-04 17:10:22 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{if $sAction=='settings' and $oUserCurrent and $oUserCurrent->getId() == $oUserProfile->getId()}
|
|
|
|
|
<p class="upload-photo">
|
2013-07-29 07:28:52 +03:00
|
|
|
|
<label for="foto" class="form-input-file">
|
|
|
|
|
<span class="js-ajax-image-upload-choose link-dotted">{if $oUserCurrent->getProfileFoto()}{$aLang.settings_profile_photo_change}{else}{$aLang.settings_profile_photo_upload}{/if}</span>
|
|
|
|
|
<input type="file" name="foto" id="foto" class="js-ajax-image-upload-file">
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<a href="#" class="js-ajax-image-upload-remove link-dotted" style="{if ! $oUserCurrent->getProfileFoto()}display:none;{/if}">{$aLang.settings_profile_foto_delete}</a>
|
2013-05-04 17:10:22 +03:00
|
|
|
|
</p>
|
|
|
|
|
{/if}
|
|
|
|
|
{/block}
|