From b82325559b29a81a57d7e8bcf164eb552c4e9872 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 14 Feb 2024 23:30:59 +0200 Subject: [PATCH] add raw key/value download links --- src/Controller/MainController.php | 6 +++++- templates/default/main/transaction.html.twig | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index 14e8313..21310c0 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -111,12 +111,16 @@ class MainController extends AbstractController } #[Route( - '/{transaction}', + '/{transaction}/{get}', name: 'main_transaction', requirements: [ 'transaction' => '^[A-f0-9]{64}$', ], + defaults: + [ + 'get' => null, + ], methods: [ 'GET' diff --git a/templates/default/main/transaction.html.twig b/templates/default/main/transaction.html.twig index 9a0f91d..d961318 100644 --- a/templates/default/main/transaction.html.twig +++ b/templates/default/main/transaction.html.twig @@ -23,10 +23,14 @@
- {{ record.key | format_type(record.type.key) }} + + {{ record.key | format_type(record.type.key) }} +
- {{ record.value | format_type(record.type.value) | nl2br }} + + {{ record.value | format_type(record.type.value) | nl2br }} +
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}