diff --git a/app/Auth/User.php b/app/Auth/User.php index 12f022b06..259b8eec0 100644 --- a/app/Auth/User.php +++ b/app/Auth/User.php @@ -216,12 +216,12 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon */ public function getShortName($chars = 8) { - if (strlen($this->name) <= $chars) { + if (mb_strlen($this->name) <= $chars) { return $this->name; } $splitName = explode(' ', $this->name); - if (strlen($splitName[0]) <= $chars) { + if (mb_strlen($splitName[0]) <= $chars) { return $splitName[0]; } diff --git a/app/Console/Commands/CreateAdmin.php b/app/Console/Commands/CreateAdmin.php index 90c1ddb1c..e67da8717 100644 --- a/app/Console/Commands/CreateAdmin.php +++ b/app/Console/Commands/CreateAdmin.php @@ -49,7 +49,7 @@ class CreateAdmin extends Command if (empty($email)) { $email = $this->ask('Please specify an email address for the new admin user'); } - if (strlen($email) < 5 || !filter_var($email, FILTER_VALIDATE_EMAIL)) { + if (mb_strlen($email) < 5 || !filter_var($email, FILTER_VALIDATE_EMAIL)) { return $this->error('Invalid email address provided'); } @@ -61,7 +61,7 @@ class CreateAdmin extends Command if (empty($name)) { $name = $this->ask('Please specify an name for the new admin user'); } - if (strlen($name) < 2) { + if (mb_strlen($name) < 2) { return $this->error('Invalid name provided'); } @@ -69,7 +69,7 @@ class CreateAdmin extends Command if (empty($password)) { $password = $this->secret('Please specify a password for the new admin user'); } - if (strlen($password) < 5) { + if (mb_strlen($password) < 5) { return $this->error('Invalid password provided, Must be at least 5 characters'); } diff --git a/app/Entities/Book.php b/app/Entities/Book.php index 77cacf632..decdde9dc 100644 --- a/app/Entities/Book.php +++ b/app/Entities/Book.php @@ -104,7 +104,7 @@ class Book extends Entity public function getExcerpt(int $length = 100) { $description = $this->description; - return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description; + return mb_strlen($description) > $length ? mb_substr($description, 0, $length-3) . '...' : $description; } /** diff --git a/app/Entities/Bookshelf.php b/app/Entities/Bookshelf.php index 1de767fec..c8f8b990c 100644 --- a/app/Entities/Bookshelf.php +++ b/app/Entities/Bookshelf.php @@ -83,7 +83,7 @@ class Bookshelf extends Entity public function getExcerpt(int $length = 100) { $description = $this->description; - return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description; + return mb_strlen($description) > $length ? mb_substr($description, 0, $length-3) . '...' : $description; } /** diff --git a/app/Entities/Chapter.php b/app/Entities/Chapter.php index bdacb7c9d..936404758 100644 --- a/app/Entities/Chapter.php +++ b/app/Entities/Chapter.php @@ -56,7 +56,7 @@ class Chapter extends Entity public function getExcerpt(int $length = 100) { $description = $this->text ?? $this->description; - return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description; + return mb_strlen($description) > $length ? mb_substr($description, 0, $length-3) . '...' : $description; } /** diff --git a/app/Entities/Repos/EntityRepo.php b/app/Entities/Repos/EntityRepo.php index a0934530f..4edd61723 100644 --- a/app/Entities/Repos/EntityRepo.php +++ b/app/Entities/Repos/EntityRepo.php @@ -852,10 +852,13 @@ class EntityRepo */ public function destroyPage(Page $page) { - // Check if set as custom homepage + // Check if set as custom homepage & remove setting if not used or throw error if active $customHome = setting('app-homepage', '0:'); if (intval($page->id) === intval(explode(':', $customHome)[0])) { - throw new NotifyException(trans('errors.page_custom_home_deletion'), $page->getUrl()); + if (setting('app-homepage-type') === 'page') { + throw new NotifyException(trans('errors.page_custom_home_deletion'), $page->getUrl()); + } + setting()->remove('app-homepage'); } $this->destroyEntityCommonRelations($page); diff --git a/app/Entities/Repos/PageRepo.php b/app/Entities/Repos/PageRepo.php index 1aeee8dae..e6cb309e7 100644 --- a/app/Entities/Repos/PageRepo.php +++ b/app/Entities/Repos/PageRepo.php @@ -192,7 +192,7 @@ class PageRepo extends EntityRepo // Create an unique id for the element // Uses the content as a basis to ensure output is the same every time // the same content is passed through. - $contentId = 'bkmrk-' . substr(strtolower(preg_replace('/\s+/', '-', trim($element->nodeValue))), 0, 20); + $contentId = 'bkmrk-' . mb_substr(strtolower(preg_replace('/\s+/', '-', trim($element->nodeValue))), 0, 20); $newId = urlencode($contentId); $loopIndex = 0; @@ -422,25 +422,29 @@ class PageRepo extends EntityRepo return []; } - $tree = collect([]); - foreach ($headers as $header) { - $text = $header->nodeValue; - $tree->push([ + $tree = collect($headers)->map(function($header) { + $text = trim(str_replace("\xc2\xa0", '', $header->nodeValue)); + if (mb_strlen($text) > 30) { + $text = mb_substr($text, 0, 27) . '...'; + } + + return [ 'nodeName' => strtolower($header->nodeName), 'level' => intval(str_replace('h', '', $header->nodeName)), 'link' => '#' . $header->getAttribute('id'), - 'text' => strlen($text) > 30 ? substr($text, 0, 27) . '...' : $text - ]); - } + 'text' => $text, + ]; + })->filter(function($header) { + return mb_strlen($header['text']) > 0; + }); // Normalise headers if only smaller headers have been used - if (count($tree) > 0) { - $minLevel = $tree->pluck('level')->min(); - $tree = $tree->map(function ($header) use ($minLevel) { - $header['level'] -= ($minLevel - 2); - return $header; - }); - } + $minLevel = $tree->pluck('level')->min(); + $tree = $tree->map(function ($header) use ($minLevel) { + $header['level'] -= ($minLevel - 2); + return $header; + }); + return $tree->toArray(); } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 79d696652..d57105b62 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -142,7 +142,7 @@ class RegisterController extends Controller if ($registrationRestrict) { $restrictedEmailDomains = explode(',', str_replace(' ', '', $registrationRestrict)); - $userEmailDomain = $domain = substr(strrchr($userData['email'], "@"), 1); + $userEmailDomain = $domain = mb_substr(mb_strrchr($userData['email'], "@"), 1); if (!in_array($userEmailDomain, $restrictedEmailDomains)) { throw new UserRegistrationException(trans('auth.registration_email_domain_invalid'), '/register'); } diff --git a/app/Uploads/ImageRepo.php b/app/Uploads/ImageRepo.php index 38dd3066b..da0b7d379 100644 --- a/app/Uploads/ImageRepo.php +++ b/app/Uploads/ImageRepo.php @@ -230,7 +230,7 @@ class ImageRepo { $image->thumbs = [ 'gallery' => $this->getThumbnail($image, 150, 150, false), - 'display' => $this->getThumbnail($image, 840, null, true) + 'display' => $this->getThumbnail($image, 1680, null, true) ]; } diff --git a/app/helpers.php b/app/helpers.php index 65b61c9f0..8cb3fa3f4 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -123,10 +123,11 @@ function baseUrl($path, $forceAppDomain = false) // Remove non-specified domain if forced and we have a domain if ($isFullUrl && $forceAppDomain) { if (!empty($base) && strpos($path, $base) === 0) { - $path = trim(substr($path, strlen($base) - 1)); + $path = mb_substr($path, mb_strlen($base)); + } else { + $explodedPath = explode('/', $path); + $path = implode('/', array_splice($explodedPath, 3)); } - $explodedPath = explode('/', $path); - $path = implode('/', array_splice($explodedPath, 3)); } // Return normal url path if not specified in config @@ -134,7 +135,7 @@ function baseUrl($path, $forceAppDomain = false) return url($path); } - return $base . '/' . $path; + return $base . '/' . ltrim($path, '/'); } /** diff --git a/resources/assets/js/components/markdown-editor.js b/resources/assets/js/components/markdown-editor.js index 770b4af50..5fa16ef6e 100644 --- a/resources/assets/js/components/markdown-editor.js +++ b/resources/assets/js/components/markdown-editor.js @@ -180,9 +180,20 @@ class MarkdownEditor { // Handle image paste cm.on('paste', (cm, event) => { - if (!event.clipboardData || !event.clipboardData.items) return; - for (let i = 0; i < event.clipboardData.items.length; i++) { - uploadImage(event.clipboardData.items[i].getAsFile()); + const clipboardItems = event.clipboardData.items; + if (!event.clipboardData || !clipboardItems) return; + + // Don't handle if clipboard includes text content + for (let clipboardItem of clipboardItems) { + if (clipboardItem.type.includes('text/')) { + return; + } + } + + for (let clipboardItem of clipboardItems) { + if (clipboardItem.type.includes("image")) { + uploadImage(clipboardItem.getAsFile()); + } } }); diff --git a/resources/assets/js/components/page-display.js b/resources/assets/js/components/page-display.js index e87966d7d..513a07b8d 100644 --- a/resources/assets/js/components/page-display.js +++ b/resources/assets/js/components/page-display.js @@ -20,6 +20,7 @@ class PageDisplay { // Sidebar page nav click event $('.sidebar-page-nav').on('click', 'a', event => { + window.components['tri-layout'][0].showContent(); this.goToText(event.target.getAttribute('href').substr(1)); }); } diff --git a/resources/assets/js/components/tri-layout.js b/resources/assets/js/components/tri-layout.js index 0ae7df976..5cd49b74f 100644 --- a/resources/assets/js/components/tri-layout.js +++ b/resources/assets/js/components/tri-layout.js @@ -66,28 +66,44 @@ class TriLayout { */ mobileTabClick(event) { const tab = event.target.getAttribute('tri-layout-mobile-tab'); + this.showTab(tab); + } + + /** + * Show the content tab. + * Used by the page-display component. + */ + showContent() { + this.showTab('content'); + } + + /** + * Show the given tab + * @param tabName + */ + showTab(tabName) { this.scrollCache[this.lastTabShown] = document.documentElement.scrollTop; // Set tab status - const activeTabs = document.querySelectorAll('.tri-layout-mobile-tab.active'); - for (let tab of activeTabs) { - tab.classList.remove('active'); + const tabs = document.querySelectorAll('.tri-layout-mobile-tab'); + for (let tab of tabs) { + const isActive = (tab.getAttribute('tri-layout-mobile-tab') === tabName); + tab.classList.toggle('active', isActive); } - event.target.classList.add('active'); // Toggle section - const showInfo = (tab === 'info'); + const showInfo = (tabName === 'info'); this.elem.classList.toggle('show-info', showInfo); // Set the scroll position from cache const pageHeader = document.querySelector('header'); const defaultScrollTop = pageHeader.getBoundingClientRect().bottom; - document.documentElement.scrollTop = this.scrollCache[tab] || defaultScrollTop; + document.documentElement.scrollTop = this.scrollCache[tabName] || defaultScrollTop; setTimeout(() => { - document.documentElement.scrollTop = this.scrollCache[tab] || defaultScrollTop; + document.documentElement.scrollTop = this.scrollCache[tabName] || defaultScrollTop; }, 50); - this.lastTabShown = tab; + this.lastTabShown = tabName; } } diff --git a/resources/assets/js/components/wysiwyg-editor.js b/resources/assets/js/components/wysiwyg-editor.js index 46fe967e0..614cfb80f 100644 --- a/resources/assets/js/components/wysiwyg-editor.js +++ b/resources/assets/js/components/wysiwyg-editor.js @@ -8,11 +8,20 @@ import DrawIO from "../services/drawio"; * @param editor */ function editorPaste(event, editor, wysiwygComponent) { - if (!event.clipboardData || !event.clipboardData.items) return; + const clipboardItems = event.clipboardData.items; + if (!event.clipboardData || !clipboardItems) return; - for (let clipboardItem of event.clipboardData.items) { - if (clipboardItem.type.indexOf("image") === -1) continue; - event.preventDefault(); + // Don't handle if clipboard includes text content + for (let clipboardItem of clipboardItems) { + if (clipboardItem.type.includes('text/')) { + return; + } + } + + for (let clipboardItem of clipboardItems) { + if (!clipboardItem.type.includes("image")) { + continue; + } const id = "image-" + Math.random().toString(16).slice(2); const loadingImage = window.baseUrl('/loading.gif'); diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss index c43ff7f78..032b1cbeb 100644 --- a/resources/assets/sass/_blocks.scss +++ b/resources/assets/sass/_blocks.scss @@ -181,7 +181,7 @@ margin-left: auto; margin-right: auto; margin-bottom: $-xl; - overflow: auto; + overflow: initial; min-height: 60vh; &.auto-height { min-height: 0; @@ -202,7 +202,7 @@ } @include smaller-than($s) { .content-wrap.card { - padding: $-m $-s; + padding: $-m $-m; } } diff --git a/resources/assets/sass/_layout.scss b/resources/assets/sass/_layout.scss index 9bb4e1c70..d9fff3c41 100644 --- a/resources/assets/sass/_layout.scss +++ b/resources/assets/sass/_layout.scss @@ -59,7 +59,7 @@ } @include smaller-than($m) { - .grid.third { + .grid.third:not(.no-break) { grid-template-columns: 1fr 1fr; } .grid.half:not(.no-break), .grid.left-focus:not(.no-break), .grid.right-focus:not(.no-break) { @@ -81,7 +81,7 @@ } @include smaller-than($s) { - .grid.third { + .grid.third:not(.no-break) { grid-template-columns: 1fr; } } @@ -257,10 +257,6 @@ body.flexbox { padding-left: $-m; padding-right: $-m; } - .tri-layout-right-contents > div, .tri-layout-left-contents > div { - opacity: 0.6; - z-index: 0; - } .tri-layout-left > *, .tri-layout-right > * { display: none; pointer-events: none; @@ -298,6 +294,13 @@ body.flexbox { .tri-layout-mobile-tabs { display: none; } + .tri-layout-left-contents > div, .tri-layout-right-contents > div { + opacity: 0.6; + transition: opacity ease-in-out 120ms; + &:hover { + opacity: 1; + } + } } @include smaller-than($m) { @@ -305,12 +308,4 @@ body.flexbox { margin-left: 0; margin-right: 0; } -} - -.tri-layout-left-contents > div, .tri-layout-right-contents > div { - opacity: 0.6; - transition: opacity ease-in-out 120ms; - &:hover { - opacity: 1; - } } \ No newline at end of file diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 9c141232e..cafbfa781 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -164,15 +164,21 @@ padding-left: 1rem; padding-right: 0; } + .entity-list-item { padding-top: $-xxs; padding-bottom: $-xxs; + background-clip: content-box; + border-radius: 0 3px 3px 0; .content { padding-top: $-xs; padding-bottom: $-xs; max-width: calc(100% - 20px); } } + .entity-list-item.selected { + background-color: rgba(0, 0, 0, 0.08); + } .entity-list-item.no-hover { margin-top: -$-xs; padding-right: 0; diff --git a/resources/assets/sass/_pages.scss b/resources/assets/sass/_pages.scss index d02f59e37..c58f6ef47 100755 --- a/resources/assets/sass/_pages.scss +++ b/resources/assets/sass/_pages.scss @@ -20,11 +20,10 @@ } } -@include smaller-than($m) { +@include smaller-than($s) { .page-edit-toolbar { overflow-x: scroll; overflow-y: visible; - z-index: 12; } .page-edit-toolbar .grid.third { display: block; @@ -35,24 +34,21 @@ } } -@include smaller-than($m) { - .page-edit-toolbar #save-button { - position: fixed; - z-index: 30; - border-radius: 50%; - width: 56px; - height: 56px; - font-size: 24px; - right: $-m; - bottom: $-s; - box-shadow: $bs-hover; - background-color: currentColor; - svg { - fill: #FFF; - } - span { - display: none; - } +.page-save-mobile-button { + position: fixed; + z-index: 30; + border-radius: 50%; + width: 56px; + height: 56px; + font-size: 24px; + right: $-m; + bottom: $-s; + box-shadow: $bs-hover; + background-color: currentColor; + text-align: center; + svg { + fill: #FFF; + margin-right: 0; } } diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index 41c99bbe5..1a613898e 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -291,15 +291,27 @@ li.checkbox-item, li.task-list-item { .text-center { text-align: center; } - .text-left { text-align: left; } - .text-right { text-align: right; } +@each $sizeLetter, $size in $screen-sizes { + @include larger-than($size) { + .text-#{$sizeLetter}-center { + text-align: center; + } + .text-#{$sizeLetter}-left { + text-align: left; + } + .text-#{$sizeLetter}-right { + text-align: right; + } + } +} + .text-bigger { font-size: 1.1em; } diff --git a/resources/lang/nl/activities.php b/resources/lang/nl/activities.php index f6c3db309..021b6d21e 100644 --- a/resources/lang/nl/activities.php +++ b/resources/lang/nl/activities.php @@ -36,6 +36,14 @@ return [ 'book_delete_notification' => 'Boek Succesvol Verwijderd', 'book_sort' => 'sorteerde boek', 'book_sort_notification' => 'Boek Succesvol Gesorteerd', + + // Bookshelves + 'bookshelf_create' => 'maakte Boekenplank', + 'bookshelf_create_notification' => 'Boekenplank Succesvol Aangemaakt', + 'bookshelf_update' => 'veranderde boekenplank', + 'bookshelf_update_notification' => 'Boekenplank Succesvol Bijgewerkt', + 'bookshelf_delete' => 'verwijderde boekenplank', + 'bookshelf_delete_notification' => 'Boekenplank Succesvol Verwijderd', // Other 'commented_on' => 'reactie op', diff --git a/resources/lang/nl/common.php b/resources/lang/nl/common.php index fdfb90fb2..d44bd514d 100644 --- a/resources/lang/nl/common.php +++ b/resources/lang/nl/common.php @@ -1,35 +1,35 @@ 'Annuleren', 'confirm' => 'Bevestigen', 'back' => 'Terug', 'save' => 'Opslaan', 'continue' => 'Doorgaan', 'select' => 'Kies', + 'toggle_all' => 'Toggle Alles', 'more' => 'Meer', - - /** - * Form Labels - */ + + // Form Labels 'name' => 'Naam', 'description' => 'Beschrijving', 'role' => 'Rol', 'cover_image' => 'Omslagfoto', 'cover_image_description' => 'Deze afbeelding moet ongeveer 300x170px zijn.', - /** - * Actions - */ + + // Actions 'actions' => 'Acties', 'view' => 'Bekijk', + 'view_all' => 'Bekijk Alle', 'create' => 'Aanmaken', 'update' => 'Update', 'edit' => 'Bewerk', 'sort' => 'Sorteer', 'move' => 'Verplaats', + 'copy' => 'Kopiëren', + 'reply' => 'Beantwoorden', 'delete' => 'Verwijder', 'search' => 'Zoek', 'search_clear' => 'Zoekopdracht wissen', @@ -37,15 +37,22 @@ return [ 'remove' => 'Verwijderen', 'add' => 'Toevoegen', - /** - * Misc - */ + // Sort Options + 'sort_name' => 'Naam', + 'sort_created_at' => 'Aanmaakdatum', + 'sort_updated_at' => 'Gewijzigd op', + + // Misc 'deleted_user' => 'Verwijderde gebruiker', 'no_activity' => 'Geen activiteiten', 'no_items' => 'Geen items beschikbaar', 'back_to_top' => 'Terug naar boven', 'toggle_details' => 'Details Weergeven', 'toggle_thumbnails' => 'Thumbnails Weergeven', + 'details' => 'Details', + 'grid_view' => 'Grid weergave', + 'list_view' => 'Lijst weergave', + 'default' => 'Standaard', /** * Header @@ -53,9 +60,13 @@ return [ 'view_profile' => 'Profiel Weergeven', 'edit_profile' => 'Profiel Bewerken', + // Layout tabs + 'tab_info' => 'Info', + 'tab_content' => 'Inhoud', + /** * Email Content */ 'email_action_help' => 'Als je de knop ":actionText" niet werkt, kopieer en plak de onderstaande URL in je web browser:', 'email_rights' => 'Alle rechten voorbehouden', -]; \ No newline at end of file +]; diff --git a/resources/lang/nl/entities.php b/resources/lang/nl/entities.php index 29bb11a37..34142ad7f 100644 --- a/resources/lang/nl/entities.php +++ b/resources/lang/nl/entities.php @@ -65,16 +65,45 @@ return [ 'search_set_date' => 'Zet datum', 'search_update' => 'Update zoekresultaten', - /** - * Books - */ + // Shelves + 'shelf' => 'Boekenplank', + 'shelves' => 'Boekenplanken', + 'x_shelves' => ':count Boekenplank|:count Boekenplanken', + 'shelves_long' => 'Boekenplanken', + 'shelves_empty' => 'Er zijn geen boekenplanken aangemaakt', + 'shelves_create' => 'Nieuwe Boekenplank Aanmaken', + 'shelves_popular' => 'Populaire Boekenplanken', + 'shelves_new' => 'Nieuwe Boekenplanken', + 'shelves_popular_empty' => 'De meest populaire boekenplanken worden hier weergegeven.', + 'shelves_new_empty' => 'De meest recent aangemaakt boekenplanken worden hier weergeven.', + 'shelves_save' => 'Boekenplanken Opslaan', + 'shelves_books' => 'Boeken op deze plank', + 'shelves_add_books' => 'Toevoegen boeken aan deze plank', + 'shelves_drag_books' => 'Sleep boeken hier naartoe om deze toe te voegen aan deze plank', + 'shelves_empty_contents' => 'Er zijn geen boeken aan deze plank toegekend', + 'shelves_edit_and_assign' => 'Bewerk boekenplank om boeken toe te kennen.', + 'shelves_edit_named' => 'Bewerk Boekenplank :name', + 'shelves_edit' => 'Bewerk Boekenplank', + 'shelves_delete' => 'Verwijder Boekenplank', + 'shelves_delete_named' => 'Verwijder Boekenplank :name', + 'shelves_delete_explain' => "Deze actie verwijdert de boekenplank met naam ':name'. De boeken op deze plank worden niet verwijderd.", + 'shelves_delete_confirmation' => 'Weet je zeker dat je deze boekenplank wilt verwijderen?', + 'shelves_permissions' => 'Boekenplank Permissies', + 'shelves_permissions_updated' => 'Boekenplank Permissies Opgeslagen', + 'shelves_permissions_active' => 'Boekenplank Permissies Actief', + 'shelves_copy_permissions_to_books' => 'Kopieer Permissies naar Boeken', + 'shelves_copy_permissions' => 'Kopieer Permissies', + 'shelves_copy_permissions_explain' => 'Met deze actie worden de permissies van deze boekenplank gekopieerd naar alle boeken op de plank. Voordat deze actie wordt uitgevoerd, zorg dat de wijzigingen in de permissies van deze boekenplank zijn opgeslagen.', + 'shelves_copy_permission_success' => 'Boekenplank permissies gekopieerd naar :count boeken', + + // Books 'book' => 'Boek', 'books' => 'Boeken', - 'x_books' => ':count Boek|:count Boeken', + 'x_books' => ':count Boek|:count Boeken', 'books_empty' => 'Er zijn geen boeken aangemaakt', 'books_popular' => 'Populaire Boeken', 'books_recent' => 'Recente Boeken', - 'books_new' => 'Nieuwe Boeken', + 'books_new' => 'Nieuwe Boeken', 'books_popular_empty' => 'De meest populaire boeken worden hier weergegeven.', 'books_create' => 'Nieuw Boek Aanmaken', 'books_delete' => 'Boek Verwijderen', diff --git a/resources/lang/ru/common.php b/resources/lang/ru/common.php index 73853af8e..b4cef7764 100644 --- a/resources/lang/ru/common.php +++ b/resources/lang/ru/common.php @@ -26,6 +26,7 @@ return [ */ 'actions' => 'Действия', 'view' => 'Просмотр', + 'view_all' => 'Показать все', 'create' => 'Создание', 'update' => 'Обновление', 'edit' => 'Редактировать', @@ -39,6 +40,11 @@ return [ 'reset' => 'Сбросить', 'remove' => 'Удалить', 'add' => 'Добавить', + + // Sort Options + 'sort_name' => 'По имени', + 'sort_created_at' => 'По дате создания', + 'sort_updated_at' => 'По дате обновления', /** * Misc @@ -46,18 +52,23 @@ return [ 'deleted_user' => 'Удаленный пользователь', 'no_activity' => 'Нет действий для просмотра', 'no_items' => 'Нет доступных элементов', - 'back_to_top' => 'Вернуться наверх', + 'back_to_top' => 'Наверх', 'toggle_details' => 'Подробности', 'toggle_thumbnails' => 'Миниатюры', 'details' => 'Детали', 'grid_view' => 'Вид сеткой', 'list_view' => 'Вид списком', + 'default' => 'По умолчанию', /** * Header */ 'view_profile' => 'Просмотреть профиль', 'edit_profile' => 'Редактировать профиль', + + // Layout tabs + 'tab_info' => 'Информация', + 'tab_content' => 'Содержание', /** * Email Content diff --git a/resources/lang/ru/entities.php b/resources/lang/ru/entities.php index b72297684..448e4e6a1 100644 --- a/resources/lang/ru/entities.php +++ b/resources/lang/ru/entities.php @@ -105,11 +105,13 @@ return [ */ 'shelf' => 'Полка', 'shelves' => 'Полки', + 'x_shelves' => ':count полок|:count полок', 'shelves_long' => 'Книжные полки', 'shelves_empty' => 'Полки не созданы', 'shelves_create' => 'Создать новую полку', 'shelves_popular' => 'Популярные полки', 'shelves_new' => 'Новые полки', + 'shelves_new_action' => 'Новая полка', 'shelves_popular_empty' => 'Популярные полки появятся здесь.', 'shelves_new_empty' => 'Последние созданные полки появятся здесь.', 'shelves_save' => 'Сохранить полку', diff --git a/resources/lang/ru/settings.php b/resources/lang/ru/settings.php index cc5ca3955..0ff1b969b 100755 --- a/resources/lang/ru/settings.php +++ b/resources/lang/ru/settings.php @@ -1,77 +1,73 @@ 'Настройки', 'settings_save' => 'Сохранить настройки', 'settings_save_success' => 'Настройки сохранены', - /** - * App settings - */ - - 'app_settings' => 'Настройки приложения', + // App Settings + 'app_customization' => 'Настройки', + 'app_features_security' => 'Функции & Безопасность', 'app_name' => 'Имя приложения', - 'app_name_desc' => 'Это имя отображается в заголовке и в любых письмах.', - 'app_name_header' => 'Показать имя приложения в заголовке?', + 'app_name_desc' => 'Имя отображается в заголовке email отправленных системой.', + 'app_name_header' => 'Отображать имя приложения в заголовке', + 'app_public_access' => 'Публичный доступ', + 'app_public_access_desc' => 'Включение этой опции позволит неавторизованным посетителям получить доступ к содержимому вашего BookStack.', + 'app_public_access_desc_guest' => 'Публичный доступ контролируется через настройки пользователя "Guest"', + 'app_public_access_toggle' => 'Разрешить публичный доступ', 'app_public_viewing' => 'Разрешить публичный просмотр?', - 'app_secure_images' => 'Включить загрузку изображений с повышенной безопасностью?', - 'app_secure_images_desc' => 'Из соображений производительности все изображения являются общедоступными. Этот параметр добавляет случайную сложную строку перед образами изображений. Убедитесь, что индексация каталогов не включена, чтобы предотвратить к ним легкий доступ.', + 'app_secure_images' => 'Загрузка изображений с высоким уровнем безопасности.', + 'app_secure_images_toggle' => 'Включить загрузку изображений с высоким уровнем безопасности', + 'app_secure_images_desc' => 'Для высокой производительности все изображения являются общедоступными. Этот параметр добавляет случайную строку перед URL изображения. Убедитесь, что индексация каталогов отключена, для предотвращения легкого доступа.', 'app_editor' => 'Редактор страницы', 'app_editor_desc' => 'Выберите, какой редактор будет использоваться всеми пользователями для редактирования страниц.', 'app_custom_html' => 'Пользовательский контент заголовка HTML', 'app_custom_html_desc' => 'Любой контент, добавленный здесь, будет вставлен в нижнюю часть раздела
каждой страницы. Это удобно для переопределения стилей или добавления кода аналитики.', 'app_logo' => 'Лого приложения', 'app_logo_desc' => 'Это изображение должно быть 43px в высоту.{{ $bookChild->description }}
+{{ $bookChild->text }}
@if(count($bookChild->pages) > 0) @foreach($bookChild->pages as $page) diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index 38286c201..61d998489 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -1,7 +1,5 @@ @extends('tri-layout') -@section('container-classes', 'mt-xl') - @section('body') @include('books.list', ['books' => $books, 'view' => $view]) @stop diff --git a/resources/views/books/list.blade.php b/resources/views/books/list.blade.php index 91a2c716e..93d927ec7 100644 --- a/resources/views/books/list.blade.php +++ b/resources/views/books/list.blade.php @@ -1,8 +1,8 @@
{{ trans_choice('entities.comment_count', count($page->comments), ['count' => count($page->comments)]) }}
@if (count($page->comments) === 0) -{{ trans('common.actions') }}
-{{ trans('common.actions') }}
+{{ trans('common.actions') }}
-{{ trans('common.actions') }}
+{{ trans('common.actions') }}
-{{ trans('common.actions') }}
+{{ trans('entities.search_results') }}
+{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}
Hello