From 3f1b852e506be13827d24a75803e1cadfd843d68 Mon Sep 17 00:00:00 2001 From: kosfurler Date: Tue, 1 Feb 2022 19:50:53 +0300 Subject: [PATCH] Layout: Made a brand new layout for notes list and update counter in video list --- Web/Presenters/templates/@listView.xml | 96 ++++++++++++------------ Web/Presenters/templates/Notes/List.xml | 95 ++++++++++++++++++----- Web/Presenters/templates/Videos/List.xml | 14 +++- Web/static/css/style.css | 13 +++- locales/en.strings | 1 + locales/ru.strings | 11 ++- 6 files changed, 161 insertions(+), 69 deletions(-) diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index aab6660e..839283b9 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -10,54 +10,58 @@ {include size, x => $dat} {/ifset} -
- {var data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} + {ifset specpage} + {include specpage, x => $dat} + {else} +
+ {var data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} - {if sizeof($data) > 0} -
- - - - - - - - -
- - {include preview, x => $dat} - - - {ifset infotable} - {include infotable, x => $dat} - {else} - - - {include name, x => $dat} - - -
- {include description, x => $dat} - {/ifset} -
-
- {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} + {if sizeof($data) > 0} +
+ + + + + + + + +
+ + {include preview, x => $dat} + + + {ifset infotable} + {include infotable, x => $dat} + {else} + + + {include name, x => $dat} + + +
+ {include description, x => $dat} + {/ifset} +
+
+ {include "components/paginator.xml", conf => (object) [ + "page" => $page, + "count" => $count, + "amount" => sizeof($data), + "perPage" => $perPage ?? OPENVK_DEFAULT_PER_PAGE, + "atBottom" => true, + ]} {else} - {include "components/nothing.xml"} - {/ifset} - {/if} -
+ {ifset customErrorMessage} + {include customErrorMessage} + {else} + {include "components/nothing.xml"} + {/ifset} + {/if} +
+ {/ifset} {ifset bottom} {include bottom} diff --git a/Web/Presenters/templates/Notes/List.xml b/Web/Presenters/templates/Notes/List.xml index 44d831f5..2fb31c0c 100644 --- a/Web/Presenters/templates/Notes/List.xml +++ b/Web/Presenters/templates/Notes/List.xml @@ -5,12 +5,25 @@ {block title}{_notes}{/block} {block header} - {$owner->getCanonicalName()} - » - {_notes} - -
- {_create_note} + {if isset($thisUser) && $thisUser->getId() == $owner->getId()} + {_my_notes} + {else} + + {$owner->getCanonicalName()} + » + {_notes} + {/if} +{/block} + +{block size} +
+
+ {tr("notes_list", $count)} + +  |  + {_create_note} + +
{/block} @@ -20,18 +33,66 @@ {* BEGIN ELEMENTS DESCRIPTION *} -{block link|strip|stripHtml} - /note{$x->getPrettyId()} -{/block} +{block specpage} +
-{block preview} -
{_note}
-{/block} + {var data = is_array($iterator) ? $iterator : iterator_to_array($iterator)} + {if sizeof($data) > 0} -{block name} - {$x->getName()} -{/block} +
+
+ + + +
+ +
+ + {else} + {if isset($thisUser) && $thisUser->getId() == $owner->getId()} + +

{_welcome}

{_notes_start_screen}
+ + {else} + {ifset customErrorMessage} + {include ../customErrorMessage} + {else} + {include ../components/nothing.xml} + {/ifset} + {/if} + {/if} +
{/block} diff --git a/Web/Presenters/templates/Videos/List.xml b/Web/Presenters/templates/Videos/List.xml index 0f04b482..be9e3cad 100644 --- a/Web/Presenters/templates/Videos/List.xml +++ b/Web/Presenters/templates/Videos/List.xml @@ -8,9 +8,17 @@ {block header} {$user->getCanonicalName()} » {_"videos"} - -
- {_"upload_video"} +{/block} + +{block size} +
+
+ {tr("videos", $count)} + +  |  + {_upload_video} + +
{/block} diff --git a/Web/static/css/style.css b/Web/static/css/style.css index 6ab60b75..5473d1d6 100644 --- a/Web/static/css/style.css +++ b/Web/static/css/style.css @@ -1864,4 +1864,15 @@ body.scrolled .toTop:hover { .group_info .label { width: auto !important; padding-right: 5px; -} \ No newline at end of file +} + +table td[width="120"] { + text-align: right; +} + +.profile_thumb { + padding: 0px 10px 0px 0px; + width: 50px; + display: inline-block; + vertical-align: top; +} diff --git a/locales/en.strings b/locales/en.strings index bc5212d0..35c74464 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -310,6 +310,7 @@ "notes_zero" = "No notes"; "notes_one" = "$1 note"; "notes_other" = "$1 notes"; +"notes_start_screen" = "With notes, you can share your events with friends and see what's going on with them."; /* Menus */ diff --git a/locales/ru.strings b/locales/ru.strings index b21acfed..9fc20c03 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -324,9 +324,10 @@ "note" = "Заметка"; "name_note" = "Название"; "text_note" = "Содержание"; -"create_note" = "Создать заметку"; +"create_note" = "Добавить запись"; "edit_note" = "Редактировать заметку"; "actions" = "Действия"; +"notes_start_screen" = "С помощью заметок Вы можете делиться событиями из жизни с друзьями, а так же быть в курсе того, что происходит у них."; "edited" = "Отредактировано"; @@ -336,6 +337,12 @@ "notes_many" = "$1 заметок"; "notes_other" = "$1 заметок"; +"notes_list_zero" = "Не найдено ни одной заметки"; +"notes_list_one" = "Найдена одна заметка"; +"notes_list_few" = "Найдено $1 заметки"; +"notes_list_many" = "Найдено $1 заметок"; +"notes_list_other" = "Найдено $1 заметок"; + /* Menus */ "edit_button" = "ред."; @@ -502,7 +509,7 @@ "info_uploaded_by" = "Загрузил"; "info_upload_date" = "Дата загрузки"; -"videos_zero" = "Ни одной видеозаписи"; +"videos_zero" = "Нет видео"; "videos_one" = "Одна видеозапись"; "videos_few" = "$1 видеозаписи"; "videos_many" = "$1 видеозаписей";