diff --git a/templates/bluemoon/dashboard/blocks/default.tpl b/templates/bluemoon/dashboard/blocks/default.tpl index 2c39f49b..52fa1c8f 100644 --- a/templates/bluemoon/dashboard/blocks/default.tpl +++ b/templates/bluemoon/dashboard/blocks/default.tpl @@ -34,7 +34,7 @@ {$BLOCKSFOUND[block].estshares|number_format} {$BLOCKSFOUND[block].shares|number_format} - {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares} + {if estshares > 0 }{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}{else}{assign var=percentage value="0"}{/if} {$percentage|number_format:"2"} @@ -51,4 +51,4 @@ {/if} -{/if} \ No newline at end of file +{/if} diff --git a/templates/bootstrap/dashboard/blocks/default.tpl b/templates/bootstrap/dashboard/blocks/default.tpl index d947f537..efa4f077 100644 --- a/templates/bootstrap/dashboard/blocks/default.tpl +++ b/templates/bootstrap/dashboard/blocks/default.tpl @@ -29,7 +29,7 @@ {$BLOCKSFOUND[block].estshares|number_format} {$BLOCKSFOUND[block].shares|number_format} - {math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares} + {if estshares > 0 }{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares|default:"0" estshares=$BLOCKSFOUND[block].estshares}{else}{assign var=percentage value="0"}{/if} {$percentage|number_format:"2"} @@ -46,4 +46,4 @@ {/if} -{/if} \ No newline at end of file +{/if}