diff --git a/assets/controllers/inline-edit-book-controller.js b/assets/controllers/inline-edit-book-controller.js new file mode 100644 index 00000000..10f0343b --- /dev/null +++ b/assets/controllers/inline-edit-book-controller.js @@ -0,0 +1,21 @@ +import { Controller } from '@hotwired/stimulus'; +import { getComponent } from '@symfony/ux-live-component'; + +/* + * This is an example Stimulus controller! + * + * Any element with a data-controller="hello" attribute will cause + * this controller to be executed. The name "hello" comes from the filename: + * hello_controller.js -> "hello" + * + * Delete this file or adapt it for your use! + */ + +export default class extends Controller { + async initialize() { + + window.addEventListener('manager:flush', () => location.reload()); + + } + +} \ No newline at end of file diff --git a/assets/styles/global.scss b/assets/styles/global.scss index f2e4552b..5458c95f 100644 --- a/assets/styles/global.scss +++ b/assets/styles/global.scss @@ -1,84 +1,7 @@ // the ~ allows you to reference things in node_modules @import "~bootstrap/scss/bootstrap"; -@import "~@fortawesome/fontawesome-free/scss/fontawesome"; -@import "~@fortawesome/fontawesome-free/scss/solid"; - -.bd-placeholder-img { - font-size: 1.125rem; - text-anchor: middle; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} - -@media (min-width: 768px) { - .bd-placeholder-img-lg { - font-size: 3.5rem; - } -} - -.b-example-divider { - width: 100%; - height: 3rem; - background-color: rgba(0, 0, 0, .1); - border: solid rgba(0, 0, 0, .15); - border-width: 1px 0; - box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); -} +@import "~bootstrap-icons/font/bootstrap-icons.css"; -.b-example-vr { - flex-shrink: 0; - width: 1.5rem; - height: 100vh; -} - -.bi { - vertical-align: -.125em; - fill: currentColor; -} - -.nav-scroller { - position: relative; - z-index: 2; - height: 2.75rem; - overflow-y: hidden; -} - -.nav-scroller .nav { - display: flex; - flex-wrap: nowrap; - padding-bottom: 1rem; - margin-top: -1px; - overflow-x: auto; - text-align: center; - white-space: nowrap; - -webkit-overflow-scrolling: touch; -} - -.btn-bd-primary { - --bd-violet-bg: #712cf9; - --bd-violet-rgb: 112.520718, 44.062154, 249.437846; - - --bs-btn-font-weight: 600; - --bs-btn-color: var(--bs-white); - --bs-btn-bg: var(--bd-violet-bg); - --bs-btn-border-color: var(--bd-violet-bg); - --bs-btn-hover-color: var(--bs-white); - --bs-btn-hover-bg: #6528e0; - --bs-btn-hover-border-color: #6528e0; - --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb); - --bs-btn-active-color: var(--bs-btn-hover-color); - --bs-btn-active-bg: #5a23c8; - --bs-btn-active-border-color: #5a23c8; -} -.bd-mode-toggle { - z-index: 1500; -} -.bi { - display: inline-block; - width: 1rem; - height: 1rem; -} /* * Sidebar @@ -86,7 +9,6 @@ @media (min-width: 768px) { .sidebar .offcanvas-lg { - position: -webkit-sticky; position: sticky; top: 48px; } @@ -97,12 +19,21 @@ font-weight: 500; } -.sidebar .nav-link.active { - color: #2470dc; +.sidebar .nav-item.active >.nav-link { + font-weight: bold; + color: brown; +} +.sidebar .icon-link .bi { + height: auto; +} + +.bi { + height: auto; } .sidebar-heading { font-size: .75rem; + color: brown; } /* diff --git a/config/packages/knp_menu.yaml b/config/packages/knp_menu.yaml index e69de29b..d8e5dd51 100644 --- a/config/packages/knp_menu.yaml +++ b/config/packages/knp_menu.yaml @@ -0,0 +1,3 @@ +knp_menu: + twig: + template: 'main_menu.html.twig' \ No newline at end of file diff --git a/config/packages/knp_paginator.yaml b/config/packages/knp_paginator.yaml index 97197c5a..c55956cf 100644 --- a/config/packages/knp_paginator.yaml +++ b/config/packages/knp_paginator.yaml @@ -1,5 +1,5 @@ knp_paginator: - page_range: 5 # number of links shown in the pagination menu (e.g: you have 10 pages, a page_range of 3, on the 5th page you'll see links to page 4, 5, 6) + page_range: 3 # number of links shown in the pagination menu (e.g: you have 10 pages, a page_range of 3, on the 5th page you'll see links to page 4, 5, 6) default_options: page_name: page # page query parameter name sort_field_name: sort # sort field query parameter name diff --git a/package-lock.json b/package-lock.json index 4d15697c..ad0c55b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "": { "license": "UNLICENSED", "dependencies": { - "@fortawesome/fontawesome-free": "^6.4" + "bootstrap-icons": "^1.10.5" }, "devDependencies": { "@babel/core": "^7.17.0", @@ -1572,25 +1572,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/runtime-corejs3": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.22.11.tgz", - "integrity": "sha512-NhfzUbdWbiE6fCFypbWCPu6AR8xre31EOPF7wwAIJEvGQ2avov04eymayWinCuyXmV1b0+jzoXP/HYzzUYdvwg==", - "dev": true, - "dependencies": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/runtime-corejs3/node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", - "dev": true - }, "node_modules/@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -1675,15 +1656,6 @@ "node": ">=10.0.0" } }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", - "integrity": "sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg==", - "hasInstallScript": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@hotwired/stimulus": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@hotwired/stimulus/-/stimulus-3.2.1.tgz", @@ -1939,12 +1911,26 @@ } }, "node_modules/@symfony/ux-autocomplete": { - "resolved": "vendor/symfony/ux-autocomplete/assets", - "link": true + "version": "1.0.0", + "resolved": "file:vendor/symfony/ux-autocomplete/assets", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@hotwired/stimulus": "^3.0.0", + "tom-select": "^2.2.2" + } }, "node_modules/@symfony/ux-live-component": { - "resolved": "vendor/symfony/ux-live-component/assets", - "link": true + "version": "1.0.0", + "resolved": "file:vendor/symfony/ux-live-component/assets", + "dev": true, + "license": "MIT", + "dependencies": { + "morphdom": "^2.6.1" + }, + "peerDependencies": { + "@hotwired/stimulus": "^3.0.0" + } }, "node_modules/@symfony/webpack-encore": { "version": "4.2.0", @@ -2211,111 +2197,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/@testing-library/dom": { - "version": "7.31.2", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz", - "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^4.2.2", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.6", - "lz-string": "^1.4.4", - "pretty-format": "^26.6.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@testing-library/dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@testing-library/dom/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@testing-library/dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@testing-library/dom/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/dom/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/user-event": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz", - "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.12.5" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" - } - }, "node_modules/@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -2357,12 +2238,6 @@ "optional": true, "peer": true }, - "node_modules/@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", - "dev": true - }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -2517,16 +2392,6 @@ "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "dev": true }, - "node_modules/@types/node-fetch": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.4.tgz", - "integrity": "sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, "node_modules/@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -2973,19 +2838,6 @@ "optional": true, "peer": true }, - "node_modules/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - }, - "engines": { - "node": ">=6.0" - } - }, "node_modules/array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -3030,12 +2882,6 @@ "webpack": ">=5.0.0" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, "node_modules/autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -3260,6 +3106,21 @@ "@popperjs/core": "^2.11.8" } }, + "node_modules/bootstrap-icons": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", + "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ] + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3523,18 +3384,6 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -3688,17 +3537,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-pure": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.32.1.tgz", - "integrity": "sha512-f52QZwkFVDPf7UEQZGHKx6NYxsxmVGJe5DIvbzOdRMJlmT6yv0KDjR8rmy3ngr/t5wU54c7Sp/qIJH0ppbhVpQ==", - "dev": true, - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -4130,15 +3968,6 @@ "node": ">=6" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -4193,12 +4022,6 @@ "node": ">=6" } }, - "node_modules/dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true - }, "node_modules/dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -4590,69 +4413,6 @@ "node": ">=0.8.0" } }, - "node_modules/fetch-mock": { - "version": "9.11.0", - "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-9.11.0.tgz", - "integrity": "sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q==", - "dev": true, - "dependencies": { - "@babel/core": "^7.0.0", - "@babel/runtime": "^7.0.0", - "core-js": "^3.0.0", - "debug": "^4.1.1", - "glob-to-regexp": "^0.4.0", - "is-subset": "^0.1.1", - "lodash.isequal": "^4.5.0", - "path-to-regexp": "^2.2.1", - "querystring": "^0.2.0", - "whatwg-url": "^6.5.0" - }, - "engines": { - "node": ">=4.0.0" - }, - "funding": { - "type": "charity", - "url": "https://www.justgiving.com/refugee-support-europe" - }, - "peerDependencies": { - "node-fetch": "*" - }, - "peerDependenciesMeta": { - "node-fetch": { - "optional": true - } - } - }, - "node_modules/fetch-mock-jest": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/fetch-mock-jest/-/fetch-mock-jest-1.5.1.tgz", - "integrity": "sha512-+utwzP8C+Pax1GSka3nFXILWMY3Er2L+s090FOgqVNrNCPp0fDqgXnAHAJf12PLHi0z4PhcTaZNTz8e7K3fjqQ==", - "dev": true, - "dependencies": { - "fetch-mock": "^9.11.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "funding": { - "type": "charity", - "url": "https://www.justgiving.com/refugee-support-europe" - }, - "peerDependencies": { - "node-fetch": "*" - }, - "peerDependenciesMeta": { - "node-fetch": { - "optional": true - } - } - }, - "node_modules/fetch-mock/node_modules/path-to-regexp": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz", - "integrity": "sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==", - "dev": true - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4748,20 +4508,6 @@ } } }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -5401,12 +5147,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==", - "dev": true - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -5714,24 +5454,12 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", - "dev": true - }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -5747,15 +5475,6 @@ "yallist": "^3.0.2" } }, - "node_modules/lz-string": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", - "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", - "dev": true, - "bin": { - "lz-string": "bin/bin.js" - } - }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -6030,48 +5749,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -7140,116 +6817,6 @@ "renderkid": "^3.0.0" } }, - "node_modules/pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/pretty-format/node_modules/@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/pretty-format/node_modules/@types/yargs": { - "version": "15.0.15", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.15.tgz", - "integrity": "sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/pretty-format/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/pretty-format/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -7302,16 +6869,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -7354,12 +6911,6 @@ "node": ">= 0.8" } }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -8324,20 +7875,11 @@ "@orchidjs/unicode-variants": "^1.0.4" }, "engines": { - "node": "*" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/tom-select" - } - }, - "node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tom-select" } }, "node_modules/ts-node": { @@ -8574,12 +8116,6 @@ "minimalistic-assert": "^1.0.0" } }, - "node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, "node_modules/webpack": { "version": "5.79.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.79.0.tgz", @@ -8940,17 +8476,6 @@ "node": ">=0.8.0" } }, - "node_modules/whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "dev": true, - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -9033,29 +8558,6 @@ "engines": { "node": ">=6" } - }, - "vendor/symfony/ux-autocomplete/assets": { - "name": "@symfony/ux-autocomplete", - "version": "0.0.1", - "dev": true, - "dependencies": { - "@hotwired/stimulus": "^3.0.0", - "fetch-mock-jest": "^1.5.1", - "tom-select": "^2.2.2" - } - }, - "vendor/symfony/ux-live-component/assets": { - "name": "@symfony/ux-live-component", - "version": "0.0.1", - "dev": true, - "dependencies": { - "@hotwired/stimulus": "^3.0.0", - "@testing-library/dom": "^7.31.0", - "@testing-library/user-event": "^13.1.9", - "@types/node-fetch": "^2.6.2", - "morphdom": "^2.6.1", - "node-fetch": "^2.6.1" - } } }, "dependencies": { @@ -10125,24 +9627,6 @@ "regenerator-runtime": "^0.13.11" } }, - "@babel/runtime-corejs3": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.22.11.tgz", - "integrity": "sha512-NhfzUbdWbiE6fCFypbWCPu6AR8xre31EOPF7wwAIJEvGQ2avov04eymayWinCuyXmV1b0+jzoXP/HYzzUYdvwg==", - "dev": true, - "requires": { - "core-js-pure": "^3.30.2", - "regenerator-runtime": "^0.14.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", - "dev": true - } - } - }, "@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -10214,11 +9698,6 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, - "@fortawesome/fontawesome-free": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz", - "integrity": "sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg==" - }, "@hotwired/stimulus": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/@hotwired/stimulus/-/stimulus-3.2.1.tgz", @@ -10423,22 +9902,15 @@ } }, "@symfony/ux-autocomplete": { - "version": "file:vendor/symfony/ux-autocomplete/assets", - "requires": { - "@hotwired/stimulus": "^3.0.0", - "fetch-mock-jest": "^1.5.1", - "tom-select": "^2.2.2" - } + "version": "1.0.0", + "dev": true, + "requires": {} }, "@symfony/ux-live-component": { - "version": "file:vendor/symfony/ux-live-component/assets", + "version": "1.0.0", + "dev": true, "requires": { - "@hotwired/stimulus": "^3.0.0", - "@testing-library/dom": "^7.31.0", - "@testing-library/user-event": "^13.1.9", - "@types/node-fetch": "^2.6.2", - "morphdom": "^2.6.1", - "node-fetch": "^2.6.1" + "morphdom": "^2.6.1" } }, "@symfony/webpack-encore": { @@ -10544,82 +10016,6 @@ } } }, - "@testing-library/dom": { - "version": "7.31.2", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz", - "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^4.2.0", - "aria-query": "^4.2.2", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.6", - "lz-string": "^1.4.4", - "pretty-format": "^26.6.2" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "@testing-library/user-event": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz", - "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.12.5" - } - }, "@trysound/sax": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", @@ -10658,12 +10054,6 @@ "optional": true, "peer": true }, - "@types/aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==", - "dev": true - }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -10818,16 +10208,6 @@ "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "dev": true }, - "@types/node-fetch": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.4.tgz", - "integrity": "sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==", - "dev": true, - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, "@types/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", @@ -11213,16 +10593,6 @@ "optional": true, "peer": true }, - "aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - } - }, "array-flatten": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", @@ -11255,12 +10625,6 @@ "lodash": "^4.17.20" } }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, "autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -11422,6 +10786,11 @@ "dev": true, "requires": {} }, + "bootstrap-icons": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", + "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -11601,15 +10970,6 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -11735,12 +11095,6 @@ "browserslist": "^4.21.5" } }, - "core-js-pure": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.32.1.tgz", - "integrity": "sha512-f52QZwkFVDPf7UEQZGHKx6NYxsxmVGJe5DIvbzOdRMJlmT6yv0KDjR8rmy3ngr/t5wU54c7Sp/qIJH0ppbhVpQ==", - "dev": true - }, "core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -12031,12 +11385,6 @@ "rimraf": "^2.6.3" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, "depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -12078,12 +11426,6 @@ "@leichtgewicht/ip-codec": "^2.0.1" } }, - "dom-accessibility-api": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", - "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true - }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -12398,41 +11740,6 @@ "websocket-driver": ">=0.5.1" } }, - "fetch-mock": { - "version": "9.11.0", - "resolved": "https://registry.npmjs.org/fetch-mock/-/fetch-mock-9.11.0.tgz", - "integrity": "sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q==", - "dev": true, - "requires": { - "@babel/core": "^7.0.0", - "@babel/runtime": "^7.0.0", - "core-js": "^3.0.0", - "debug": "^4.1.1", - "glob-to-regexp": "^0.4.0", - "is-subset": "^0.1.1", - "lodash.isequal": "^4.5.0", - "path-to-regexp": "^2.2.1", - "querystring": "^0.2.0", - "whatwg-url": "^6.5.0" - }, - "dependencies": { - "path-to-regexp": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz", - "integrity": "sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==", - "dev": true - } - } - }, - "fetch-mock-jest": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/fetch-mock-jest/-/fetch-mock-jest-1.5.1.tgz", - "integrity": "sha512-+utwzP8C+Pax1GSka3nFXILWMY3Er2L+s090FOgqVNrNCPp0fDqgXnAHAJf12PLHi0z4PhcTaZNTz8e7K3fjqQ==", - "dev": true, - "requires": { - "fetch-mock": "^9.11.0" - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -12501,17 +11808,6 @@ "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -12982,12 +12278,6 @@ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, - "is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==", - "dev": true - }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -13224,24 +12514,12 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", - "dev": true - }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -13257,12 +12535,6 @@ "yallist": "^3.0.2" } }, - "lz-string": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", - "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", - "dev": true - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -13461,39 +12733,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, - "node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } - }, "node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -14216,91 +13455,6 @@ "renderkid": "^3.0.0" } }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "15.0.15", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.15.tgz", - "integrity": "sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -14340,12 +13494,6 @@ "side-channel": "^1.0.4" } }, - "querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", - "dev": true - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -14381,12 +13529,6 @@ } } }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, "readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -15114,15 +14256,6 @@ "@orchidjs/unicode-variants": "^1.0.4" } }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, "ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -15284,12 +14417,6 @@ "minimalistic-assert": "^1.0.0" } }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, "webpack": { "version": "5.79.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.79.0.tgz", @@ -15527,17 +14654,6 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, - "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 849d2af7..a946af6c 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ "build": "NODE_ENV=production encore production --progress" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.4" + "bootstrap-icons": "^1.10.5" } } diff --git a/src/Controller/AuthorController.php b/src/Controller/AuthorController.php index 1c357303..81f7b3ce 100644 --- a/src/Controller/AuthorController.php +++ b/src/Controller/AuthorController.php @@ -16,23 +16,32 @@ class AuthorController extends AbstractController #[Route('/{page}', name: 'app_authors', requirements: ['page' => '\d+'])] public function index(BookRepository $bookRepository, PaginatorInterface $paginator, int $page=1): Response { - $authors = $bookRepository->getAllAuthors(); + $authors = $bookRepository->getAllAuthors()->getResult(); - $pagination = $paginator->paginate($authors,$page,300); + $pagination = $paginator->paginate($authors,$page, 18); - return $this->render('author/index.html.twig', [ + return $this->render('group/index.html.twig', [ 'pagination' => $pagination, + 'page'=> $page, + 'type'=> 'mainAuthor', ]); } - #[Route('/{slug}/{page}', name: 'app_author_detail', requirements: ['page' => '\d+'])] + #[Route('/{slug}/{page}', name: 'app_mainAuthor_detail', requirements: ['page' => '\d+'])] public function detail(string $slug, BookRepository $bookRepository, PaginatorInterface $paginator, int $page=1): Response { - $authors = $bookRepository->getAllAuthors(); - $author = array_filter($authors, fn($serie) => $serie['authorSlug'] === $slug); + $authors = $bookRepository->getAllAuthors()->getResult(); + if(!is_array($authors)){ + throw $this->createNotFoundException('No authors found'); + } + $author = array_filter($authors, static fn($serie) => $serie['slug'] === $slug); + $author= current($author); + if($author===false){ + return $this->redirectToRoute('app_authors'); + } $pagination = $paginator->paginate( $bookRepository->getByAuthorQuery($slug), diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index ce17ef3c..54617ae9 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -48,4 +48,17 @@ public function finished(BookRepository $bookRepository, PaginatorInterface $pag ]); } + #[Route('/unverified/{page}', name: 'app_unverified', requirements: ['page' => '\d+'])] + public function unverified(BookRepository $bookRepository, PaginatorInterface $paginator, int $page=1): Response + { + $pagination = $paginator->paginate( + $bookRepository->getUnverifiedBooksQuery(), + $page, + 18 + ); + return $this->render('default/index.html.twig', [ + 'pagination' => $pagination, + ]); + } + } diff --git a/src/Controller/SearchController.php b/src/Controller/SearchController.php index e96e65c7..b92ddb11 100644 --- a/src/Controller/SearchController.php +++ b/src/Controller/SearchController.php @@ -16,13 +16,13 @@ public function index( BookRepository $bookRepository, PaginatorInterface $pagin if($query===null){ $books=[]; } else { - $books = $bookRepository->search($query, 500); + $books = $bookRepository->search($query, 5000); } return $this->render('search/index.html.twig', [ 'query' => $query, - 'pagination' => $paginator->paginate($books, $page,12), + 'pagination' => $paginator->paginate($books, $page,18), ]); } } diff --git a/src/Controller/SerieController.php b/src/Controller/SerieController.php index 801a5ff8..5b155cdc 100644 --- a/src/Controller/SerieController.php +++ b/src/Controller/SerieController.php @@ -12,21 +12,29 @@ #[Route('/series')] class SerieController extends AbstractController { - #[Route('/', name: 'app_series')] - public function index(BookRepository $bookRepository): Response + #[Route('/{page}', name: 'app_serie', requirements: ['page' => '\d+'])] + public function index(BookRepository $bookRepository,PaginatorInterface $paginator, int $page=1): Response { - $series = $bookRepository->getAllSeries(); + $series = $bookRepository->getAllSeries()->getResult(); - return $this->render('serie/index.html.twig', [ - 'series' => $series, + $pagination = $paginator->paginate($series,$page, 18); + + return $this->render('group/index.html.twig', [ + 'pagination' => $pagination, + 'page'=> $page, + 'type'=> 'serie', ]); } - #[Route('/{slug}/{page}', name: 'app_series_detail', requirements: ['page' => '\d+'])] + #[Route('/{slug}/{page}', name: 'app_serie_detail', requirements: ['page' => '\d+'])] public function detail(string $slug, BookRepository $bookRepository, PaginatorInterface $paginator, int $page=1): Response { - $series = $bookRepository->getAllSeries(); - $serie = array_filter($series, fn($serie) => $serie['serieSlug'] === $slug); + $series = $bookRepository->getAllSeries()->getResult(); + if(!is_array($series)){ + throw $this->createNotFoundException('No series found'); + } + + $serie = array_filter($series, static fn($serie) => $serie['slug'] === $slug); $serie= current($serie); diff --git a/src/Controller/ShelfController.php b/src/Controller/ShelfController.php new file mode 100644 index 00000000..7c0fb906 --- /dev/null +++ b/src/Controller/ShelfController.php @@ -0,0 +1,21 @@ +render('shelf/index.html.twig', [ + 'controller_name' => 'ShelfController', + ]); + } +} diff --git a/src/Entity/Book.php b/src/Entity/Book.php index 94346631..a75d2511 100644 --- a/src/Entity/Book.php +++ b/src/Entity/Book.php @@ -101,9 +101,16 @@ class Book #[ORM\Column(type: Types::ARRAY, nullable: true)] private ?array $tags = null; + #[ORM\Column(nullable: false)] + private bool $verified = false; + + #[ORM\ManyToMany(targetEntity: Shelf::class, mappedBy: 'books')] + private Collection $shelves; + public function __construct() { $this->bookInteractions = new ArrayCollection(); + $this->shelves = new ArrayCollection(); } @@ -122,6 +129,10 @@ public function setTitle(string $title): self $this->title = trim($title); + if($title===''){ + $this->title='unknown'; + } + return $this; } @@ -263,6 +274,9 @@ public function getMainAuthor(): string public function setMainAuthor(string $mainAuthor): static { $this->mainAuthor = trim($mainAuthor); + if($mainAuthor===''){ + $this->mainAuthor='unknown'; + } return $this; } @@ -419,4 +433,48 @@ public function setTags(?array $tags): static return $this; } + + public function isVerified(): bool + { + return $this->verified; + } + + public function getVerified(): bool + { + return $this->verified; + } + + public function setVerified(bool $verified): static + { + $this->verified = $verified; + + return $this; + } + + /** + * @return Collection + */ + public function getShelves(): Collection + { + return $this->shelves; + } + + public function addShelf(Shelf $shelf): static + { + if (!$this->shelves->contains($shelf)) { + $this->shelves->add($shelf); + $shelf->addBook($this); + } + + return $this; + } + + public function removeShelf(Shelf $shelf): static + { + if ($this->shelves->removeElement($shelf)) { + $shelf->removeBook($this); + } + + return $this; + } } diff --git a/src/Entity/Shelf.php b/src/Entity/Shelf.php new file mode 100644 index 00000000..5e89e477 --- /dev/null +++ b/src/Entity/Shelf.php @@ -0,0 +1,109 @@ + + */ + #[ORM\ManyToMany(targetEntity: Book::class, inversedBy: 'shelves')] + private Collection $books; + + #[ORM\Column(length: 255, nullable: false)] + private string $name; + + #[ORM\Column(length: 128, unique: true, nullable: false)] + #[Gedmo\Slug(fields: ['name', 'id'], style: 'lower')] + private string $slug; + + public function __construct() + { + $this->books = new ArrayCollection(); + } + + public function getId(): int + { + return $this->id; + } + + public function setId(int $id): static + { + $this->id = $id; + return $this; + } + + public function getUser(): User + { + return $this->user; + } + + public function setUser(User $user): static + { + $this->user = $user; + + return $this; + } + + /** + * @return Collection + */ + public function getBooks(): Collection + { + return $this->books; + } + + public function addBook(Book $book): static + { + if (!$this->books->contains($book)) { + $this->books->add($book); + } + + return $this; + } + + public function removeBook(Book $book): static + { + $this->books->removeElement($book); + + return $this; + } + + public function getName(): string + { + return $this->name; + } + + public function setName(string $name): static + { + $this->name = $name; + + return $this; + } + + public function getSlug(): string + { + return $this->slug; + } + + public function setSlug(string $slug): void + { + $this->slug = $slug; + } +} diff --git a/src/Entity/User.php b/src/Entity/User.php index a2c80c3b..4094519b 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -45,9 +45,13 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\OneToMany(mappedBy: 'user', targetEntity: BookInteraction::class, orphanRemoval: true)] private Collection $bookInteractions; + #[ORM\OneToMany(mappedBy: 'user', targetEntity: Shelf::class, orphanRemoval: true)] + private Collection $shelves; + public function __construct() { $this->bookInteractions = new ArrayCollection(); + $this->shelves = new ArrayCollection(); } public function getId(): ?int @@ -177,4 +181,34 @@ public function removeBookInteraction(BookInteraction $bookInteraction): static return $this; } + + /** + * @return Collection + */ + public function getShelves(): Collection + { + return $this->shelves; + } + + public function addShelf(Shelf $shelf): static + { + if (!$this->shelves->contains($shelf)) { + $this->shelves->add($shelf); + $shelf->setUser($this); + } + + return $this; + } + + public function removeShelf(Shelf $shelf): static + { + if ($this->shelves->removeElement($shelf)) { + // set the owning side to null (unless already changed) + if ($shelf->getUser() === $this) { + $shelf->setUser(null); + } + } + + return $this; + } } diff --git a/src/Menu/MenuBuilder.php b/src/Menu/MenuBuilder.php index 8eb297f0..e4a9ee06 100644 --- a/src/Menu/MenuBuilder.php +++ b/src/Menu/MenuBuilder.php @@ -1,24 +1,24 @@ */ - private array $defaultAttr = ['attributes' => ['class' => 'nav-item'],'linkAttributes'=>['class'=>'nav-link'], 'icon'=>'fa-book']; + private array $defaultAttr = ['attributes' => ['class' => 'nav-item'],'linkAttributes'=>['class'=>'nav-link icon-link'], 'icon'=>'fa-book']; /** * Add any other dependency you need... */ - public function __construct(FactoryInterface $factory) + public function __construct(private FactoryInterface $factory, private Security $security) { - $this->factory = $factory; + } /** @@ -30,13 +30,26 @@ public function createMainMenu(array $options): ItemInterface $menu = $this->factory->createItem('root'); $menu->setChildrenAttribute('class', 'nav flex-column'); - $menu->addChild('Home', ['route' => 'app_homepage', ...$this->defaultAttr]); - $menu->addChild('Favorites', ['route' => 'app_favorites', ...$this->defaultAttr]); - $menu->addChild('Read', ['route' => 'app_read', 'routeParameters' => ['read' => 1], ...$this->defaultAttr]); - $menu->addChild('Not read', ['route' => 'app_read', 'routeParameters' => ['read' => 0], ...$this->defaultAttr]); - $menu->addChild('Series', ['route' => 'app_series', ...$this->defaultAttr]); - $menu->addChild('Authors', ['route' => 'app_authors', ...$this->defaultAttr]); - $menu->addChild('Settings',['route' => 'admin', ...$this->defaultAttr ]); + $menu->addChild('Home', ['route' => 'app_homepage', ...$this->defaultAttr])->setExtra('icon','house-fill'); + $menu->addChild('Favorites', ['route' => 'app_favorites', ...$this->defaultAttr])->setExtra('icon','heart-fill'); + $menu->addChild('Read', ['route' => 'app_read', 'routeParameters' => ['read' => 1], ...$this->defaultAttr])->setExtra('icon','journal-check'); + $menu->addChild('Not read', ['route' => 'app_read', 'routeParameters' => ['read' => 0], ...$this->defaultAttr])->setExtra('icon','journal'); + $menu->addChild('Series', ['route' => 'app_serie', ...$this->defaultAttr])->setExtra('icon','list'); + $menu->addChild('Authors', ['route' => 'app_authors', ...$this->defaultAttr])->setExtra('icon','people-fill'); + $menu->addChild('Unverified', ['route' => 'app_unverified', ...$this->defaultAttr])->setExtra('icon','question-circle-fill'); + $menu->addChild('setting_divider',['label'=>'Others'])->setExtra('divider',true); + $menu->addChild('Settings',['route' => 'admin', ...$this->defaultAttr ])->setExtra('icon','gear-fill'); + + $menu->addChild('shelves_divider',['label'=>'Shelves'])->setExtra('divider',true); + $user = $this->security->getUser(); + if($user instanceof User){ + foreach ($user->getShelves() as $shelf){ + $menu->addChild($shelf->getSlug(), ['label'=>$shelf->getName(),'route' => 'app_shelf', 'routeParameters' => ['slug' => $shelf->getSlug()], ...$this->defaultAttr]) + ->setExtra('icon','bookshelf'); + } + } + + return $menu; } diff --git a/src/Repository/BookRepository.php b/src/Repository/BookRepository.php index 424bce2e..2296f510 100644 --- a/src/Repository/BookRepository.php +++ b/src/Repository/BookRepository.php @@ -37,6 +37,13 @@ public function getFavoriteBooksQuery():Query ->setParameter('user', $this->security->getUser()) ->getQuery(); } + public function getUnverifiedBooksQuery():Query + { + return $this->createQueryBuilder('b') + ->select('b') + ->where('b.verified = false') + ->getQuery(); + } public function getBooksByReadStatus(bool $read):Query { $q = $this->createQueryBuilder('b') @@ -111,46 +118,35 @@ public function remove(Book $entity, bool $flush = false): void } /** - * @return array + * @return Query */ - public function getAllSeries():array + public function getAllSeries():Query { - $qb = $this->createQueryBuilder('serie') - ->select('serie.serie') - ->addSelect('serie.serieSlug') + return $this->createQueryBuilder('serie') + ->select('serie.serie as item') + ->addSelect('serie.serieSlug as slug') ->addSelect('COUNT(serie.id) as bookCount') ->addSelect('MAX(serie.serieIndex) as lastBookIndex') - ->addSelect('COUNT(bookInteraction.finished) as booksFinished')//fixme + ->addSelect('COUNT(bookInteraction.finished) as booksFinished') ->where('serie.serie IS NOT NULL') ->leftJoin('serie.bookInteractions', 'bookInteraction', 'WITH', 'bookInteraction.finished = true and bookInteraction.user= :user') ->setParameter('user', $this->security->getUser()) - ->addGroupBy('serie.serie'); - $return = $qb->getQuery()->getResult(); - if(!is_array($return)){ - return []; - } - return $return; - + ->addGroupBy('serie.serie')->getQuery(); } /** - * @return array + * @return Query */ - public function getAllAuthors():array + public function getAllAuthors():Query { $qb = $this->createQueryBuilder('author') - ->select('author.mainAuthor') - ->addSelect('author.authorSlug') + ->select('author.mainAuthor as item') + ->addSelect('author.authorSlug as slug') ->addSelect('COUNT(author.id) as bookCount') - ->addSelect('COUNT(bookInteraction.finished) as booksFinished')//fixme + ->addSelect('COUNT(bookInteraction.finished) as booksFinished') ->leftJoin('author.bookInteractions', 'bookInteraction', 'WITH', 'bookInteraction.finished = true and bookInteraction.user=:user') ->setParameter('user', $this->security->getUser()) ->addGroupBy('author.mainAuthor'); - $return = $qb->getQuery()->getResult(); - if(!is_array($return)){ - return []; - } - return $return; - + return $qb->getQuery(); } } diff --git a/src/Repository/ShelfRepository.php b/src/Repository/ShelfRepository.php new file mode 100644 index 00000000..b894a1e0 --- /dev/null +++ b/src/Repository/ShelfRepository.php @@ -0,0 +1,48 @@ + + * + * @method Shelf|null find($id, $lockMode = null, $lockVersion = null) + * @method Shelf|null findOneBy(array $criteria, array $orderBy = null) + * @method Shelf[] findAll() + * @method Shelf[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ShelfRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Shelf::class); + } + +// /** +// * @return Shelf[] Returns an array of Shelf objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('s') +// ->andWhere('s.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('s.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Shelf +// { +// return $this->createQueryBuilder('s') +// ->andWhere('s.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Twig/InlineEditAuthor.php b/src/Twig/InlineEditAuthor.php deleted file mode 100644 index d4c14831..00000000 --- a/src/Twig/InlineEditAuthor.php +++ /dev/null @@ -1,84 +0,0 @@ -isEditing = true; - } - - #[LiveAction] - public function save(EntityManagerInterface $entityManager):void - { - $thisAuthor = $this->author; - - $bookRepo = $entityManager->getRepository(Book::class); - - $books = $bookRepo->findBy(['mainAuthor'=>$this->originalAuthor['mainAuthor']]); - - foreach($books as $book) { - $book->setMainAuthor($this->author['mainAuthor']); - $entityManager->persist($book); - } - - $entityManager->flush(); - - - $authors = $bookRepo->getAllAuthors(); - - $author = array_filter($authors, static function($s) use ($thisAuthor) { - return $s['mainAuthor'] === $thisAuthor['mainAuthor']; - } ); - - $author= current($author); - - if($author === false) { - throw new \RuntimeException('Author not found'); - } - - $this->originalAuthor = $author; - $this->author = $author; - $this->isEditing = false; - - - - $this->flashMessage = count($books).' books updated'; - } -} diff --git a/src/Twig/InlineEditBook.php b/src/Twig/InlineEditBook.php index f94e6aeb..89d627e9 100644 --- a/src/Twig/InlineEditBook.php +++ b/src/Twig/InlineEditBook.php @@ -7,6 +7,7 @@ use Symfony\UX\LiveComponent\Attribute\AsLiveComponent; use Symfony\UX\LiveComponent\Attribute\LiveAction; use Symfony\UX\LiveComponent\Attribute\LiveProp; +use Symfony\UX\LiveComponent\ComponentToolsTrait; use Symfony\UX\LiveComponent\DefaultActionTrait; use Symfony\UX\LiveComponent\ValidatableComponentTrait; @@ -15,17 +16,23 @@ class InlineEditBook extends AbstractController { use DefaultActionTrait; use ValidatableComponentTrait; + use ComponentToolsTrait; - #[LiveProp(writable: ['title','serie', 'serieIndex', 'mainAuthor'])] + #[LiveProp(writable: ['title','serie', 'serieIndex', 'mainAuthor', 'verified', 'publisher', 'verified'])] public Book $book; #[LiveProp()] public bool $isEditing = false; + + #[LiveProp()] public string $field; + #[LiveProp()] + public bool $inline=true; + public ?string $flashMessage = null; #[LiveAction] @@ -39,7 +46,7 @@ public function save(EntityManagerInterface $entityManager):void { $entityManager->flush(); - + $this->dispatchBrowserEvent('manager:flush'); $this->isEditing = false; diff --git a/src/Twig/InlineEditGroup.php b/src/Twig/InlineEditGroup.php new file mode 100644 index 00000000..7a0b802c --- /dev/null +++ b/src/Twig/InlineEditGroup.php @@ -0,0 +1,101 @@ +isEditing = true; + } + + /** + * @throws RuntimeException + */ + #[LiveAction] + public function save(EntityManagerInterface $entityManager):void + { + $thisItem = $this->item; + + $bookRepo = $entityManager->getRepository(Book::class); + + $books = $bookRepo->findBy([$this->type=>$this->original['item']]); + + foreach($books as $book) { + switch ($this->type){ + case 'mainAuthor': + $book->setMainAuthor($this->item['item']); + break; + case 'serie': + $book->setSerie($this->item['item']); + break; + } + $entityManager->persist($book); + } + + $entityManager->flush(); + + $items = []; + switch ($this->type){ + case 'mainAuthor': + $items = $bookRepo->getAllAuthors()->getResult(); + break; + case 'serie': + $items = $bookRepo->getAllSeries()->getResult(); + break; + } + + if(!is_array($items)){ + throw new RuntimeException('No items found'); + } + + + $item = array_filter($items, static function($s) use ($thisItem) { + return $s['item'] === $thisItem['item']; + } ); + + + + $item= current($item); + if ($item === false) { + throw new RuntimeException($this->type.' not found'); + } + + $this->original = $item; + $this->item = $item; + $this->isEditing = false; + + $this->flashMessage = count($books).' books updated'; + } +} diff --git a/src/Twig/InlineEditSerie.php b/src/Twig/InlineEditSerie.php deleted file mode 100644 index 01cd61a4..00000000 --- a/src/Twig/InlineEditSerie.php +++ /dev/null @@ -1,88 +0,0 @@ -isEditing = true; - } - - /** - * @throws RuntimeException - */ - #[LiveAction] - public function save(EntityManagerInterface $entityManager):void - { - $thisSerie = $this->serie; - - $bookRepo = $entityManager->getRepository(Book::class); - - $books = $bookRepo->findBy(['serie'=>$this->originalSerie['serie']]); - - foreach($books as $book) { - $book->setSerie($this->serie['serie']); - $entityManager->persist($book); - } - - $entityManager->flush(); - - - $series = $bookRepo->getAllSeries(); - - $serie = array_filter($series, static function($s) use ($thisSerie) { - return $s['serie'] === $thisSerie['serie']; - } ); - - - $serie= current($serie); - if ($serie === false) { - throw new RuntimeException('Serie not found'); - } - - $this->originalSerie = $serie; - $this->serie = $serie; - $this->isEditing = false; - - - - $this->flashMessage = count($books).' books updated'; - } -} diff --git a/templates/author/detail.html.twig b/templates/author/detail.html.twig index 82f62c87..fc3ba91f 100644 --- a/templates/author/detail.html.twig +++ b/templates/author/detail.html.twig @@ -1,6 +1,8 @@ {% extends 'base.html.twig' %} -{% block title %}Author {{ author.mainAuthor }}{% endblock %} +{% block title %} + {{ component('InlineEditGroup',{'type':'mainAuthor','item':author,'original':author, 'link':false}) }} +{% endblock %} {% block body %} diff --git a/templates/author/index.html.twig b/templates/author/index.html.twig deleted file mode 100644 index 498038a0..00000000 --- a/templates/author/index.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}All authors{% endblock %} - -{% block body %} - -
- {{ pagination.getTotalItemCount }} Authors -
- - {{ knp_pagination_render(pagination) }} - -
    - {% for author in pagination %} -
  • - {{ component('InlineEditAuthor', {'author':author,'originalAuthor':author}) }} -
  • - {% endfor %} -
