From a2b13116e6b4a89c199bd1cf7cc68e6c6acc923d Mon Sep 17 00:00:00 2001 From: kosfurler Date: Mon, 31 Jan 2022 15:15:51 +0300 Subject: [PATCH] Groups: Update layot New counter, info and actions blocks and some stye fixes --- Web/Presenters/templates/@listView.xml | 12 +++--- Web/Presenters/templates/User/Groups.xml | 39 ++++++++++++++++--- .../templates/components/paginator.xml | 24 ++++++------ Web/static/css/style.css | 13 +++++++ locales/ru.strings | 5 +++ 5 files changed, 71 insertions(+), 22 deletions(-) diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index b3a0a314..aab6660e 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -24,24 +24,25 @@ + {ifset infotable} + {include infotable, x => $dat} + {else} {include name, x => $dat}
- - {include description, x => $dat} + {include description, x => $dat} + {/ifset} - + {include actions, x => $dat} - -
{include "components/paginator.xml", conf => (object) [ "page" => $page, "count" => $count, @@ -49,7 +50,6 @@ "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, "atBottom" => true, ]} -
{else} {ifset customErrorMessage} {include customErrorMessage} diff --git a/Web/Presenters/templates/User/Groups.xml b/Web/Presenters/templates/User/Groups.xml index 8991c0a9..5b8c3a74 100644 --- a/Web/Presenters/templates/User/Groups.xml +++ b/Web/Presenters/templates/User/Groups.xml @@ -33,7 +33,13 @@ {block size}
-
Найдено групп ({$thisUser->getClubCount()})
+
+ {if !is_null($thisUser) && $user->getId() === $thisUser->getId()} + {tr("groups_list", $thisUser->getClubCount())} + {else} + {tr("groups", $user->getClubCount())} + {/if} +
{/block} @@ -45,8 +51,19 @@ Фотография группы {/block} -{block name} - {$x->getName()} +{block infotable} + + + + + + + + + + + +
Название: {$x->getName()}
Размер:{tr("participants", $x->getFollowersCount())}
{/block} {block description} @@ -56,13 +73,25 @@ {block actions} {var clubPinned = $thisUser->isClubPinned($x)} {if $x->canBeModifiedBy($thisUser ?? NULL) && ($clubPinned || $thisUser->getPinnedClubCount() <= 10)} - + + {_check_community} + + + {if $clubPinned} {_remove_from_left_menu} {else} {_add_to_left_menu} {/if} + +
+ + + + +
+ {/if} {/block} @@ -87,4 +116,4 @@ {/if} -{/block} +{/block} \ No newline at end of file diff --git a/Web/Presenters/templates/components/paginator.xml b/Web/Presenters/templates/components/paginator.xml index cf717e23..7c14e7e4 100644 --- a/Web/Presenters/templates/components/paginator.xml +++ b/Web/Presenters/templates/components/paginator.xml @@ -1,16 +1,18 @@ {var $space = 2} {var $pageCount = ceil($conf->count / $conf->perPage)} -
- {if $conf->page > $space} - « - {/if} - {for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++} - {if $j > 0 && $j <= $pageCount} - {$j} +
+
+ {if $conf->page > $space} + « {/if} - {/for} - {if $conf->page <= $pageCount-$space} - » - {/if} + {for $j = $conf->page - ($space-1); $j <= $conf->page + ($space-1); $j++} + {if $j > 0 && $j <= $pageCount} + {$j} + {/if} + {/for} + {if $conf->page <= $pageCount-$space} + » + {/if} +
diff --git a/Web/static/css/style.css b/Web/static/css/style.css index ce0b3543..6ab60b75 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -1852,3 +1852,16 @@ body.scrolled .toTop:hover { #gp_container h4 { font-size: 11px; } + +.container_gray .content:last-child { + margin-bottom: 0; + } + +.group_info { + padding: 0 0 0 5px !important; + } + +.group_info .label { + width: auto !important; + padding-right: 5px; +} \ No newline at end of file diff --git a/locales/ru.strings b/locales/ru.strings index 6c14252d..b21acfed 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -225,6 +225,7 @@ "subscriptions" = "Подписки"; "join_community" = "Вступить в группу"; "leave_community" = "Выйти из группы"; +"check_community" = "Просмотр группы"; "min_6_community" = "Название должно быть не менее 6 символов"; "participants" = "Участники"; "groups" = "Группы"; @@ -279,6 +280,10 @@ "groups_many" = "$1 групп"; "groups_other" = "$1 групп"; +"groups_list_zero" = "Вы не состоите ни в одной группе"; +"groups_list_one" = "Вы состоите в одной группе"; +"groups_list_other" = "Вы состоите в $1 группах"; + "meetings_zero" = "Ни одной встречи"; "meetings_one" = "Одна встреча"; "meetings_few" = "$1 встречи";