* add tip content to block without content.

This commit is contained in:
Catouse
2018-06-25 13:25:47 +08:00
parent 1a0cd36e0d
commit a4d0bb2d60
15 changed files with 56 additions and 2 deletions
+8 -1
View File
@@ -332,7 +332,14 @@ class block extends control
$html = '';
if($block->block == 'html')
{
$html = "<div class='panel-body'><div class='article-content'>" . htmlspecialchars_decode($block->params->html) .'</div></div>';
if (empty($block->params->html))
{
$html = "<div class='empty-tip'>" . $this->lang->block->emptyTip . "</div>";
}
else
{
$html = "<div class='panel-body'><div class='article-content'>" . htmlspecialchars_decode($block->params->html) .'</div></div>';
}
}
elseif($block->source != '')
{
+1
View File
@@ -42,6 +42,7 @@ $lang->block->myProject = 'My ' . $lang->projectCommon;
$lang->block->myProduct = 'My ' . $lang->productCommon;
$lang->block->delayed = 'Delayed';
$lang->block->noData = 'There is no data in this type of reports.';
$lang->block->emptyTip = 'No Information';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Name';
+1
View File
@@ -42,6 +42,7 @@ $lang->block->myProject = '进行中的' . $lang->projectCommon;
$lang->block->myProduct = '未关闭的' . $lang->productCommon;
$lang->block->delayed = '已延期';
$lang->block->noData = '当前统计类型下暂无数据';
$lang->block->emptyTip = '暂无信息';
$lang->block->params = new stdclass();
$lang->block->params->name = '参数名称';
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($bugs)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-bugs .c-id {width: 55px;}
.block-bugs .c-level {width: 60px;text-align: center;}
@@ -59,3 +62,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($builds)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-builds'>
<thead>
@@ -40,3 +43,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+5
View File
@@ -1,3 +1,4 @@
<?php
/**
* The case block view file of block module of RanZhi.
@@ -10,6 +11,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($cases)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<style>
.block-cases.block-sm .c-status{text-align:center}
@@ -63,3 +67,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -1,3 +1,6 @@
<?php if(empty($actions)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-dynamic .timeline > li .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.block-dynamic .timeline > li:hover .timeline-text {overflow: visible; text-overflow: normal; white-space: normal;}
@@ -20,3 +23,4 @@
?>
</ul>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($plans)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-plan'>
<thead>
@@ -42,3 +45,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php if(empty($productStats)): ?>
<div class='empty-tip'><?php common::printLink('product', 'create', '', "<i class='icon-plus'></i> " . $lang->product->create, '', "class='btn btn-primary'") ?></div>
<?php else:?>
<style>
.block-products.block-sm .c-project {display: none;}
</style>
@@ -47,3 +50,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php if(empty($projectStats)): ?>
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php else:?>
<div class="panel-body has-table">
<table class='table table-borderless table-hover table-fixed-head tablesorter block-projects tablesorter'>
<thead>
@@ -65,3 +68,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($releases)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed tablesorter block-release'>
<thead>
@@ -53,3 +56,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($stories)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-stories .c-id {width: 55px;}
.block-stories .c-pri {width: 45px;text-align: center;}
@@ -72,3 +75,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($tasks)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-tasks .c-id {width: 55px;}
.block-tasks .c-pri {width: 45px;text-align: center;}
@@ -60,3 +63,4 @@
</tbody>
</table>
</div>
<?php endif;?>
+4
View File
@@ -10,6 +10,9 @@
* @link http://www.ranzhi.org
*/
?>
<?php if(empty($testtasks)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-testtask'>
<thead>
@@ -48,3 +51,4 @@
</tbody>
</table>
</div>
<?php endif;?>
File diff suppressed because one or more lines are too long