diff --git a/.env b/.env index 793758b..70295fc 100644 --- a/.env +++ b/.env @@ -35,3 +35,10 @@ DEFAULT_URI=http://localhost # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" ###< doctrine/doctrine-bundle ### + +###> symfony/messenger ### +# Choose one of the transports below +# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages +# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages +MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 +###< symfony/messenger ### diff --git a/composer.json b/composer.json index 142fa33..9978763 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,9 @@ "symfony/form": "8.1.*", "symfony/framework-bundle": "8.1.*", "symfony/http-client": "8.1.*", + "symfony/messenger": "8.1.*", "symfony/runtime": "8.1.*", + "symfony/scheduler": "8.1.*", "symfony/security-bundle": "8.1.*", "symfony/twig-bundle": "8.1.*", "symfony/validator": "8.1.*", diff --git a/composer.lock b/composer.lock index 85f25c5..53440b6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d5ff7449d92b622be5a4168fbc982b1", + "content-hash": "97253ca2b47f72fd845cd6bc2d00edb6", "packages": [ { "name": "doctrine/collections", @@ -3275,6 +3275,98 @@ ], "time": "2026-06-27T09:27:36+00:00" }, + { + "name": "symfony/messenger", + "version": "v8.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/messenger.git", + "reference": "fa890d0632db0b5e8bc547560b412de824b3b9cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/messenger/zipball/fa890d0632db0b5e8bc547560b412de824b3b9cd", + "reference": "fa890d0632db0b5e8bc547560b412de824b3b9cd", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "psr/log": "^1|^2|^3", + "symfony/clock": "^7.4|^8.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/console": "<7.4", + "symfony/dependency-injection": "<8.1", + "symfony/event-dispatcher-contracts": "<2.5", + "symfony/lock": "<7.4", + "symfony/serializer": "<7.4.4|>=8.0,<8.0.4" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/console": "^7.4|^8.0", + "symfony/dependency-injection": "^8.1", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/property-access": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", + "symfony/routing": "^7.4|^8.0", + "symfony/serializer": "^7.4.4|^8.0.4", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Messenger\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Samuel Roze", + "email": "samuel.roze@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps applications send and receive messages to/from other applications or via message queues", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/messenger/tree/v8.1.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-08-21T20:43:01+00:00" + }, { "name": "symfony/options-resolver", "version": "v8.1.0", @@ -4257,6 +4349,91 @@ ], "time": "2026-05-29T05:06:50+00:00" }, + { + "name": "symfony/scheduler", + "version": "v8.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/scheduler.git", + "reference": "9791e381ac09bad9986da24eb15f24fe49e220d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/scheduler/zipball/9791e381ac09bad9986da24eb15f24fe49e220d3", + "reference": "9791e381ac09bad9986da24eb15f24fe49e220d3", + "shasum": "" + }, + "require": { + "php": ">=8.4.1", + "symfony/clock": "^7.4|^8.0" + }, + "require-dev": { + "dragonmantank/cron-expression": "^3.1", + "symfony/cache": "^7.4.8|^8.0.8", + "symfony/console": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Scheduler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sergey Rabochiy", + "email": "upyx.00@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides scheduling through Symfony Messenger", + "homepage": "https://symfony.com", + "keywords": [ + "cron", + "schedule", + "scheduler" + ], + "support": { + "source": "https://github.com/symfony/scheduler/tree/v8.1.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-08-21T17:47:34+00:00" + }, { "name": "symfony/security-bundle", "version": "v8.1.1", diff --git a/config/packages/messenger.yaml b/config/packages/messenger.yaml new file mode 100644 index 0000000..19db483 --- /dev/null +++ b/config/packages/messenger.yaml @@ -0,0 +1,22 @@ +framework: + messenger: + # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling. + # failure_transport: failed + + transports: + # https://symfony.com/doc/current/messenger.html#transport-configuration + # async: '%env(MESSENGER_TRANSPORT_DSN)%' + # failed: 'doctrine://default?queue_name=failed' + sync: 'sync://' + + routing: + # Route your messages to the transports + # 'App\Message\YourMessage': async + +# when@test: +# framework: +# messenger: +# transports: +# # replace with your transport name here (e.g., my_transport: 'in-memory://') +# # For more Messenger testing tools, see https://github.com/zenstruck/messenger-test +# async: 'in-memory://' diff --git a/config/reference.php b/config/reference.php index 36b6d7f..c025426 100644 --- a/config/reference.php +++ b/config/reference.php @@ -427,7 +427,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * resources?: string|array, * }, * messenger?: bool|array{ // Messenger configuration - * enabled?: bool|Param, // Default: false + * enabled?: bool|Param, // Default: true * routing?: array>, * serializer?: array{ * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" @@ -467,7 +467,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * }>, * }, * scheduler?: bool|array{ // Scheduler configuration - * enabled?: bool|Param, // Default: false + * enabled?: bool|Param, // Default: true * }, * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true * http_client?: bool|array{ // HTTP Client configuration diff --git a/migrations/Version20260825103258.php b/migrations/Version20260825103258.php new file mode 100644 index 0000000..4ae7fc3 --- /dev/null +++ b/migrations/Version20260825103258.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE user_settings (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, label VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci`'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE user_settings'); + } +} diff --git a/migrations/Version20260825104115.php b/migrations/Version20260825104115.php new file mode 100644 index 0000000..88b0f19 --- /dev/null +++ b/migrations/Version20260825104115.php @@ -0,0 +1,35 @@ +addSql('ALTER TABLE user_settings CHANGE user_id user_id_id INT NOT NULL'); + $this->addSql('ALTER TABLE user_settings ADD CONSTRAINT FK_5C844C59D86650F FOREIGN KEY (user_id_id) REFERENCES `user` (id)'); + $this->addSql('CREATE INDEX IDX_5C844C59D86650F ON user_settings (user_id_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE user_settings DROP FOREIGN KEY FK_5C844C59D86650F'); + $this->addSql('DROP INDEX IDX_5C844C59D86650F ON user_settings'); + $this->addSql('ALTER TABLE user_settings CHANGE user_id_id user_id INT NOT NULL'); + } +} diff --git a/package.json b/package.json index 47d94c7..497e644 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,12 @@ { + "type": "module", "scripts": { "dev-server": "encore dev-server", "dev:webpack": "encore dev", "watch": "encore dev --watch", - "dev": "concurrently --names server,assets \"frankenphp run\" \"npm run watch\"", - "build": "encore production --progress" + "dev": "concurrently --names server,assets,scheduler \"frankenphp run\" \"npm run watch\" \"frankenphp php-cli bin/console messenger:consume scheduler_scheduler_weather -vv\"", + "build": "encore production --progress", + "scheduler": "frankenphp php-cli bin/console messenger:consume scheduler_scheduler_weather" }, "dependencies": { "@fontsource/noto-sans": "^5.3.0", diff --git a/src/Command/RefreshWeatherCommand.php b/src/Command/RefreshWeatherCommand.php index 53bc5cc..300809c 100644 --- a/src/Command/RefreshWeatherCommand.php +++ b/src/Command/RefreshWeatherCommand.php @@ -4,28 +4,63 @@ namespace App\Command; use App\Repository\SettingsRepository; use App\Service\WeatherService; +use Psr\Log\LoggerInterface; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Scheduler\Attribute\AsPeriodicTask; -#[AsCommand(name: 'app:weather:refresh', description: 'Refresh cached Open-Meteo forecasts for saved locations.')] +#[AsCommand( + name: 'app:weather:refresh', + description: 'Refresh cached Open-Meteo forecasts for saved locations.', +)] +#[AsPeriodicTask( + frequency: '12 hours', + schedule: 'scheduler_weather', +)] final class RefreshWeatherCommand extends Command { - public function __construct(private SettingsRepository $settings, private WeatherService $weather) - { + public function __construct( + private SettingsRepository $settings, + private WeatherService $weather, + private LoggerInterface $logger, + ) { parent::__construct(); } protected function execute(InputInterface $input, OutputInterface $output): int { + $startedAt = microtime(true); + + $this->logger->info('Scheduled weather refresh started.'); + + $locations = $this->settings->findWithLocation(); + $locationCount = count($locations); $rows = 0; - foreach ($this->settings->findWithLocation() as $settings) { + + $this->logger->info(sprintf( + 'Found %d location(s) with weather settings.', + $locationCount + )); + + foreach ($locations as $settings) { $rows += $this->weather->refresh($settings); } - $output->writeln(sprintf('Refreshed %d daily weather forecasts.', $rows)); + $duration = microtime(true) - $startedAt; + + $message = sprintf( + 'Weather refresh completed: %d location(s), %d daily forecast(s) refreshed in %.2f seconds.', + $locationCount, + $rows, + $duration, + ); + + $output->writeln($message); + + $this->logger->info($message); return Command::SUCCESS; } -} +} \ No newline at end of file diff --git a/src/Controller/TaskController.php b/src/Controller/TaskController.php index 8ac571a..65a797d 100644 --- a/src/Controller/TaskController.php +++ b/src/Controller/TaskController.php @@ -5,6 +5,7 @@ use App\Entity\Settings; use App\Entity\User; use App\Entity\Task; +use App\Entity\UserSettings; use App\Form\TaskType; use App\Repository\TaskRepository; use App\Service\TaskRecommendationService; @@ -202,5 +203,12 @@ final class TaskController extends AbstractController return $this->redirectToRoute('app_task_index'); } + + public function getUserSettings(string $label): Settings{ + $user = $this->getUser(); + $settings = $user->getSettings(); + + return $settings; + } } diff --git a/src/Controller/UserSettingsController.php b/src/Controller/UserSettingsController.php new file mode 100644 index 0000000..e6398d7 --- /dev/null +++ b/src/Controller/UserSettingsController.php @@ -0,0 +1,81 @@ +render('user_settings/index.html.twig', [ + 'user_settings' => $userSettingsRepository->findAll(), + ]); + } + + #[Route('/new', name: 'app_user_settings_new', methods: ['GET', 'POST'])] + public function new(Request $request, EntityManagerInterface $entityManager): Response + { + $userSetting = new UserSettings(); + $form = $this->createForm(UserSettings1Type::class, $userSetting); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->persist($userSetting); + $entityManager->flush(); + + return $this->redirectToRoute('app_user_settings_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('user_settings/new.html.twig', [ + 'user_setting' => $userSetting, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_user_settings_show', methods: ['GET'])] + public function show(UserSettings $userSetting): Response + { + return $this->render('user_settings/show.html.twig', [ + 'user_setting' => $userSetting, + ]); + } + + #[Route('/{id}/edit', name: 'app_user_settings_edit', methods: ['GET', 'POST'])] + public function edit(Request $request, UserSettings $userSetting, EntityManagerInterface $entityManager): Response + { + $form = $this->createForm(UserSettings1Type::class, $userSetting); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $entityManager->flush(); + + return $this->redirectToRoute('app_user_settings_index', [], Response::HTTP_SEE_OTHER); + } + + return $this->render('user_settings/edit.html.twig', [ + 'user_setting' => $userSetting, + 'form' => $form, + ]); + } + + #[Route('/{id}', name: 'app_user_settings_delete', methods: ['POST'])] + public function delete(Request $request, UserSettings $userSetting, EntityManagerInterface $entityManager): Response + { + if ($this->isCsrfTokenValid('delete'.$userSetting->getId(), $request->getPayload()->getString('_token'))) { + $entityManager->remove($userSetting); + $entityManager->flush(); + } + + return $this->redirectToRoute('app_user_settings_index', [], Response::HTTP_SEE_OTHER); + } +} diff --git a/src/Entity/User.php b/src/Entity/User.php index 18c599e..6da463a 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -3,6 +3,8 @@ namespace App\Entity; use App\Repository\UserRepository; +use Doctrine\Common\Collections\ArrayCollection; +use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; @@ -35,6 +37,17 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\OneToOne(mappedBy: 'user', cascade: ['persist', 'remove'])] private ?Settings $settings = null; + /** + * @var Collection + */ + #[ORM\OneToMany(targetEntity: UserSettings::class, mappedBy: 'user_id', orphanRemoval: true)] + private Collection $userSettings; + + public function __construct() + { + $this->userSettings = new ArrayCollection(); + } + public function getId(): ?int @@ -128,4 +141,34 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface return $data; } + + /** + * @return Collection + */ + public function getUserSettings(): Collection + { + return $this->userSettings; + } + + public function addUserSetting(UserSettings $userSetting): static + { + if (!$this->userSettings->contains($userSetting)) { + $this->userSettings->add($userSetting); + $userSetting->setUserId($this); + } + + return $this; + } + + public function removeUserSetting(UserSettings $userSetting): static + { + if ($this->userSettings->removeElement($userSetting)) { + // set the owning side to null (unless already changed) + if ($userSetting->getUserId() === $this) { + $userSetting->setUserId(null); + } + } + + return $this; + } } diff --git a/src/Entity/UserSettings.php b/src/Entity/UserSettings.php new file mode 100644 index 0000000..f5d2134 --- /dev/null +++ b/src/Entity/UserSettings.php @@ -0,0 +1,69 @@ +id; + } + + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabel(string $label): static + { + $this->label = $label; + + return $this; + } + + public function getValue(): ?string + { + return $this->value; + } + + public function setValue(string $value): static + { + $this->value = $value; + + return $this; + } + + public function getUserId(): ?User + { + return $this->user_id; + } + + public function setUserId(?User $user_id): static + { + $this->user_id = $user_id; + + return $this; + } +} diff --git a/src/Form/UserSettings1Type.php b/src/Form/UserSettings1Type.php new file mode 100644 index 0000000..ada5bc0 --- /dev/null +++ b/src/Form/UserSettings1Type.php @@ -0,0 +1,32 @@ +add('label') + ->add('value') + ->add('user_id', EntityType::class, [ + 'class' => User::class, + 'choice_label' => 'id', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => UserSettings::class, + ]); + } +} diff --git a/src/Form/UserSettingsType.php b/src/Form/UserSettingsType.php new file mode 100644 index 0000000..6843887 --- /dev/null +++ b/src/Form/UserSettingsType.php @@ -0,0 +1,27 @@ +add('user_id') + ->add('label') + ->add('value') + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => UserSettings::class, + ]); + } +} diff --git a/src/Repository/UserSettingsRepository.php b/src/Repository/UserSettingsRepository.php new file mode 100644 index 0000000..db057b5 --- /dev/null +++ b/src/Repository/UserSettingsRepository.php @@ -0,0 +1,43 @@ + + */ +class UserSettingsRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, UserSettings::class); + } + + // /** + // * @return UserSettings[] Returns an array of UserSettings objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('u') + // ->andWhere('u.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('u.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?UserSettings + // { + // return $this->createQueryBuilder('u') + // ->andWhere('u.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Schedule.php b/src/Schedule.php new file mode 100644 index 0000000..bb3edce --- /dev/null +++ b/src/Schedule.php @@ -0,0 +1,28 @@ +stateful($this->cache) // ensure missed tasks are executed + ->processOnlyLastMissedRun(true) // ensure only last missed task is run + + // add your own tasks here + // see https://symfony.com/doc/current/scheduler.html#attaching-recurring-messages-to-a-schedule + ; + } +} diff --git a/symfony.lock b/symfony.lock index 767c298..1f36f72 100644 --- a/symfony.lock +++ b/symfony.lock @@ -101,6 +101,18 @@ "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" } }, + "symfony/messenger": { + "version": "8.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.0", + "ref": "d8936e2e2230637ef97e5eecc0eea074eecae58b" + }, + "files": [ + "config/packages/messenger.yaml" + ] + }, "symfony/property-info": { "version": "8.1", "recipe": { @@ -126,6 +138,18 @@ "config/routes.yaml" ] }, + "symfony/scheduler": { + "version": "8.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.2", + "ref": "caea3c928ee9e1b21288fd76aef36f16ea355515" + }, + "files": [ + "src/Schedule.php" + ] + }, "symfony/security-bundle": { "version": "8.1", "recipe": { diff --git a/templates/user_settings/_delete_form.html.twig b/templates/user_settings/_delete_form.html.twig new file mode 100644 index 0000000..c679d5f --- /dev/null +++ b/templates/user_settings/_delete_form.html.twig @@ -0,0 +1,4 @@ +
+ + +
diff --git a/templates/user_settings/_form.html.twig b/templates/user_settings/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/user_settings/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/user_settings/edit.html.twig b/templates/user_settings/edit.html.twig new file mode 100644 index 0000000..d00bf8e --- /dev/null +++ b/templates/user_settings/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit UserSettings{% endblock %} + +{% block body %} +

