Logos, robots and some fixs

This commit is contained in:
Xbird
2022-08-08 17:19:06 +00:00
parent 9918c6bad9
commit 4f00470223
54 changed files with 235 additions and 59 deletions

View File

@@ -68,7 +68,7 @@ publish:
before_script: before_script:
- apk add jq - apk add jq
script: script:
- APP_VERSION=$(cat package.json | jq .version -r) - APP_VERSION=$(cat visionversion.json | jq .version -r)
- docker login $registry_host -u $registry_user -p $registry_pass - docker login $registry_host -u $registry_user -p $registry_pass
- docker build -f ./Dockerfile -t $registry_host/$registry_img:$APP_VERSION . - docker build -f ./Dockerfile -t $registry_host/$registry_img:$APP_VERSION .
- docker push $registry_host/$registry_img:$APP_VERSION - docker push $registry_host/$registry_img:$APP_VERSION

Binary file not shown.

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220808160257 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE notification CHANGE content content LONGTEXT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE notification CHANGE content content VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT \'\' NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<browserconfig> <browserconfig>
<msapplication> <msapplication>
<tile> <tile>
<square70x70logo src="smalltile.png"/> <square150x150logo src="/mstile-150x150.png"/>
<square150x150logo src="mediumtile.png"/> <TileColor>#603cba</TileColor>
<square310x310logo src="largetile.png"/> </tile>
<TileColor>#FFFFFF</TileColor> </msapplication>
</tile> </browserconfig>
</msapplication>
</browserconfig>

View File

