Release 2.3.0 (#4412)

- move user-preferences to edit submenu
- unify user preferences with other forms
- use light fieldset for all user-edit-forms
- support offcanvas elements
- allow to dynamically inject toolbar buttons (via plugins)
- use interface for formatting dates
- improve docker issue template
- bump version and composer packages
This commit is contained in:
Kevin Papst
2023-11-08 22:30:22 +01:00
committed by GitHub
parent 7034066de9
commit 6a828cc9bd
22 changed files with 111 additions and 120 deletions

View File

@@ -17,11 +17,11 @@ class Constants
/**
* The current release version
*/
public const VERSION = '2.2.1';
public const VERSION = '2.3.0';
/**
* The current release: major * 10000 + minor * 100 + patch
*/
public const VERSION_ID = 20201;
public const VERSION_ID = 20300;
/**
* The software name
*/

View File

@@ -288,7 +288,7 @@ final class ProfileController extends AbstractController
}
return $this->render('user/preferences.html.twig', [
'tab' => 'preferences',
'tab' => 'settings',
'user' => $profile,
'form' => $form->createView(),
'sections' => $sections

View File

@@ -19,6 +19,7 @@ class ThemeEvent extends Event
public const HTML_HEAD = 'app.theme.html_head';
public const CONTENT_BEFORE = 'app.theme.content_before';
public const CONTENT_START = 'app.theme.content_start';
public const TOOLBAR = 'app.theme.toolbar';
public const CONTENT_END = 'app.theme.content_end';
public const CONTENT_AFTER = 'app.theme.content_after';

View File

@@ -33,6 +33,9 @@ final class UserFormsSubscriber extends AbstractActionsSubscriber
if ($this->isGranted('edit', $user)) {
$event->addAction('edit', ['url' => $this->path('user_profile_edit', ['username' => $user->getUserIdentifier()]), 'title' => 'profile-stats', 'translation_domain' => 'actions']);
}
if ($this->isGranted('preferences', $user)) {
$event->addConfig($this->path('user_profile_preferences', ['username' => $user->getUserIdentifier()]));
}
if ($this->isGranted('password', $user)) {
$event->addAction('password', ['url' => $this->path('user_profile_password', ['username' => $user->getUserIdentifier()]), 'title' => 'profile.password']);
}

View File

@@ -47,10 +47,6 @@ final class UserSubscriber extends AbstractActionsSubscriber
$event->addActionToSubmenu('edit', $id, $action);
}
if ($this->isGranted('preferences', $user)) {
$event->addConfig($this->path('user_profile_preferences', ['username' => $user->getUserIdentifier()]));
}
if (($event->getUser()->getId() === $user->getId() && $this->isGranted('report:user')) || $this->isGranted('report:other')) {
$event->addActionToSubmenu('report', 'weekly', ['url' => $this->path('report_user_week', ['user' => $user->getId()]), 'translation_domain' => 'reporting', 'title' => 'report_user_week']);
$event->addActionToSubmenu('report', 'monthly', ['url' => $this->path('report_user_month', ['user' => $user->getId()]), 'translation_domain' => 'reporting', 'title' => 'report_user_month']);

View File

@@ -17,6 +17,7 @@ use App\Utils\FormFormatConverter;
use App\Utils\JavascriptFormatConverter;
use App\Utils\LocaleFormatter;
use DateTime;
use DateTimeInterface;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Contracts\Translation\LocaleAwareInterface;
use Twig\Extension\AbstractExtension;
@@ -132,7 +133,7 @@ final class LocaleFormatExtensions extends AbstractExtension implements LocaleAw
return (string) $this->getFormatter()->dateShort($date);
}
public function dateTime(DateTime|string|null $date): string
public function dateTime(DateTimeInterface|string|null $date): string
{
return (string) $this->getFormatter()->dateTime($date);
}

View File

@@ -11,7 +11,7 @@ namespace App\Utils;
use App\Configuration\LocaleService;
use App\Entity\Timesheet;
use DateTime;
use DateTimeInterface;
use Exception;
use IntlDateFormatter;
use NumberFormatter;
@@ -195,7 +195,7 @@ final class LocaleFormatter
return (string) $formatted;
}
public function dateTime(DateTime|string|null $date): ?string
public function dateTime(DateTimeInterface|string|null $date): ?string
{
if ($date === null || $date === '') {
return null;