About: Hide list of most popular groups if there are no groups

This commit is contained in:
Maxim Leshchenko 2022-01-25 14:22:33 +02:00
parent 71186631f3
commit eca0f057ca
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
2 changed files with 12 additions and 10 deletions

View file

@ -63,7 +63,7 @@ final class AboutPresenter extends OpenVKPresenter
$this->template->usersStats = (new Users)->getStatistics(); $this->template->usersStats = (new Users)->getStatistics();
$this->template->clubsCount = (new Clubs)->getCount(); $this->template->clubsCount = (new Clubs)->getCount();
$this->template->postsCount = (new Posts)->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()); $this->template->admins = iterator_to_array((new Users)->getInstanceAdmins());
} }

View file

@ -42,6 +42,7 @@
</tbody> </tbody>
</table> </table>
{if sizeof($popularClubs) !== 0}
<h4>{_most_popular_groups}</h4> <h4>{_most_popular_groups}</h4>
<ol> <ol>
<li n:foreach="$popularClubs as $entry" style="margin-top: 5px;"> <li n:foreach="$popularClubs as $entry" style="margin-top: 5px;">
@ -51,6 +52,7 @@
</div> </div>
</li> </li>
</ol> </ol>
{/if}
<h4>{_rules}</h4> <h4>{_rules}</h4>
<div style="margin-top: 16px;"> <div style="margin-top: 16px;">