mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Layout: Update friends, groups, videos and albums lists. And some style fixes.
This commit is contained in:
parent
c911ebac25
commit
91b4e03d7e
9 changed files with 2059 additions and 1965 deletions
|
@ -1,70 +1,74 @@
|
|||
{extends "@layout.xml"}
|
||||
|
||||
{block wrap}
|
||||
<div class="page_wrap">
|
||||
<div n:ifset="tabs" class="tabs">
|
||||
{include tabs}
|
||||
</div>
|
||||
|
||||
{ifset size}
|
||||
{include size, x => $dat}
|
||||
{/ifset}
|
||||
|
||||
{ifset specpage}
|
||||
{include specpage, x => $dat}
|
||||
{else}
|
||||
<div class="container_gray">
|
||||
{var data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
|
||||
|
||||
{if sizeof($data) > 0}
|
||||
<div class="content" n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<a href="{include link, x => $dat}">
|
||||
{include preview, x => $dat}
|
||||
</a>
|
||||
</td>
|
||||
<td valign="top" style="width: 100%">
|
||||
{ifset infotable}
|
||||
{include infotable, x => $dat}
|
||||
{else}
|
||||
<a href="{include link, x => $dat}">
|
||||
<b>
|
||||
{include name, x => $dat}
|
||||
</b>
|
||||
</a>
|
||||
<br/>
|
||||
{include description, x => $dat}
|
||||
{/ifset}
|
||||
</td>
|
||||
<td n:ifset="actions" valign="top" class="action_links" style="width: 150px; text-transform: lowercase;">
|
||||
{include actions, x => $dat}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{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}
|
||||
<div class="wrap2">
|
||||
<div class="wrap1">
|
||||
<div class="page_wrap padding_top">
|
||||
<div n:ifset="tabs" class="tabs">
|
||||
{include tabs}
|
||||
</div>
|
||||
{/ifset}
|
||||
|
||||
{ifset bottom}
|
||||
{include bottom}
|
||||
{/ifset}
|
||||
{ifset size}
|
||||
{include size, x => $dat}
|
||||
{/ifset}
|
||||
|
||||
{ifset specpage}
|
||||
{include specpage, x => $dat}
|
||||
{else}
|
||||
<div class="container_gray">
|
||||
{var data = is_array($iterator) ? $iterator : iterator_to_array($iterator)}
|
||||
|
||||
{if sizeof($data) > 0}
|
||||
<div class="content" n:foreach="$data as $dat">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<a href="{include link, x => $dat}">
|
||||
{include preview, x => $dat}
|
||||
</a>
|
||||
</td>
|
||||
<td valign="top" style="width: 100%">
|
||||
{ifset infotable}
|
||||
{include infotable, x => $dat}
|
||||
{else}
|
||||
<a href="{include link, x => $dat}">
|
||||
<b>
|
||||
{include name, x => $dat}
|
||||
</b>
|
||||
</a>
|
||||
<br/>
|
||||
{include description, x => $dat}
|
||||
{/ifset}
|
||||
</td>
|
||||
<td n:ifset="actions" valign="top" class="action_links" style="width: 150px; text-transform: lowercase;">
|
||||
{include actions, x => $dat}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{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}
|
||||
</div>
|
||||
{/ifset}
|
||||
|
||||
{ifset bottom}
|
||||
{include bottom}
|
||||
{/ifset}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
|
|
@ -5,12 +5,29 @@
|
|||
{block title}{_"albums"} {$owner->getCanonicalName()}{/block}
|
||||
|
||||
{block header}
|
||||
<a href="{$owner->getURL()}">{$owner->getCanonicalName()}</a>
|
||||
» {_"albums"}
|
||||
|
||||
<div n:if="$canEdit" style="float: right;">
|
||||
{var isClub = ($owner instanceof openvk\Web\Models\Entities\Club)}
|
||||
<a href="/albums/create{$isClub ? '?gpid=' . $owner->getId() : ''}">{_"create_album"}</a>
|
||||
{if isset($thisUser) && $thisUser->getId() == $owner->getId()}
|
||||
{_my_photos}
|
||||
{else}
|
||||
<a href="{$owner->getURL()}">
|
||||
{$owner->getCanonicalName()}</a>
|
||||
»
|
||||
{_albums}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block size}
|
||||
<div style="padding-bottom: 0px; padding-top: 0;" class="summaryBar">
|
||||
<div class="summary">
|
||||
{if !is_null($thisUser) && $owner->getId() === $thisUser->getId()}
|
||||
{tr("albums_list", $count)}
|
||||
{else}
|
||||
{tr("albums", $count)}
|
||||
{/if}
|
||||
<span n:if="isset($thisUser) && $thisUser->getId() == $owner->getId()">
|
||||
|
|
||||
<a href="/albums/create">{_create_album}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
|
|
@ -25,13 +25,17 @@
|
|||
{/block}
|
||||
|
||||
{block header}
|
||||
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a> »
|
||||
{if $act == "incoming"}
|
||||
{_"incoming_req"}
|
||||
{elseif $act == "outcoming"}
|
||||
{_"outcoming_req"}
|
||||
{if isset($thisUser) && $thisUser->getId() == $user->getId()}
|
||||
{_my_friends}
|
||||
{else}
|
||||
{_"friends"}
|
||||
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a> »
|
||||
{if $act == "incoming"}
|
||||
{_"incoming_req"}
|
||||
{elseif $act == "outcoming"}
|
||||
{_"outcoming_req"}
|
||||
{else}
|
||||
{_"friends"}
|
||||
{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
@ -39,11 +43,38 @@
|
|||
<div n:attr="id => ($act === 'friends' ? 'activetabs' : 'ki')" class="tab">
|
||||
<a n:attr="id => ($act === 'friends' ? 'act_tab_a' : 'ki')" href="?">{_friends}</a>
|
||||
</div>
|
||||
<div n:attr="id => ($act === 'incoming' ? 'activetabs' : 'ki')" class="tab">
|
||||
<a n:attr="id => ($act === 'incoming' ? 'act_tab_a' : 'ki')" href="?act=incoming">{_incoming_req}</a>
|
||||
<div n:attr="id => ($act === 'incoming' || $act === 'outcoming' ? 'activetabs' : 'ki')" class="tab">
|
||||
<a n:attr="id => ($act === 'incoming' || $act === 'outcoming' ? 'act_tab_a' : 'ki')" href="?act=incoming">{_req}</a>
|
||||
</div>
|
||||
<div n:attr="id => ($act === 'outcoming' ? 'activetabs' : 'ki')" class="tab">
|
||||
<a n:attr="id => ($act === 'outcoming' ? 'act_tab_a' : 'ki')" href="?act=outcoming">{_outcoming_req}</a>
|
||||
{/block}
|
||||
|
||||
{block size}
|
||||
<div n:if="$act === 'incoming' || $act === 'outcoming'" class="mb_tabs">
|
||||
<div n:attr="id => ($act === 'incoming' ? 'active' : 'ki')" class="mb_tab">
|
||||
<div>
|
||||
<a href="?act=incoming">Входящие</a>
|
||||
</div>
|
||||
</div>
|
||||
<div n:attr="id => ($act === 'outcoming' ? 'active' : 'ki')" class="mb_tab">
|
||||
<div>
|
||||
<a href="?act=outcoming">Исходящие</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 0px;" class="summaryBar">
|
||||
<div class="summary">
|
||||
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
|
||||
{if $act == "incoming"}
|
||||
{tr("req", $count)}
|
||||
{elseif $act == "outcoming"}
|
||||
{tr("req", $count)}
|
||||
{else}
|
||||
{tr("friends_list", $count)}
|
||||
{/if}
|
||||
{else}
|
||||
{tr("friends", $count)}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
@ -114,4 +145,4 @@
|
|||
</form>
|
||||
{/if}
|
||||
{/if}
|
||||
{/block}
|
||||
{/block}
|
|
@ -32,7 +32,7 @@
|
|||
{/block}
|
||||
|
||||
{block size}
|
||||
<div style="padding-bottom: 0px;border-bottom: 0;" class="summaryBar">
|
||||
<div style="padding-bottom: 0px;" class="summaryBar">
|
||||
<div class="summary">
|
||||
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
|
||||
{tr("groups_list", $thisUser->getClubCount())}
|
||||
|
@ -73,25 +73,26 @@
|
|||
{block actions}
|
||||
{var clubPinned = $thisUser->isClubPinned($x)}
|
||||
{if $x->canBeModifiedBy($thisUser ?? NULL)}
|
||||
<a style="border-bottom: none; width: 140px;" class="profile_link" href="{$x->getURL()}">
|
||||
{_check_community}
|
||||
</a>
|
||||
{if ($clubPinned || $thisUser->getPinnedClubCount() <= 10)}
|
||||
<a style="border-bottom: none; width: 140px;" class="profile_link" href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}">
|
||||
{if $clubPinned}
|
||||
{_remove_from_left_menu}
|
||||
{else}
|
||||
{_add_to_left_menu}
|
||||
{/if}
|
||||
<div class="navigation" style="width: 140px;">
|
||||
<a class="link" href="{$x->getURL()}">
|
||||
{_check_community}
|
||||
</a>
|
||||
{/if}
|
||||
<form action="/setSub/club" method="post">
|
||||
<input type="hidden" name="act" value="rem" />
|
||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input style="text-transform: lowercase; border-bottom: none; width: 140px;" type="submit" id="profile_link" value="{_"leave_community"}" />
|
||||
</form>
|
||||
|
||||
{if ($clubPinned || $thisUser->getPinnedClubCount() <= 10)}
|
||||
<a class="link" href="/groups_pin?club={$x->getId()}&hash={rawurlencode($csrfToken)}" data-group-name="{$x->getName()}" data-group-url="{$x->getUrl()}">
|
||||
{if $clubPinned}
|
||||
{_remove_from_left_menu}
|
||||
{else}
|
||||
{_add_to_left_menu}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
<form action="/setSub/club" method="post">
|
||||
<input type="hidden" name="act" value="rem" />
|
||||
<input type="hidden" name="id" value="{$x->getId()}" />
|
||||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input style="text-transform: lowercase; width: 100%;" class="link" type="submit" value="{_"leave_community"}" />
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{/block}
|
||||
|
||||
{block size}
|
||||
<div style="padding-bottom: 0px;border-bottom: 0; padding-top: 0;" class="summaryBar">
|
||||
<div style="padding-bottom: 0px; padding-top: 0;" class="summaryBar">
|
||||
<div class="summary">
|
||||
{tr("videos", $count)}
|
||||
<span n:if="isset($thisUser) && $thisUser->getId() == $user->getId()">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<center style="background: white;border: #DEDEDE solid 1px;">
|
||||
<span style="color: #707070;margin: 60px 0;display: block;">
|
||||
<b>{$title}</b><br><br>
|
||||
<b n:if="!empty($title)">{$title}<br><br></b>
|
||||
{$description}
|
||||
</span>
|
||||
</center>
|
|
@ -1 +1 @@
|
|||
{include "error.xml", title => tr("no_data"), description => tr("no_data_description")}
|
||||
{include "error.xml", description => tr("no_data_description")}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -195,16 +195,28 @@
|
|||
"friends_reject" = "Отменить заявку";
|
||||
"friends_accept" = "Принять заявку";
|
||||
"send_message" = "Отправить сообщение";
|
||||
"incoming_req" = "Подписчики";
|
||||
"outcoming_req" = "Заявки";
|
||||
"incoming_req" = "Входящие";
|
||||
"outcoming_req" = "Исходящие";
|
||||
"req" = "Заявки";
|
||||
|
||||
"firends_zero" = "Ни одного друга";
|
||||
"req_zero" = "Не найдено ни одной заявки...";
|
||||
"req_one" = "Найдена $1 заявка";
|
||||
"req_few" = "Найлено $1 заявки";
|
||||
"req_many" = "Найдено $1 заявки";
|
||||
"req_other" = "Найдено $1 заявок";
|
||||
|
||||
"friends_zero" = "Ни одного друга";
|
||||
"friends_one" = "$1 друг";
|
||||
"friends_few" = "$1 друга";
|
||||
"friends_many" = "$1 друзей";
|
||||
"friends_other" = "$1 друзей";
|
||||
|
||||
"friends_list_zero" = "У Вас пока нет друзей";
|
||||
"friends_list_one" = "У Вас $1 друг";
|
||||
"friends_list_few" = "У Вас $1 друга";
|
||||
"friends_list_many" = "У Вас $1 друзей";
|
||||
"friends_list_other" = "У Вас $1 друзей";
|
||||
|
||||
"followers_zero" = "Ни одного подписчика";
|
||||
"followers_one" = "$1 подписчик";
|
||||
"followers_few" = "$1 подписчика";
|
||||
|
@ -318,6 +330,12 @@
|
|||
"albums_many" = "$1 альбомов";
|
||||
"albums_other" = "$1 альбомов";
|
||||
|
||||
"albums_list_zero" = "У Вас нет ни одного альбома";
|
||||
"albums_list_one" = "У Вас один альбом";
|
||||
"albums_list_few" = "У Вас $1 альбома";
|
||||
"albums_list_many" = "У Вас $1 альбомов";
|
||||
"albums_list_other" = "У Вас $1 альбомов";
|
||||
|
||||
/* Notes */
|
||||
|
||||
"notes" = "Заметки";
|
||||
|
@ -751,7 +769,7 @@
|
|||
"information_-2" = "Вход выполнен успешно";
|
||||
|
||||
"no_data" = "Нет данных";
|
||||
"no_data_description" = "В этом представлении отсутствуют данные.";
|
||||
"no_data_description" = "Тут ничего нет... Пока...";
|
||||
|
||||
"error" = "Ошибка";
|
||||
"error_shorturl" = "Данный короткий адрес уже занят.";
|
||||
|
|
Loading…
Reference in a new issue