openvk/Web/Presenters/templates/Group/View.xml

231 lines
9.4 KiB
XML
Raw Normal View History

2020-06-07 19:04:43 +03:00
{extends "../@layout.xml"}
{block title}{$club->getName()}{/block}
{block header}
{$club->getName()}
<img n:if="$club->isVerified()"
class="name-checkmark"
src="/assets/packages/static/openvk/img/checkmark.png"
alt="Подтверждённая страница"
/>
{/block}
{block content}
<div class="left_big_block">
<div class="content_title_expanded" onclick="hidePanel(this);">
{_"information"}
</div>
<div class="page_info">
<table class="ugc-table">
<tbody>
<tr>
<td><span class="nobold">{_"name_group"}:</span></td>
<td><b>{$club->getName()}</b></td>
</tr>
<tr>
<td><span class="nobold">{_"description"}:</span></td>
<td>{$club->getDescription()}</td>
</tr>
<tr n:if="!is_null($club->getWebsite())">
<td><span class="nobold">{_"website"}: </span></td>
<td>
<a href="{$club->getWebsite()}" rel="ugc" target="_blank">
{$club->getWebsite()}
</a>
</td>
</tr>
2020-06-07 19:04:43 +03:00
</tbody>
</table>
</div>
<div n:if="$club->getFollowersCount() > 0">
2021-12-13 14:17:13 +03:00
{var followersCount = $club->getFollowersCount()}
<div class="content_title_expanded" onclick="hidePanel(this, {$followersCount});">
{_participants}
</div>
<div>
<div class="content_subtitle">
{tr("participants", $followersCount)}
<div style="float:right;">
<a href="/club{$club->getId()}/followers">{_all_title}</a>
2020-06-07 19:04:43 +03:00
</div>
2021-12-13 14:17:13 +03:00
</div>
<div style="padding-left: 5px;">
<table
n:foreach="$club->getFollowers(1) as $follower"
n:class="User"
style="text-align:center;display:inline-block;width:62px"
cellspacing='4'>
<tbody>
<tr>
<td>
<a href="{$follower->getURL()}">
<img src="{$follower->getAvatarUrl()}" width="50" />
</a>
</td>
</tr>
<tr>
<td>
<a href="{$follower->getURL()}">{$follower->getFirstName()}</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div n:if="$club->containsWiki()">
{var page = $club->getWikiHomePage()}
<div class="content_title_expanded" onclick="hidePanel(this);">
{$page->getTitle()}
</div>
<div>
<div class="content_subtitle">
{_wiki_page}
<div n:if="$club->canBeModifiedBy($thisUser)" style="float:right;">
<a href="/pages?gid={$club->getId()}&elid=1" target="_blank">{_edit}</a>
2020-06-07 19:04:43 +03:00
</div>
</div>
2021-12-13 14:17:13 +03:00
<div style="padding-left: 5px;">
<article id="userContent" style="overflow-y: scroll; height: 200px;">
{$page->getText()|noescape}
</article>
</div>
2020-06-07 19:04:43 +03:00
</div>
2021-12-13 14:17:13 +03:00
</div>
<br/>
2020-06-07 19:04:43 +03:00
2021-09-20 13:35:03 +03:00
{presenter "openvk!Wall->wallEmbedded", -$club->getId()}
2020-06-07 19:04:43 +03:00
</div>
<div class="right_small_block">
<a href="{$club->getAvatarLink()|nocheck}">
<img src="{$club->getAvatarUrl()}" style="width: 100%; image-rendering: -webkit-optimize-contrast;" />
</a>
<div n:ifset="$thisUser" id="profile_links">
{if $club->canBeModifiedBy($thisUser)}
<a href="/club{$club->getId()}/edit" id="profile_link">{_"edit_group"}</a>
{/if}
{if $club->getSubscriptionStatus($thisUser) == false}
<form action="/setSub/club" method="post">
<input type="hidden" name="act" value="add" />
<input type="hidden" name="id" value="{$club->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" id="profile_link" value="{_"join_community"}" />
</form>
{else}
<form action="/setSub/club" method="post">
<input type="hidden" name="act" value="rem" />
<input type="hidden" name="id" value="{$club->getId()}" />
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" id="profile_link" value="{_"leave_community"}" />
</form>
{/if}
</div>
<div>
<div class="content_title_expanded" onclick="hidePanel(this);">
{_"group_type"}
</div>
<div style="padding:4px">
{_"group_type_open"}
</div>
</div>
2021-11-05 13:32:55 +03:00
<div n:if="$club->getAdministratorsListDisplay() == 0">
<div class="content_title_expanded" onclick="hidePanel(this);">
{_"creator"}
2020-06-07 19:04:43 +03:00
</div>
2021-11-06 17:47:53 +03:00
<div class="avatar-list-item" style="padding: 8px;">
2021-11-05 13:32:55 +03:00
{var author = $club->getOwner()}
2021-11-06 17:47:53 +03:00
<div class="avatar">
<a href="{$author->getURL()}">
<img class="ava" src="{$author->getAvatarUrl()}" />
</a>
</div>
{* Это наверное костыль, ну да ладно *}
<div n:class="info, mb_strlen($author->getCanonicalName()) < 22 ? info-centered" n:if="empty($club->getOwnerComment())">
2021-11-06 17:47:53 +03:00
<a href="{$author->getURL()}" class="title">{$author->getCanonicalName()}</a>
</div>
<div class="info" n:if="!empty($club->getOwnerComment())">
<a href="{$author->getURL()}" class="title">{$author->getCanonicalName()}</a>
<div class="subtitle">{$club->getOwnerComment()}</div>
</div>
2021-11-05 13:32:55 +03:00
</div>
</div>
<div n:if="$club->getAdministratorsListDisplay() == 1">
{var managersCount = $club->getManagersCount(true)}
<div class="content_title_expanded" onclick="hidePanel(this, {$managersCount});">
2021-11-05 13:32:55 +03:00
{_"administrators"}
2020-06-07 19:04:43 +03:00
</div>
2021-11-06 17:47:53 +03:00
<div>
<div class="content_subtitle">
{tr("administrators", $managersCount)}
<div style="float: right;">
<a href="/club{$club->getId()}/followers?onlyAdmins=1">{_"all_title"}</a>
</div>
2021-11-06 17:47:53 +03:00
</div>
<div class="avatar-list">
<div class="avatar-list-item" n:if="!$club->isOwnerHidden()">
2021-11-06 17:47:53 +03:00
{var author = $club->getOwner()}
<div class="avatar">
<a href="{$author->getURL()}">
<img class="ava" src="{$author->getAvatarUrl()}" />
</a>
</div>
<div class="info">
<a href="{$author->getURL()}" class="title">{$author->getCanonicalName()}</a>
<div class="subtitle" n:if="!empty($club->getOwnerComment())">{$club->getOwnerComment()}</div>
</div>
</div>
<div class="avatar-list-item" n:foreach="$club->getManagers(1, true) as $manager">
2021-11-06 17:47:53 +03:00
{var user = $manager->getUser()}
<div class="avatar">
<a href="{$user->getURL()}">
<img height="32" class="ava" src="{$user->getAvatarUrl()}" />
</a>
</div>
<div class="info">
<a href="{$user->getURL()}" class="title">{$user->getCanonicalName()}</a>
<div class="subtitle" n:if="!empty($manager->getComment())">{$manager->getComment()}</div>
</div>
</div>
</div>
2021-11-05 13:32:55 +03:00
</div>
</div>
2020-06-07 19:04:43 +03:00
<div n:if="$albumsCount > 0">
<div class="content_title_expanded" onclick="hidePanel(this, {$albumsCount});">
{_"albums"}
</div>
<div>
<div class="content_subtitle">
2020-12-28 03:00:57 +03:00
{tr("albums", $albumsCount)}
2020-06-07 19:04:43 +03:00
<div style="float:right;">
<a href="/albums{$club->getId() * -1}">{_"all_title"}</a>
</div>
</div>
<div style="padding: 5px;">
<div class="ovk-album" style="display: inline-block;" n:foreach="$albums as $album">
<div style="text-align: center;float: left;height: 54pt;width: 100px;">
{var cover = $album->getCoverPhoto()}
<img
src="{is_null($cover)?'/assets/packages/static/openvk/img/camera_200.png':$cover->getURL()}"
style="max-width: 80px; max-height: 54pt;" />
</div>
<div>
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
<span class="nobold">Обновлён {$album->getEditTime() ?? $album->getCreationTime()}</span>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}