openvk/Web/Presenters/templates/About/AboutInstance.xml
Maxim Leshchenko 1b1c88dd96
About: Add a page with information about an instance
Namely, brief statistics, a list of administrators (the administrator can be hidden from the list using a new right), a list of the 10 most popular groups and rules
2022-01-03 17:59:12 +02:00

59 lines
2.5 KiB
XML

{extends "../@layout.xml"}
{block title}{_about_this_instance}{/block}
{block header}
{_about_this_instance}
{/block}
{block content}
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr valign="top">
<td width="250" {if sizeof($admins) > 0}style="padding-right: 10px;"{/if}>
<h4>{_statistics}</h4>
<div style="margin-top: 5px;">
{_on_this_instance_are}
<ul>
<li><span>{tr("about_users", $usersStats->all)|noescape}</span></li>
<li><span>{tr("about_online_users", $usersStats->online)|noescape}</span></li>
<li><span>{tr("about_active_users", $usersStats->active)|noescape}</span></li>
<li><span>{tr("about_groups", $clubsCount)|noescape}</span></li>
<li><span>{tr("about_wall_posts", $postsCount)|noescape}</span></li>
</ul>
</div>
</td>
<td n:if="sizeof($admins) > 0">
<h4>{_administrators}</h4>
<div style="margin-left: 5px; margin-top: 5px;">
<div n:foreach="$admins as $admin" class="avatar-list-item">
<div class="avatar">
<a href="{$admin->getURL()}">
<img class="ava" src="{$admin->getAvatarUrl()}" />
</a>
</div>
{* Это наверное костыль, ну да ладно *}
<div n:class="info, mb_strlen($admin->getCanonicalName()) < 22 ? info-centered">
<a href="{$admin->getURL()}" class="title">{$admin->getCanonicalName()}</a>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<h4>{_most_popular_groups}</h4>
<ol>
<li n:foreach="$popularClubs as $entry" style="margin-top: 5px;">
<a href="{$entry->club->getURL()}">{$entry->club->getName()}</a>
<div>
{tr("participants", $entry->subscriptions)}
</div>
</li>
</ol>
<h4>{_rules}</h4>
<div style="margin-top: 16px;">
{presenter "openvk!Support->knowledgeBaseArticle", "rules"}
</div>
{/block}