Browse Source

add raw key/value download links

master
ghost 9 months ago
parent
commit
b82325559b
  1. 6
      src/Controller/MainController.php
  2. 8
      templates/default/main/transaction.html.twig

6
src/Controller/MainController.php

@ -111,12 +111,16 @@ class MainController extends AbstractController
} }
#[Route( #[Route(
'/{transaction}', '/{transaction}/{get}',
name: 'main_transaction', name: 'main_transaction',
requirements: requirements:
[ [
'transaction' => '^[A-f0-9]{64}$', 'transaction' => '^[A-f0-9]{64}$',
], ],
defaults:
[
'get' => null,
],
methods: methods:
[ [
'GET' 'GET'

8
templates/default/main/transaction.html.twig

@ -23,10 +23,14 @@
<div class="t-center px-16"> <div class="t-center px-16">
<div class="mx-a mw-560 px-16"> <div class="mx-a mw-560 px-16">
<div class="f-s-16 mb-16 of-a"> <div class="f-s-16 mb-16 of-a">
{{ record.key | format_type(record.type.key) }} <a href="{{ path('main_transaction',{'transaction':record.transaction,'get':'key'}) }}">
{{ record.key | format_type(record.type.key) }}
</a>
</div> </div>
<div class="mb-20 of-a"> <div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) | nl2br }} <a href="{{ path('main_transaction',{'transaction':record.transaction,'get':'value'}) }}">
{{ record.value | format_type(record.type.value) | nl2br }}
</a>
</div> </div>
<div class="f-s-12"> <div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }} {{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

Loading…
Cancel
Save