openvk/Web/Presenters/templates/Messenger/Index.xml
veselcraft db3789bef8
Messages: Redesign, Date fix, Pagination
Search: Kind of fix by adding more shitcode xdddddd

Co-authored-by: Daniel <60743585+myslivets@users.noreply.github.com>
2022-05-31 17:39:52 +03:00

56 lines
2.2 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{extends "../@layout.xml"}
{block title}{_my_messages}{/block}
{block header}{_my_messages}{/block}
{block content}
<div class="tabs">
<div id="activetabs" class="tab">
<a id="act_tab_a" href="javascript:false">Все сообщения</a>
</div>
</div>
<div class="container_gray">
<form action="/im/search" method="POST" style="margin: 0;">
<input type="text" name="pattern" placeholder="Поиск сообщений" required />
</form>
</div>
{if sizeof($corresps) > 0}
<div class="crp-list">
<div n:foreach="$corresps as $coresp"
class="crp-entry"
onmousedown="window.location.href = {$coresp->getURL()};" >
{var $recipient = $coresp->getCorrespondents()[1]}
{var $lastMsg = $coresp->getPreviewMessage()}
<div class="crp-entry--image">
<img src="{$recipient->getAvatarURL('miniscule')}"
alt="Фотография пользователя" />
</div>
<div class="crp-entry--info">
<a href="{$recipient->getURL()}">{$recipient->getCanonicalName()}</a><br/>
<span>{$lastMsg->getSendTimeHumanized()}</span>
</div>
<div n:class="crp-entry--message, $lastMsg->getUnreadState() ? unread">
{var $_author = $lastMsg->getSender()}
<div class="crp-entry--message---av" n:if="$_author->getId() === $thisUser->getId()">
<img src="{$_author->getAvatarURL('miniscule')}"
alt="Фотография пользователя" />
</div>
<div class="crp-entry--message---text">
{$lastMsg->getText()|noescape}
</div>
</div>
</div>
</div>
<div style="margin-top: 3px;">
{include "../components/paginator.xml", conf => $paginatorConf}
</div>
{else}
<br/>
<br/>
<center>Вам никто не писал. Пока что.</center>
{/if}
{/block}