- - {{ knp_pagination_render(pagination) }} - -{% endblock %} diff --git a/templates/base.html.twig b/templates/base.html.twig index ee2d204b..9257940f 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -6,7 +6,7 @@ - {% block title %}Page{% endblock %} - Biblioteca + {{ block('title')|striptags }} - Biblioteca {% block stylesheets %} {{ encore_entry_link_tags('app') }} @@ -21,7 +21,7 @@ @@ -51,7 +51,7 @@
-

{{ block('title') }}

+

{% block title %}Page{% endblock %}

{% for type, messages in app.flashes %} {% for message in messages %} diff --git a/templates/book/_interaction.html.twig b/templates/book/_interaction.html.twig index c91699d3..9b3a8628 100644 --- a/templates/book/_interaction.html.twig +++ b/templates/book/_interaction.html.twig @@ -9,4 +9,4 @@ {% if not existing %} {{ component('InlineEditInteraction',{'user':app.user,'book':book}) }} -{% endif %} +{% endif %} \ No newline at end of file diff --git a/templates/book/_list.html.twig b/templates/book/_list.html.twig index 4f2ed98f..1b697f7d 100644 --- a/templates/book/_list.html.twig +++ b/templates/book/_list.html.twig @@ -8,6 +8,9 @@ {# sorting of properties based on query components #} + {{ knp_pagination_sortable(pagination, 'Title', 'b.title') }} @@ -21,10 +24,16 @@ {{ knp_pagination_sortable(pagination, 'Serie Index', 'b.serieIndex') }} + {% for book in pagination %} + @@ -37,11 +46,17 @@ + + {% endfor %}
+ +
+ {% if book.imageFilename is not null %} + + {% endif %} + {{ component('InlineEditBook', {'book':book, 'field':'title'}) }} {{ component('InlineEditBook', {'book':book, 'field':'serieIndex'}) }} + {% if not book.verified %} + {{ component('InlineEditBook',{'book':book, 'field':'verified'}) }} + {% endif %} + - +
diff --git a/templates/book/_pagination.html.twig b/templates/book/_pagination.html.twig index 3a4e122e..b6f02f43 100644 --- a/templates/book/_pagination.html.twig +++ b/templates/book/_pagination.html.twig @@ -6,8 +6,8 @@
{{ pagination.getTotalItemCount }} Books
- - + + diff --git a/templates/book/_search.html.twig b/templates/book/_search.html.twig index 89c8715e..d834ff13 100644 --- a/templates/book/_search.html.twig +++ b/templates/book/_search.html.twig @@ -13,14 +13,14 @@ - by + by {{ book.mainAuthor }} {% if book.serie %} - + {{ book.serie }} ({{ book.serieIndex }}) {% endif %} diff --git a/templates/book/_teaser.html.twig b/templates/book/_teaser.html.twig index ee529954..7c8a850f 100644 --- a/templates/book/_teaser.html.twig +++ b/templates/book/_teaser.html.twig @@ -11,12 +11,12 @@
- + {{ book.mainAuthor }} {% if book.serie %}
- + {{ book.serie }} ({{ book.serieIndex }}) {% endif %} diff --git a/templates/book/index.html.twig b/templates/book/index.html.twig index 0671f5c6..97ca9443 100644 --- a/templates/book/index.html.twig +++ b/templates/book/index.html.twig @@ -16,30 +16,47 @@
- + + - + + + + + + - {% if book.serie is not null %} - {% endif %} - + - {% if book.publishDate is not null %} - {% endif %} + + + +
DownloadDownload {{ book.extension }}Download + Download {{ book.extension }} +
Author{{ book.mainAuthor }}Title + {{ component('InlineEditBook', {'book':book, 'field':'title', inline: true}) }} +
Author + {{ book.mainAuthor }} + {{ component('InlineEditBook', {'book':book, 'field':'mainAuthor', inline: false}) }} +
Summary{{ book.summary }}
Serie - {{ book.serie }} - N°{{ book.serieIndex }} + {% if book.serie is not null %} + {{ book.serie }} + {% endif %} + {{ component('InlineEditBook', {'book':book, 'field':'serie', inline: false}) }} + N°{{ component('InlineEditBook', {'book':book, 'field':'serieIndex', inline: true}) }} +
Publisher{{ book.publisher }}Publisher{{ component('InlineEditBook', {'book':book, 'field':'publisher', inline: true}) }}
Publishdate{{ book.publishDate|date }}
Verified{{ component('InlineEditBook', {'book':book, 'field':'verified', inline: true}) }}
{{ include('book/_interaction.html.twig') }} diff --git a/templates/components/InlineEditAuthor.html.twig b/templates/components/InlineEditAuthor.html.twig deleted file mode 100644 index 8f299d03..00000000 --- a/templates/components/InlineEditAuthor.html.twig +++ /dev/null @@ -1,43 +0,0 @@ -
- {% if isEditing %} - {# The form isn't used, but allows the user to hit enter to save. #} -
-
- -
- - -
- - -
-
- {% else %} - - {{ author.mainAuthor }} - ({{ author.booksFinished }}/{{ author.bookCount }}) - - - - {% if flashMessage %} -
{{ flashMessage }}
- {% endif %} - {% endif %} -
diff --git a/templates/components/InlineEditBook.html.twig b/templates/components/InlineEditBook.html.twig index 16b1b515..351d63f6 100644 --- a/templates/components/InlineEditBook.html.twig +++ b/templates/components/InlineEditBook.html.twig @@ -1,22 +1,37 @@ -
- {% if isEditing %} + +{% if isEditing or field=='verified' %}
- - + {% if field=='verified' %} + + {% else %} + + {% endif %} + + {% if field!='verified' %} + + {% endif %}
{% else %} @@ -24,17 +39,20 @@ {% if flashMessage %} - + {% endif %} {% endif %} -
+ diff --git a/templates/components/InlineEditGroup.html.twig b/templates/components/InlineEditGroup.html.twig new file mode 100644 index 00000000..6b16a14a --- /dev/null +++ b/templates/components/InlineEditGroup.html.twig @@ -0,0 +1,37 @@ +
+ + {% if isEditing %} + {# The form isn't used, but allows the user to hit enter to save. #} +
+
+ +
+ + +
+ + +
+
+ {% else %} + + {% if link %} + + {% endif %} + {{ item.item }} + {% if link %} + + {% endif %} + ({{ item.booksFinished }}/{{ item.bookCount }}) + + + + {% if flashMessage %} +
{{ flashMessage }}
+ {% endif %} + {% endif %} +
diff --git a/templates/components/InlineEditInteraction.html.twig b/templates/components/InlineEditInteraction.html.twig index ef1f1698..a24de8f5 100644 --- a/templates/components/InlineEditInteraction.html.twig +++ b/templates/components/InlineEditInteraction.html.twig @@ -1,4 +1,4 @@ -
+
{% set finished=false %} {% if interaction is not null %} @@ -12,7 +12,7 @@ class="btn btn-link btn-sm text-{{ finished?'success':'secondary' }} text-decoration-none" title="Click to toggle read status" > - + {% if flashMessage %} {{ flashMessage }} {% endif %} @@ -31,7 +31,7 @@ class="btn btn-link btn-sm text-{{ favorite?'success':'secondary' }} text-decoration-none" title="Click to toggle favorite" > - + {% if flashMessageFav %} {{ flashMessageFav }} {% endif %} diff --git a/templates/components/InlineEditSerie.html.twig b/templates/components/InlineEditSerie.html.twig deleted file mode 100644 index 997c461c..00000000 --- a/templates/components/InlineEditSerie.html.twig +++ /dev/null @@ -1,43 +0,0 @@ -
- {% if isEditing %} - {# The form isn't used, but allows the user to hit enter to save. #} -
-
- -
- - -
- - -
-
- {% else %} - - {{ serie.serie }} - ({{ serie.booksFinished }}/{{ serie.bookCount }}) - - - - {% if flashMessage %} -
{{ flashMessage }}
- {% endif %} - {% endif %} -
diff --git a/templates/group/index.html.twig b/templates/group/index.html.twig new file mode 100644 index 00000000..f5c094e7 --- /dev/null +++ b/templates/group/index.html.twig @@ -0,0 +1,23 @@ +{% extends 'base.html.twig' %} + +{% block title %}{{ pagination.getTotalItemCount }} {{ type }} - Page {{ page }}{% endblock %} + +{% block body %} + +
+ {{ pagination.getTotalItemCount }} {{ type }} +
+ + {{ knp_pagination_render(pagination) }} + +
    + {% for item in pagination %} +
  • + {{ component('InlineEditGroup', {'type': type ,'item':item,'original': item}) }} +
  • + {% endfor %} +
+ + {{ knp_pagination_render(pagination) }} + +{% endblock %} diff --git a/templates/main_menu.html.twig b/templates/main_menu.html.twig new file mode 100644 index 00000000..6498e11d --- /dev/null +++ b/templates/main_menu.html.twig @@ -0,0 +1,26 @@ +{% extends '@KnpMenu/menu.html.twig' %} +{% block linkElement %} + {% import _self as knp_menu %} + + {% if item.extra('divider') %} + + {{ block('label') }} + + {% else %} + + {% if item.extra('icon') %} + + {% endif %} + {{ block('label') }} + + {% endif %} +{% endblock %} +{% block spanElement %} + {% import _self as knp_menu %} + + {% if item.extra('divider') %} + + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/templates/serie/detail.html.twig b/templates/serie/detail.html.twig index fbb7325c..6e1517eb 100644 --- a/templates/serie/detail.html.twig +++ b/templates/serie/detail.html.twig @@ -1,6 +1,6 @@ {% extends 'base.html.twig' %} -{% block title %}Serie {{ serie.serie }}{% endblock %} +{% block title %}Serie {{ serie.item }}{% endblock %} {% block body %} diff --git a/templates/serie/index.html.twig b/templates/serie/index.html.twig deleted file mode 100644 index b992c4e3..00000000 --- a/templates/serie/index.html.twig +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'base.html.twig' %} - -{% block title %}All series{% endblock %} - -{% block body %} - -
    - {% for serie in series %} -
  • - {{ component('InlineEditSerie', {'serie':serie,'originalSerie':serie}) }} -
  • - {% endfor %} -
- -{% endblock %} diff --git a/templates/shelf/index.html.twig b/templates/shelf/index.html.twig new file mode 100644 index 00000000..9e56e837 --- /dev/null +++ b/templates/shelf/index.html.twig @@ -0,0 +1,20 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello ShelfController!{% endblock %} + +{% block body %} + + +
+

Hello {{ controller_name }}! ✅

+ + This friendly message is coming from: + +
+{% endblock %}