Edit UserSettings

+ + {{ include('user_settings/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('user_settings/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/user_settings/index.html.twig b/templates/user_settings/index.html.twig new file mode 100644 index 0000000..a0aa14e --- /dev/null +++ b/templates/user_settings/index.html.twig @@ -0,0 +1,37 @@ +{% extends 'base.html.twig' %} + +{% block title %}UserSettings index{% endblock %} + +{% block body %} +

UserSettings index

+ + + + + + + + + + + + {% for user_setting in user_settings %} + + + + + + + {% else %} + + + + {% endfor %} + +
IdLabelValueactions
{{ user_setting.id }}{{ user_setting.label }}{{ user_setting.value }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/user_settings/new.html.twig b/templates/user_settings/new.html.twig new file mode 100644 index 0000000..faacf6a --- /dev/null +++ b/templates/user_settings/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New UserSettings{% endblock %} + +{% block body %} +

Create new UserSettings

+ + {{ include('user_settings/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/user_settings/show.html.twig b/templates/user_settings/show.html.twig new file mode 100644 index 0000000..9efe828 --- /dev/null +++ b/templates/user_settings/show.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}UserSettings{% endblock %} + +{% block body %} +

UserSettings

+ + + + + + + + + + + + + + + + +
Id{{ user_setting.id }}
Label{{ user_setting.label }}
Value{{ user_setting.value }}
+ + back to list + + edit + + {{ include('user_settings/_delete_form.html.twig') }} +{% endblock %}