@@ -58,7 +58,10 @@ ul.timeline > li:before {
z-index: 400; z-index: 400;
} }
.logo-lg {
height: 30px;
width: 170px;
}
.document-group-logo { .document-group-logo {
max-width: 200px; max-width: 200px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
public/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

BIN
public/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="id1"><path d="M 52 108.289062 L 374.980469 108.289062 L 374.980469 305.582031 L 52 305.582031 Z M 52 108.289062 " clip-rule="nonzero"/></clipPath><clipPath id="id2"><path d="M 0 69.375 L 360 69.375 L 360 268 L 0 268 Z M 0 69.375 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#id1)"><path fill="#8177f1" d="M 369.753906 196.382812 C 368.992188 195.484375 350.726562 174.140625 320.6875 152.613281 C 302.980469 139.917969 284.820312 129.789062 266.703125 122.503906 C 243.796875 113.289062 220.898438 108.617188 198.640625 108.617188 C 167.523438 108.617188 137.492188 115.433594 109.382812 128.878906 C 88.75 138.746094 69.519531 151.964844 52.226562 168.167969 L 65.914062 182.773438 C 81.707031 167.972656 99.238281 155.917969 118.019531 146.9375 C 143.410156 134.792969 170.535156 128.636719 198.640625 128.636719 C 243.296875 128.636719 283.09375 150.359375 308.617188 168.585938 C 313.6875 172.207031 318.410156 175.839844 322.757812 179.363281 C 328.507812 184.027344 333.585938 188.5 337.902344 192.503906 C 342.429688 196.699219 346.113281 200.382812 348.851562 203.226562 C 339.914062 213.597656 320.5 234.386719 296.40625 249.800781 C 259.304688 273.53125 221.0625 285.566406 182.734375 285.566406 C 160.496094 285.566406 138.722656 281.617188 117.882812 273.8125 C 112.867188 271.9375 107.261719 274.273438 105.136719 279.1875 L 105.132812 279.195312 C 102.867188 284.421875 105.410156 290.515625 110.746094 292.515625 C 133.871094 301.191406 158.039062 305.582031 182.734375 305.582031 C 224.949219 305.582031 266.820312 292.488281 307.191406 266.664062 C 343.460938 243.460938 369.007812 210.34375 370.078125 208.945312 L 374.980469 202.535156 L 369.753906 196.382812 " fill-opacity="1" fill-rule="nonzero"/></g><path fill="#7a2048" d="M 187.289062 136.222656 C 158.863281 136.222656 135.738281 159.351562 135.738281 187.773438 C 135.738281 216.199219 158.863281 239.328125 187.289062 239.328125 C 215.714844 239.328125 238.839844 216.199219 238.839844 187.773438 C 238.839844 159.351562 215.714844 136.222656 187.289062 136.222656 Z M 187.289062 156.242188 C 204.675781 156.242188 218.824219 170.386719 218.824219 187.773438 C 218.824219 205.164062 204.675781 219.308594 187.289062 219.308594 C 169.898438 219.308594 155.753906 205.164062 155.753906 187.773438 C 155.753906 170.386719 169.898438 156.242188 187.289062 156.242188 " fill-opacity="1" fill-rule="nonzero"/><g clip-path="url(#id2)"><path fill="#7a2048" d="M 316.792969 185.300781 C 292.792969 208.359375 242.277344 247.480469 175.851562 247.480469 C 133.613281 247.480469 94.308594 232.320312 59.027344 202.421875 C 43.195312 189.007812 31.691406 175.34375 25.121094 166.714844 C 32.40625 158.289062 45.285156 144.878906 63.21875 131.769531 C 101.648438 103.671875 144.757812 89.429688 191.347656 89.429688 C 205.921875 89.429688 220.480469 90.992188 234.613281 94.074219 C 273.984375 102.660156 312.257812 120.867188 343.414062 145.695312 C 347.617188 149.042969 353.714844 148.488281 357.226562 144.417969 L 357.234375 144.414062 C 360.941406 140.117188 360.34375 133.589844 355.90625 130.054688 C 322.371094 103.335938 281.203125 83.746094 238.878906 74.515625 C 223.347656 71.128906 207.355469 69.410156 191.347656 69.410156 C 140.421875 69.410156 93.335938 84.953125 51.402344 115.609375 C 27.328125 133.210938 11.738281 151.058594 4.589844 160.128906 L 0 165.953125 L 4.230469 172.039062 C 10.667969 181.300781 24.667969 199.546875 46.085938 217.695312 C 85.082031 250.742188 128.742188 267.496094 175.851562 267.496094 C 213.332031 267.496094 250.054688 256.644531 284.992188 235.238281 C 305.261719 222.820312 321.25 209.003906 332.167969 198.300781 C 328.507812 194.988281 324.386719 191.425781 319.84375 187.738281 C 318.847656 186.929688 317.828125 186.117188 316.792969 185.300781 " fill-opacity="1" fill-rule="nonzero"/></g><path fill="#7a2048" d="M 337.902344 192.503906 C 333.585938 188.5 328.507812 184.027344 322.757812 179.363281 C 321 181.175781 319.007812 183.167969 316.792969 185.300781 C 317.828125 186.117188 318.847656 186.929688 319.84375 187.738281 C 324.386719 191.425781 328.507812 194.988281 332.167969 198.300781 C 334.269531 196.242188 336.183594 194.296875 337.902344 192.503906 " fill-opacity="1" fill-rule="nonzero"/></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
public/mstile-144x144.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
public/mstile-150x150.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
public/mstile-310x150.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
public/mstile-310x310.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
public/mstile-70x70.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

2
public/robot.txt Normal file
View File

@@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M3558 5705 c-2 -1 -86 -5 -188 -9 -102 -4 -201 -8 -220 -10 -54 -5
-225 -27 -240 -31 -3 -1 -30 -5 -60 -9 -157 -22 -466 -97 -630 -153 -125 -43
-263 -93 -295 -107 -16 -8 -59 -26 -95 -41 -92 -38 -317 -152 -435 -220 -518
-299 -989 -705 -1343 -1156 l-52 -67 76 -108 c82 -118 233 -309 316 -401 80
-88 346 -352 412 -408 32 -28 68 -58 80 -69 11 -10 59 -48 106 -85 47 -36 90
-70 95 -74 43 -36 230 -160 341 -227 383 -230 819 -397 1214 -466 14 -2 36 -6
50 -9 14 -3 48 -7 75 -11 28 -3 57 -8 66 -9 8 -2 55 -6 105 -10 49 -4 98 -9
109 -11 33 -7 384 -6 475 1 183 14 242 22 460 60 129 23 439 107 517 141 17 8
34 14 38 14 29 0 368 149 509 224 205 108 348 196 541 331 191 134 435 338
612 511 l112 110 101 -99 101 -98 -38 -47 c-40 -49 -359 -371 -428 -432 -451
-399 -951 -687 -1520 -875 -176 -58 -398 -115 -505 -130 -25 -3 -52 -8 -60
-10 -19 -5 -69 -12 -140 -20 -30 -3 -89 -10 -130 -14 -79 -9 -532 -7 -610 3
-193 24 -229 29 -315 46 -27 6 -59 12 -70 14 -77 15 -282 72 -395 111 -156 53
-203 55 -270 11 -115 -76 -103 -258 21 -317 107 -52 413 -140 634 -183 72 -14
153 -28 180 -31 28 -4 60 -8 73 -10 22 -4 75 -9 217 -20 74 -7 425 -7 510 -1
104 8 199 17 204 21 3 1 37 6 76 10 38 3 72 8 75 10 3 2 26 6 50 10 64 9 214
41 328 70 552 143 1144 435 1622 799 58 44 107 83 110 87 3 3 34 30 70 60 36
29 83 69 105 89 50 44 369 363 410 410 69 78 193 229 238 287 l47 62 -71 83
c-242 284 -688 680 -999 888 -36 24 -67 46 -70 50 -9 11 -266 168 -383 234
-326 182 -676 322 -1002 401 -77 19 -151 36 -165 38 -14 3 -43 8 -65 12 -22 4
-48 9 -59 11 -10 2 -44 6 -75 10 -31 3 -85 10 -121 14 -66 9 -609 6 -645 -3
-11 -2 -50 -8 -87 -11 -37 -4 -77 -9 -90 -11 -13 -2 -41 -6 -63 -10 -508 -74
-1076 -296 -1545 -603 -199 -131 -575 -430 -575 -459 0 -11 53 -71 172 -196
l75 -79 32 30 c29 27 54 49 131 117 17 14 90 71 163 126 322 243 674 431 1036
554 164 55 396 115 504 130 15 2 72 11 127 20 235 36 644 41 840 10 145 -23
221 -38 425 -89 53 -13 234 -76 340 -118 208 -82 466 -213 655 -332 180 -112
535 -368 535 -385 0 -6 -101 -106 -206 -201 -41 -39 -132 -116 -220 -190 -132
-110 -401 -292 -596 -403 -367 -210 -798 -367 -1182 -431 -272 -46 -707 -56
-927 -22 -13 3 -46 7 -74 11 -68 9 -279 52 -340 69 -205 58 -256 76 -430 148
-331 138 -704 377 -1010 647 -157 139 -415 415 -553 592 -15 20 12 52 188 230
372 374 821 684 1292 893 148 65 164 71 358 136 128 43 235 74 293 86 10 2 27
6 37 9 10 3 29 8 42 10 13 3 68 14 123 24 55 11 116 22 135 25 19 2 58 8 85
11 28 4 61 8 75 10 220 31 702 27 945 -6 39 -5 86 -12 105 -14 19 -3 46 -7 60
-10 14 -3 59 -12 100 -20 110 -21 107 -21 257 -60 541 -141 1059 -378 1564
-716 30 -20 112 -79 182 -132 136 -102 175 -118 248 -102 106 24 170 153 126
256 -41 98 -549 442 -952 646 -379 192 -800 348 -1162 433 -49 11 -106 25
-128 30 -46 12 -250 47 -312 55 -24 3 -62 8 -85 11 -84 11 -105 13 -283 19
-99 3 -188 8 -197 10 -9 1 -18 2 -20 0z"/>
<path d="M3428 4455 c-2 -1 -30 -5 -63 -8 -189 -19 -405 -127 -548 -274 -183
-187 -275 -402 -281 -657 -3 -119 29 -305 64 -375 4 -9 23 -45 40 -81 123
-245 352 -428 625 -499 167 -43 383 -33 546 25 403 143 660 522 644 949 -11
308 -168 587 -427 761 -62 42 -206 111 -246 119 -9 1 -36 8 -60 15 -24 6 -58
13 -75 16 -38 6 -214 13 -219 9z m150 -379 c185 -23 354 -144 440 -318 117
-233 75 -494 -109 -678 -118 -117 -248 -170 -419 -171 -172 0 -334 78 -451
218 -47 56 -104 170 -114 228 -4 22 -9 49 -12 60 -9 47 -2 164 12 220 63 239
256 410 500 443 59 8 69 8 153 -2z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

19
public/site.webmanifest Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -10,6 +10,7 @@ use App\Form\AdminRankType;
use App\Form\AdminUserType; use App\Form\AdminUserType;
use App\Form\SearchBarType; use App\Form\SearchBarType;
use App\Form\AdminGroupType; use App\Form\AdminGroupType;
use Psr\Log\LoggerInterface;
use App\Form\AdminSubGroupType; use App\Form\AdminSubGroupType;
use App\Repository\UserRepository; use App\Repository\UserRepository;
use App\Repository\GroupRepository; use App\Repository\GroupRepository;
@@ -33,10 +34,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class AdminController extends AbstractController class AdminController extends AbstractController
{ {
private Security $security; private Security $security;
private LoggerInterface $logger;
public function __construct(Security $security) public function __construct(Security $security, LoggerInterface $logger)
{ {
$this->security = $security; $this->security = $security;
$this->logger = $logger;
} }
#[Route('/', name: 'index')] #[Route('/', name: 'index')]
@@ -172,6 +175,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_saving_user'); $this->addFlash('danger', 'alert_error_saving_user');
return $this->redirectToRoute('admin_user_edit', ['id' => $User->getId()]); return $this->redirectToRoute('admin_user_edit', ['id' => $User->getId()]);
@@ -274,6 +279,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_group'); $this->addFlash('danger', 'alert_error_creating_group');
} }
@@ -302,6 +309,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_group'); $this->addFlash('danger', 'alert_error_editing_group');
} }
@@ -363,6 +372,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_rank'); $this->addFlash('danger', 'alert_error_editing_rank');
} }
@@ -395,6 +406,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_rank'); $this->addFlash('danger', 'alert_error_creating_rank');
} }
@@ -478,6 +491,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_subgroup'); $this->addFlash('danger', 'alert_error_editing_subgroup');
} }
@@ -510,6 +525,8 @@ class AdminController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_subgroup'); $this->addFlash('danger', 'alert_error_creating_subgroup');
} }

