* change for flowchart.

This commit is contained in:
wangyidong
2018-01-24 17:05:40 +08:00
parent f6be2bb180
commit b668217ba2
5 changed files with 95 additions and 109 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ class block extends control
$html = '';
if($block->block == 'html')
{
$html = "<div class='article-content'>" . htmlspecialchars_decode($block->params->html) .'</div>';
$html = "<div class='panel-body'><div class='article-content'>" . htmlspecialchars_decode($block->params->html) .'</div></div>';
}
elseif($block->source != '')
{
+3 -3
View File
@@ -18,7 +18,7 @@ $useGuest = $this->app->user->account == 'guest';
?>
<?php include '../../common/view/tablesorter.html.php';?>
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<div class='row'>
<div>
<div class='col-md-8 col-main'>
<?php foreach($longBlocks as $index => $block):?>
<?php if(isset($config->block->closed) and strpos(",{$config->block->closed},", ",{$block->source}|{$block->block},") !== false) continue;?>
@@ -54,7 +54,7 @@ $useGuest = $this->app->user->account == 'guest';
<?php if($hasHeading):?>
</div>
<?php endif;?>
<div class='panel-body conatiner-fluid'><?php echo $this->fetch('block', 'printBlock', "id=$block->id")?></div>
<?php echo $this->fetch('block', 'printBlock', "id=$block->id&module=$module")?>
</div>
</div>
</div>
@@ -95,7 +95,7 @@ $useGuest = $this->app->user->account == 'guest';
<?php if($hasHeading):?>
</div>
<?php endif;?>
<div class='panel-body conatiner-fluid'><?php echo $this->fetch('block', 'printBlock', "id=$block->id")?></div>
<?php echo $this->fetch('block', 'printBlock', "id=$block->id&module=$module")?>
</div>
</div>
</div>
+17 -15
View File
@@ -1,15 +1,17 @@
<ul class="timeline timeline-tag-left">
<?php
$i = 0;
foreach($actions as $action)
{
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
if($action->action == 'login' or $action->action == 'logout' or empty($action->objectLink)) $action->objectName = $action->objectLabel = '';
$class = $i % 3 == 0 ? "class='active'" : '';
echo "<li $class><div>";
printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName);
echo "</div></li>";
$i++;
}
?>
</ul>
<div class='panel-body'>
<ul class="timeline timeline-tag-left">
<?php
$i = 0;
foreach($actions as $action)
{
$user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
if($action->action == 'login' or $action->action == 'logout' or empty($action->objectLink)) $action->objectName = $action->objectLabel = '';
$class = $i % 3 == 0 ? "class='active'" : '';
echo "<li $class><div>";
printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName);
echo "</div></li>";
$i++;
}
?>
</ul>
</div>
+25 -43
View File
@@ -1,43 +1,25 @@
<div class='flowchart'>
<?php foreach ($lang->block->flowchart as $flow):?>
<?php $idx = 0 ?>
<div class='row'>
<?php foreach ($flow as $flowItem):?>
<div class='flow-item flow-item-<?php echo $idx++ ?>'><div><?php echo $flowItem ?></div></div>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<style>
.flowchart {padding: 10px 15px 1px 10px; min-width: 500px;}
.flow-item {float: left; width: 16.66667%; max-width: 180px; text-align: center; margin-bottom: 9px; padding-right: 5px;}
.flow-item > div {position: relative; padding: 5px 0 5px 12px; line-height: 20px; background: #90A4AE; white-space:nowrap; overflow: visible; color: #fff;}
.flow-item > div:before, .flow-item > div:after {content: ' '; display: block; width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 15px; border-color: transparent transparent transparent #90A4AE; position: absolute; left: 0; top: 0}
.ie-8 .flow-item > div:before {display: none}
.flow-item > div:before {border-left-color: #fff; z-index: 1}
.flow-item > div:after {left: auto; right: -14px; z-index: 2}
.ie-8 .flow-item > div {margin-right: 10px}
.flow-item-0 > div:before {display: none}
.flow-item-1 > div {background: #1976D2}
.flow-item-1 > div:after {border-left-color: #1976D2}
.flow-item-2 > div {background: #4CAF50}
.flow-item-2 > div:after {border-left-color: #4CAF50}
.flow-item-3 > div {background: #F57C00}
.flow-item-3 > div:after {border-left-color: #F57C00}
.flow-item-4 > div {background: #EF5350}
.flow-item-4 > div:after {border-left-color: #EF5350}
.flow-item-5 > div {background: #AB47BC}
.flow-item-5 > div:after {border-left-color: #AB47BC}
.flow-item-1 > div:hover {background: #1565C0}
.flow-item-1 > div:hover:after {border-left-color: #1565C0}
.flow-item-2 > div:hover {background: #43A047}
.flow-item-2 > div:hover:after {border-left-color: #43A047}
.flow-item-3 > div:hover {background: #EF6C00}
.flow-item-3 > div:hover:after {border-left-color: #EF6C00}
.flow-item-4 > div:hover {background: #E53935}
.flow-item-4 > div:hover:after {border-left-color: #E53935}
.flow-item-5 > div:hover {background: #9C27B0}
.flow-item-5 > div:hover:after {border-left-color: #9C27B0}
html[lang="en"] .flowchart {min-width: 700px}
</style>
<table class="table table-borderless">
<thead>
<tr>
<th><span class="flowchart-title"><?php echo $lang->block->lblFlowchart?></span></th>
<th><div><span class="flowchart-step">1</span></div></th>
<th><div><span class="flowchart-step">2</span></div></th>
<th><div><span class="flowchart-step">3</span></div></th>
<th><div><span class="flowchart-step">4</span></div></th>
<th><div><span class="flowchart-step">5</span></div></th>
</tr>
</thead>
<tbody>
<?php foreach($lang->block->flowchart as $flowchart):?>
<tr>
<?php for($i = 0; $i < 6; $i++):?>
<?php if($i == 0):?>
<th><?php echo $flowchart[$i];?></th>
<?php else:?>
<td><?php echo zget($flowchart, $i, '')?></td>
<?php endif;?>
<?php endfor;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
+49 -47
View File
@@ -10,56 +10,58 @@
* @link http://www.zentao.net
*/
?>
<div class="row">
<div class="col col-left">
<h4><?php printf($lang->block->welcomeList[$welcomeType], $app->user->realname)?></h4>
<ul class="timeline timeline-sm">
<?php
foreach($lang->tutorial->tasks as $taskKey => $task)
{
$class = strpos(",$tutorialed,", ",$taskKey,") !== false ? "class='active'" : '';
echo "<li $class>" . html::a($this->createLink('tutorial', 'index', "referer=&task=$taskKey"), $task['title']) . "</li>";
}
?>
</ul>
</div>
<div class="col col-right">
<h4><small class="text-muted"><?php echo date(DT_DATE3)?></small> <?php echo $lang->block->leftToday?></h4>
<div class="row tiles">
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myTask?></div>
<div class="tile-amount"><?php echo (int)$tasks;?></div>
<?php if(!empty($delay['task'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['task']?></span>
<div class="panel-body conatiner-fluid">
<div class="row">
<div class="col col-left">
<h4><?php printf($lang->block->welcomeList[$welcomeType], $app->user->realname)?></h4>
<ul class="timeline timeline-sm">
<?php
foreach($lang->tutorial->tasks as $taskKey => $task)
{
$class = strpos(",$tutorialed,", ",$taskKey,") !== false ? "class='active'" : '';
echo "<li $class>" . html::a($this->createLink('tutorial', 'index', "referer=&task=$taskKey"), $task['title']) . "</li>";
}
?>
</ul>
</div>
<div class="col col-right">
<h4><small class="text-muted"><?php echo date(DT_DATE3)?></small> <?php echo $lang->block->leftToday?></h4>
<div class="row tiles">
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myTask?></div>
<div class="tile-amount"><?php echo (int)$tasks;?></div>
<?php if(!empty($delay['task'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['task']?></span>
</div>
<?php endif;?>
</div>
<?php endif;?>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myBug?></div>
<div class="tile-amount"><?php echo (int)$bugs;?></div>
<?php if(!empty($delay['bug'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['bug']?></span>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myBug?></div>
<div class="tile-amount"><?php echo (int)$bugs;?></div>
<?php if(!empty($delay['bug'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['bug']?></span>
</div>
<?php endif;?>
</div>
<?php endif;?>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myStory?></div>
<div class="tile-amount"><?php echo (int)$stories;?></div>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myProject?></div>
<div class="tile-amount"><?php echo (int)$projects;?></div>
<?php if(!empty($delay['project'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['project']?></span>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myStory?></div>
<div class="tile-amount"><?php echo (int)$stories;?></div>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myProject?></div>
<div class="tile-amount"><?php echo (int)$projects;?></div>
<?php if(!empty($delay['project'])):?>
<div class="tile-info">
<span class="label label-danger label-outline"><?php echo $lang->block->delayed . ' ' . $delay['project']?></span>
</div>
<?php endif;?>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myProduct?></div>
<div class="tile-amount"><?php echo (int)$products;?></div>
</div>
<?php endif;?>
</div>
<div class="col tile">
<div class="tile-title"><?php echo $lang->block->myProduct?></div>
<div class="tile-amount"><?php echo (int)$products;?></div>
</div>
</div>
</div>