mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
About: Hide list of most popular groups if there are no groups
This commit is contained in:
parent
71186631f3
commit
eca0f057ca
2 changed files with 12 additions and 10 deletions
|
@ -63,7 +63,7 @@ final class AboutPresenter extends OpenVKPresenter
|
|||
$this->template->usersStats = (new Users)->getStatistics();
|
||||
$this->template->clubsCount = (new Clubs)->getCount();
|
||||
$this->template->postsCount = (new Posts)->getCount();
|
||||
$this->template->popularClubs = (new Clubs)->getPopularClubs();
|
||||
$this->template->popularClubs = iterator_to_array((new Clubs)->getPopularClubs());
|
||||
$this->template->admins = iterator_to_array((new Users)->getInstanceAdmins());
|
||||
}
|
||||
|
||||
|
|
|
@ -42,15 +42,17 @@
|
|||
</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>
|
||||
{if sizeof($popularClubs) !== 0}
|
||||
<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>
|
||||
{/if}
|
||||
|
||||
<h4>{_rules}</h4>
|
||||
<div style="margin-top: 16px;">
|
||||
|
|
Loading…
Reference in a new issue