View File

@@ -5,6 +5,7 @@ namespace App\Controller;
use App\Entity\Comment; use App\Entity\Comment;
use App\Entity\Document; use App\Entity\Document;
use App\Form\CommentType; use App\Form\CommentType;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
@@ -15,6 +16,13 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
#[Route('/comment', name: 'comment_')] #[Route('/comment', name: 'comment_')]
class CommentController extends AbstractController class CommentController extends AbstractController
{ {
private LoggerInterface $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
#[Route('/create/{Document}', name: 'create')] #[Route('/create/{Document}', name: 'create')]
#[IsGranted('view', subject: 'Document', message: 'granted_not_allowed_comment')] #[IsGranted('view', subject: 'Document', message: 'granted_not_allowed_comment')]
public function create(Document $Document, Request $request): Response public function create(Document $Document, Request $request): Response
@@ -33,6 +41,8 @@ class CommentController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_comment'); $this->addFlash('danger', 'alert_error_creating_comment');
@@ -89,6 +99,8 @@ class CommentController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_comment'); $this->addFlash('danger', 'alert_error_editing_comment');

View File

@@ -5,6 +5,7 @@ namespace App\Controller;
use App\Entity\Directory; use App\Entity\Directory;
use App\Form\DirectoryType; use App\Form\DirectoryType;
use App\Form\SearchBarType; use App\Form\SearchBarType;
use Psr\Log\LoggerInterface;
use App\Repository\DocumentRepository; use App\Repository\DocumentRepository;
use App\Repository\DirectoryRepository; use App\Repository\DirectoryRepository;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@@ -20,6 +21,14 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
#[Route('/directory', name: 'directory_')] #[Route('/directory', name: 'directory_')]
class DirectoryController extends AbstractController class DirectoryController extends AbstractController
{ {
private LoggerInterface $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
#[Route('/', name: 'list')] #[Route('/', name: 'list')]
#[Route('/wanted', name: 'list_wanted')] #[Route('/wanted', name: 'list_wanted')]
#[Route('/dead', name: 'list_dead')] #[Route('/dead', name: 'list_dead')]
@@ -125,6 +134,8 @@ class DirectoryController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_directory'); $this->addFlash('danger', 'alert_error_creating_directory');
@@ -156,6 +167,8 @@ class DirectoryController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_directory'); $this->addFlash('danger', 'alert_error_editing_directory');
@@ -265,6 +278,8 @@ class DirectoryController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_merging_directory'); $this->addFlash('danger', 'alert_error_merging_directory');
return $this->redirectToRoute('directory_view', ['id' => $deleted->getId()]); return $this->redirectToRoute('directory_view', ['id' => $deleted->getId()]);
@@ -281,6 +296,8 @@ class DirectoryController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_merging_directory'); $this->addFlash('danger', 'alert_error_merging_directory');
return $this->redirectToRoute('directory_view', ['id' => $deletedId]); return $this->redirectToRoute('directory_view', ['id' => $deletedId]);

View File

@@ -8,6 +8,7 @@ use App\Entity\Document;
use App\Entity\Directory; use App\Entity\Directory;
use App\Form\CommentType; use App\Form\CommentType;
use App\Form\SearchBarType; use App\Form\SearchBarType;
use Psr\Log\LoggerInterface;
use App\Repository\DocumentRepository; use App\Repository\DocumentRepository;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface; use Knp\Component\Pager\PaginatorInterface;
@@ -24,9 +25,11 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
class DocumentController extends AbstractController class DocumentController extends AbstractController
{ {
private TokenStorageInterface $TokenStorage; private TokenStorageInterface $TokenStorage;
private LoggerInterface $logger;
public function __construct(TokenStorageInterface $TokenStorage) public function __construct(TokenStorageInterface $TokenStorage, LoggerInterface $logger)
{ {
$this->logger = $logger;
$this->TokenStorage = $TokenStorage; $this->TokenStorage = $TokenStorage;
} }
@@ -163,6 +166,8 @@ class DocumentController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_creating_document'); $this->addFlash('danger', 'alert_error_creating_document');
@@ -238,6 +243,8 @@ class DocumentController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_document'); $this->addFlash('danger', 'alert_error_editing_document');

View File

@@ -5,6 +5,7 @@ namespace App\Controller;
use App\Entity\User; use App\Entity\User;
use App\Form\MotdType; use App\Form\MotdType;
use App\Form\EmployeeType; use App\Form\EmployeeType;
use Psr\Log\LoggerInterface;
use App\Repository\TemplateRepository; use App\Repository\TemplateRepository;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@@ -15,6 +16,13 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
#[Route('/group', name: 'group_')] #[Route('/group', name: 'group_')]
class GroupController extends AbstractController class GroupController extends AbstractController
{ {
private LoggerInterface $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
#[Route('/', name: 'index')] #[Route('/', name: 'index')]
public function index(Request $request, TemplateRepository $TemplateRepository): Response public function index(Request $request, TemplateRepository $TemplateRepository): Response
{ {
@@ -45,6 +53,8 @@ class GroupController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_motd'); $this->addFlash('danger', 'alert_error_editing_motd');
} }
@@ -188,6 +198,8 @@ class GroupController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_employee'); $this->addFlash('danger', 'alert_error_editing_employee');
} }

View File

@@ -4,6 +4,7 @@ namespace App\Controller;
use App\Form\MeType; use App\Form\MeType;
use App\Form\MePasswordType; use App\Form\MePasswordType;
use Psr\Log\LoggerInterface;
use Knp\Component\Pager\PaginatorInterface; use Knp\Component\Pager\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
@@ -16,10 +17,12 @@ use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
class MeController extends AbstractController class MeController extends AbstractController
{ {
private Security $security; private Security $security;
private LoggerInterface $logger;
public function __construct(Security $security) public function __construct(Security $security, LoggerInterface $logger)
{ {
$this->security = $security; $this->security = $security;
$this->logger = $logger;
} }
#[Route('/', name: 'index')] #[Route('/', name: 'index')]
@@ -40,6 +43,8 @@ class MeController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_profile'); $this->addFlash('danger', 'alert_error_editing_profile');
@@ -88,6 +93,8 @@ class MeController extends AbstractController
} catch (\Throwable $th) { } catch (\Throwable $th) {
if ($_ENV['APP_ENV'] === 'dev') { if ($_ENV['APP_ENV'] === 'dev') {
throw $th; //DEBUG throw $th; //DEBUG
} else {
$this->logger->error($th);
} }
$this->addFlash('danger', 'alert_error_editing_password'); $this->addFlash('danger', 'alert_error_editing_password');

View File

@@ -35,7 +35,7 @@ class Notification
private $icon; private $icon;
/** /**
* @ORM\Column(type="string", length=255) * @ORM\Column(type="text")
*/ */
private $content; private $content;

View File

@@ -14,7 +14,9 @@ class CommentType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('content', ContentType::class) ->add('content', ContentType::class, [
'label' => false,
])
->add('submit', SubmitType::class, [ ->add('submit', SubmitType::class, [
'label' => 'form_button_submit', 'label' => 'form_button_submit',
'attr' => ['class' => 'btn-primary'], 'attr' => ['class' => 'btn-primary'],

View File

@@ -162,7 +162,10 @@ class DocumentRepositoriesExtension extends ServiceEntityRepository
if (null === $this->qbsearch) { if (null === $this->qbsearch) {
$this->qbsearch = $this ->createQueryBuilder("s")->where('s.title LIKE :searchkey'); $this->qbsearch = $this ->createQueryBuilder("s")->where('s.title LIKE :searchkey');
$this->qbsearch->orWhere('s.id LIKE :searchkey'); if (is_numeric($search)) {
$this->qbsearch->orWhere('s.id = ' . $search);
}
$searchTime = str_replace('/', '-', $search); $searchTime = str_replace('/', '-', $search);
if (($timestamp = strtotime($searchTime)) != false) { if (($timestamp = strtotime($searchTime)) != false) {
$this->qbsearch->where('s.createdAt LIKE :searchkeydate') $this->qbsearch->where('s.createdAt LIKE :searchkeydate')

View File

@@ -17,6 +17,6 @@ class VersionExtension extends AbstractExtension
public function visionVersion() public function visionVersion()
{ {
return json_decode(file_get_contents('../package.json'))->version; return json_decode(file_get_contents('../visionversion.json'))->version;
} }
} }

View File

@@ -14,21 +14,15 @@
<!-- Meta --> <!-- Meta -->
<!-- Favicon icon --> <!-- Favicon icon -->
<link rel="icon" href="{{ asset('favicon.ico') }}" type="image/x-icon"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="shortcut icon" href="{{ asset('favicon.ico') }}" type="image/x-icon"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" href="{{ asset('favicon.png') }}" type="image/png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" sizes="32x32" href="{{ asset('favicon-32.png') }}" type="image/png"> <link rel="manifest" href="/site.webmanifest">
<link rel="icon" sizes="64x64" href="{{ asset('favicon-64.png') }}" type="image/png"> <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<link rel="icon" sizes="96x96" href="{{ asset('favicon-96.png') }}" type="image/png"> <meta name="msapplication-TileColor" content="#603cba">
<link rel="icon" sizes="196x196" href="{{ asset('favicon-196.png') }}" type="image/png"> <meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('apple-touch-icon.png') }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ asset('apple-touch-icon-60x60.png') }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('apple-touch-icon-76x76.png') }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ asset('apple-touch-icon-114x114.png') }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ asset('apple-touch-icon-120x120.png') }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('apple-touch-icon-144x144.png') }}">
<meta name="msapplication-TileImage" content="{{ asset('favicon-144.png') }}">
<meta name="msapplication-TileColor" content="#FFFFFF">
<!-- font css --> <!-- font css -->
<link rel="stylesheet" href="{{ asset('fonts/feather.css') }}"> <link rel="stylesheet" href="{{ asset('fonts/feather.css') }}">
@@ -48,7 +42,7 @@
{% endif %} {% endif %}
</head> </head>
<body> <body>
<!-- [ Pre-loader ] start --> <!-- [ Pre-loader ] start -->
<div class="loader-bg"> <div class="loader-bg">
<div class="loader-track"> <div class="loader-track">
@@ -60,7 +54,7 @@
<!-- [ Mobile header ] start --> <!-- [ Mobile header ] start -->
<div class="pc-mob-header pc-header"> <div class="pc-mob-header pc-header">
<div class="pcm-logo"> <div class="pcm-logo">
<a href="{{ path('home') }}"><img src="{{ asset('img/logo.png') }}" alt="" class="logo logo-lg img-fluid"></a> <a href="{{ path('home') }}"><img src="{{ asset('img/vision_long_2100x250.svg') }}" alt="" class="logo logo-lg img-fluid"></a>
</div> </div>
<div class="pcm-toolbar"> <div class="pcm-toolbar">
<a href="#!" class="pc-head-link" id="mobile-collapse"> <a href="#!" class="pc-head-link" id="mobile-collapse">
@@ -87,8 +81,8 @@
<div class="navbar-wrapper"> <div class="navbar-wrapper">
<div class="m-header"> <div class="m-header">
<a href="{{ path('home') }}" class="b-brand"> <a href="{{ path('home') }}" class="b-brand">
<img src="{{ asset('img/logo.png') }}" alt="VISION" class="logo logo-lg"> <img src="{{ asset('img/vision_long_2100x250.svg') }}" alt="VISION" class="logo logo-lg">
<img src="{{ asset('img/logo-sm.png') }}" alt="VISION" class="logo logo-sm"> <img src="{{ asset('img/vision_logo_500x500.svg') }}" alt="VISION" class="logo logo-sm">
</a> </a>
</div> </div>
<div class="navbar-content"> <div class="navbar-content">

View File

@@ -42,7 +42,7 @@
</div> </div>
{% if shared is not defined %} {% if shared is not defined %}
<div class="col-3"> <div class="col-3">
{% include '_cells/documentActions.html.twig' with {'document': i} %} {% include '_cells/documentActions.html.twig' with {'document': i, 'removefromfolder': document.id} %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@@ -78,8 +78,8 @@
</div> </div>
<div class="row mt-5"> <div class="row mt-5">
<div class="col"> <div class="col-12">
<h3>{% trans %}title_comments{% endtrans %} {% if shared is not defined %}<a href="#" data-bs-toggle="modal" data-bs-target="#addCommentModal"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_add_comment{% endtrans %}</span></a>{% endif %}</h3><hr> <h3>{% trans %}title_comments{% endtrans %} {% if shared is not defined %}<a href="#addcomment"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_add_comment{% endtrans %}</span></a>{% endif %}</h3><hr>
<ul class="timeline"> <ul class="timeline">
@@ -92,7 +92,13 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
{% if shared is not defined %}
<div class="col-12" id="addcomment">
<h3>{% trans %}title_comment_add{% endtrans %}</h3><hr>
{{ form(formComment) }}
</div>
{% endif %}
</div> </div>
</div> </div>
@@ -108,24 +114,6 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% if shared is not defined %}
<!-- Modal -->
<div class="modal fade" id="addCommentModal" tabindex="-1" role="dialog" aria-labelledby="addCommentModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="addCommentModalTitle">{% trans %}title_add_comment{% endtrans %}</h5>
</div>
<div class="modal-body">
{{ form(formComment) }}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans %}button_cancel{% endtrans %}</button>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %} {% endblock %}

View File

@@ -635,6 +635,7 @@ title_can_be_removed_at: Can be removed at
title_certificate: Certificat title_certificate: Certificat
title_certificates: Certificates title_certificates: Certificates
title_color: Color title_color: Color
title_comment_add: Add a comment
title_comment_belong_document: This belong to title_comment_belong_document: This belong to
title_comment_edition: Edit a comment title_comment_edition: Edit a comment
title_comments: Comments title_comments: Comments

View File

@@ -634,6 +634,7 @@ title_can_be_removed_at: Peut être retiré le
title_certificate: Certificat title_certificate: Certificat
title_certificates: Certificats title_certificates: Certificats
title_color: Couleur title_color: Couleur
title_comment_add: Ajouter un commentaire
title_comment_belong_document: Ce document appartient title_comment_belong_document: Ce document appartient
title_comment_edition: Éditer un commentaire title_comment_edition: Éditer un commentaire
title_comments: Commentaires title_comments: Commentaires