Notification: Redesign it little bit

Also halffully closes #657
This commit is contained in:
veselcraft 2022-08-27 01:18:51 +03:00
parent 47c13e1234
commit 2fa36e123d
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E
9 changed files with 69 additions and 27 deletions

View file

@ -1,4 +1,4 @@
{extends "../@listView.xml"}
{extends "../@layout.xml"}
{var $sorting = false}
{block title}
@ -10,29 +10,47 @@
{_feedback}
{/block}
{block tabs}
{block content}
<div n:ifcontent class="tabs">
<div n:attr="id => ($mode === 'new' ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($mode === 'new' ? 'act_tab_a' : 'ki')" href="?act=new">{_unread}</a>
</div>
<div n:attr="id => ($mode === 'archived' ? 'activetabs' : 'ki')" class="tab">
<a n:attr="id => ($mode === 'archived' ? 'act_tab_a' : 'ki')" href="?act=archived">{_archive}</a>
</div>
{/block}
{* BEGIN ELEMENTS DESCRIPTION *}
{block link|strip|stripHtml}
javascript:void(0)
{/block}
{block preview}
<img src="{$x->getModel(1)->getAvatarUrl('miniscule')}" width=64 />
{/block}
{block name}
<span style="color: #000; font-weight: 100;"></span>
{/block}
{block description}
{include $x->getTemplatePath(), notification => $x}
{/block}
</div>
{var $data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
{if sizeof($data) > 0}
<table class="post post-divider" border="0" style="font-size: 11px;" n:foreach="$data as $dat">
<tbody>
<tr>
<td width="54" valign="top">
<a href="/sysop">
<img src="{$dat->getModel(1)->getAvatarUrl('miniscule')}" width=50 />
</a>
</td>
<td width="100%" valign="top">
<div class="post-content">
<div class="text" style="line-height: 12pt;">
{include $dat->getTemplatePath(), notification => $dat}
</div>
</div>
</td>
</tr>
</tbody>
</table>
{include "../components/paginator.xml", conf => (object) [
"page" => $page,
"count" => $count,
"amount" => sizeof($data),
"perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE,
"atBottom" => true,
]}
{else}
{ifset customErrorMessage}
{include customErrorMessage}
{else}
{include "../components/nothing.xml"}
{/ifset}
{/if}
{/block}

View file

@ -2,5 +2,8 @@
{var $user = $notification->getModel(1)}
<a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a>
{$notification->getDateTime()} {_nt_liked_yours}
{_nt_liked_yours}
<a href="/wall{$post->getPrettyId()}"><b>{_nt_post_nominative}</b></a> {_nt_from} {$post->getPublicationTime()}.
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -2,5 +2,8 @@
{var $user = $notification->getModel(1)}
<a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a>
{$notification->getDateTime()} {_nt_shared_yours}
{_nt_shared_yours}
<a href="/wall{$post->getPrettyId()}"><b>{_nt_post_instrumental}</b></a> {_nt_from} {$post->getPublicationTime()}.
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -1,4 +1,7 @@
{var $user = $notification->getModel(1)}
<a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a>
{$notification->getDateTime()} {_nt_commented_yours} {include under}: "{$notification->getData()}".
{_nt_commented_yours} {include under}: "{$notification->getData()}".
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -2,5 +2,8 @@
{var $user = $notification->getModel(1)}
<a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a>
{$notification->getDateTime()} {_nt_written_on_your_wall}
{_nt_written_on_your_wall}
<a href="/wall{$post->getPrettyId()}"><b>{_nt_post_nominative}</b></a>: "{$notification->getData()}".
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -3,4 +3,7 @@
<a href="{$user->getURL()}"><b>{$user->getCanonicalName()}</b></a>
{_nt_made_you_admin}
<a href="{$club->getURL()}"><b>{$club->getCanonicalName()}</b></a> {$notification->getDateTime()}.
<a href="{$club->getURL()}"><b>{$club->getCanonicalName()}</b></a>.
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -1,4 +1,7 @@
{var $gift = $notification->getModel(0)}
{var $sender = $notification->getModel(1)}
<a href="{$sender->getURL()}"><b>{$sender->getCanonicalName()}</b></a> отправил вам {$notification->getDateTime()} подарок.
<a href="{$sender->getURL()}"><b>{$sender->getCanonicalName()}</b></a> отправил вам подарок.
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -6,3 +6,6 @@
{if !empty($message)}
{_message}: "{$message}".
{/if}
<div class="nobold">
{$notification->getDateTime()}
</div>

View file

@ -6,3 +6,6 @@
{if !empty($message)}
{_message}: "{$message}".
{/if}
<div class="nobold">
{$notification->getDateTime()}
</div>