* Finish task #5123.

This commit is contained in:
chenfeiCF
2018-11-14 14:52:00 +08:00
parent f37251a734
commit 4a021cb8a5
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -1084,9 +1084,12 @@ class block extends control
if($product->status == 'closed') $closed++;
}
$this->view->total = $normal + $closed;
$this->view->normal = $normal;
$this->view->closed = $closed;
$total = $normal + $closed;
$this->view->total = $total;
$this->view->normal = $normal;
$this->view->closed = $closed;
$this->view->normalPercent = $total ? round(($normal / $total), 2) * 100 : 0;
}
/**
@@ -20,7 +20,7 @@
</style>
<div class="panel-body table-row">
<div class="col-6 text-middle text-center">
<div class="progress-pie inline-block" data-value="<?php echo 100 * $normal/($closed + $normal);?>" data-doughnut-size="80">
<div class="progress-pie inline-block" data-value="<?php echo $normalPercent;?>" data-doughnut-size="80">
<canvas width="100" height="100" style="width: 100px; height: 100px;"></canvas>
<div class="progress-info">
<small><?php echo $lang->product->all;?></small>