Browse Source

add raw key/value download links

master
ghost 10 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 @@ -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'

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

@ -23,10 +23,14 @@ @@ -23,10 +23,14 @@
<div class="t-center px-16">
<div class="mx-a mw-560 px-16">
<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 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 class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

Loading…
Cancel
Save