65 lines
2.9 KiB
PHP
65 lines
2.9 KiB
PHP
<?php js::set('executionID', $executionID);?>
|
|
<?php js::set('module', $module);?>
|
|
<?php js::set('method', $method);?>
|
|
<?php js::set('extra', $extra);?>
|
|
<?php
|
|
$iCharges = 0;
|
|
$others = 0;
|
|
$dones = 0;
|
|
$executionNames = array();
|
|
$myProjectsHtml = '';
|
|
$normalProjectsHtml = '';
|
|
$closedProjectsHtml = '';
|
|
foreach($executions as $execution)
|
|
{
|
|
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account) $iCharges++;
|
|
if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account)) $others++;
|
|
if($execution->status == 'done' or $execution->status == 'closed') $dones++;
|
|
$executionNames[] = $execution->name;
|
|
}
|
|
$executionsPinYin = common::convert2Pinyin($executionNames);
|
|
|
|
foreach($executions as $execution)
|
|
{
|
|
$executionName = zget($projects, $execution->project) . '/' . $execution->name;
|
|
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account)
|
|
{
|
|
$myProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "class='text-important' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
|
}
|
|
else if($execution->status != 'done' and $execution->status != 'closed' and !($execution->PM == $this->app->user->account))
|
|
{
|
|
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
|
}
|
|
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " . $executionName, '', "title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "'");
|
|
}
|
|
?>
|
|
<div class="table-row">
|
|
<div class="table-col col-left">
|
|
<div class='list-group'>
|
|
<?php
|
|
if(!empty($myProjectsHtml))
|
|
{
|
|
echo "<div class='heading'>{$lang->execution->mine}</div>";
|
|
echo $myProjectsHtml;
|
|
if(!empty($myProjectsHtml))
|
|
{
|
|
echo "<div class='heading'>{$lang->execution->other}</div>";
|
|
}
|
|
}
|
|
echo $normalProjectsHtml;
|
|
?>
|
|
</div>
|
|
<div class="col-footer">
|
|
<?php echo html::a(helper::createLink('execution', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->execution->all, '', 'class="not-list-item"'); ?>
|
|
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->execution->doneExecutions;?><i class='icon icon-angle-right'></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="table-col col-right">
|
|
<div class='list-group'>
|
|
<?php
|
|
echo $closedProjectsHtml;
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|