From 4ab437bf7be5dcbdfd710c1261ffb5b9f34e20bb Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Sat, 16 Apr 2016 12:11:17 +0800 Subject: [PATCH] few more details about block added --- src/page.h | 2 ++ src/templates/block.html | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/page.h b/src/page.h index f0e82cb..4c43d1d 100644 --- a/src/page.h +++ b/src/page.h @@ -348,6 +348,8 @@ namespace xmreg { // transcation in the block vector tx_hashes = blk.tx_hashes; + bool have_txs = !blk.tx_hashes.empty(); + // initalise page tempate map with basic info about blockchain mstch::map context { {"blk_hash" , blk_hash_str}, diff --git a/src/templates/block.html b/src/templates/block.html index 556ddff..e72eb4f 100644 --- a/src/templates/block.html +++ b/src/templates/block.html @@ -1,15 +1,15 @@
-

Block hash (height): {{blk_hash}} ({{blk_height}})

+

Block hash (height): {{blk_hash}} ({{blk_height}})

{{#have_prev_hash}} -

Previous block: {{prev_hash}}

+
Previous block: {{prev_hash}}
{{/have_prev_hash}} {{#have_next_hash}} -

Next block: {{next_hash}}

+
Next block: {{next_hash}}
{{/have_next_hash}} @@ -18,7 +18,7 @@ Timestamp [UCT]:{{blk_timestamp}} Age {{age_format}}:{{blk_age}} - Time from previous block [h:m:s]:{{delta_time}} + Δ [h:m:s]:{{delta_time}} Major version:{{major_ver}}