Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -203,6 +203,7 @@ $filter->block->main->get['blockTitle'] = 'reg::any';
|
||||
$filter->block->main->get['entry'] = 'code';
|
||||
$filter->block->main->get['lang'] = 'reg::lang';
|
||||
$filter->block->main->get['mode'] = 'code';
|
||||
$filter->block->main->get['dashboard'] = 'code';
|
||||
$filter->block->main->get['param'] = 'reg::base64';
|
||||
$filter->block->main->get['sso'] = 'reg::base64';
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ class baseHelper
|
||||
/* 设置$appName和$moduleName。Set appName and moduleName. */
|
||||
global $app, $config;
|
||||
$programID = $programID ? $programID : $app->session->program;
|
||||
|
||||
if(strpos($moduleName, '.') !== false)
|
||||
{
|
||||
list($appName, $moduleName) = explode('.', $moduleName);
|
||||
|
||||
@@ -64,7 +64,8 @@ class block extends control
|
||||
}
|
||||
elseif(isset($this->lang->block->moduleList[$module]))
|
||||
{
|
||||
$module == 'program' ? $this->get->set('mode', 'getprogramlist') : $this->get->set('mode', 'getblocklist');
|
||||
$this->get->set('mode', 'getblocklist');
|
||||
if($module == 'program') $this->get->set('dashboard', 'program');
|
||||
$this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id");
|
||||
$this->view->module = $module;
|
||||
}
|
||||
@@ -398,10 +399,10 @@ class block extends control
|
||||
|
||||
$mode = strtolower($this->get->mode);
|
||||
|
||||
if($mode == 'getblocklist' || $mode == 'getprogramlist')
|
||||
if($mode == 'getblocklist')
|
||||
{
|
||||
$type = $mode == 'getblocklist' ? '' : 'program';
|
||||
$blocks = $this->block->getAvailableBlocks($module, $type);
|
||||
$dashboard = $this->get->dashboard;
|
||||
$blocks = $this->block->getAvailableBlocks($module, $dashboard);
|
||||
if(!$this->selfCall)
|
||||
{
|
||||
echo $blocks;
|
||||
@@ -1126,7 +1127,7 @@ class block extends control
|
||||
{
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$productID = isset($this->session->product) ? 0 : $this->session->product;
|
||||
if(!$productID || !array_key_exists($productID, $products)) $productID = array_key_first($products);
|
||||
if(!$productID || !array_key_exists($productID, $products)) $productID = key($products);
|
||||
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task', false);
|
||||
$this->view->products = $products;
|
||||
@@ -1284,7 +1285,7 @@ class block extends control
|
||||
{
|
||||
$this->view->summary = $this->dao->select('count(*) as total, count(if(status="doing", id, null)) as doing, count(if(status="closed", id, null)) as finish')->from(TABLE_PROJECT)
|
||||
->where('program')->eq($this->session->program)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -250,10 +250,10 @@ class blockModel extends model
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getAvailableBlocks($module = '', $type = '')
|
||||
public function getAvailableBlocks($module = '', $dashboard = '')
|
||||
{
|
||||
$blocks = $this->lang->block->availableBlocks;
|
||||
if($type == 'program')
|
||||
if($dashboard == 'program')
|
||||
{
|
||||
$programID = $this->session->program;
|
||||
$program = $this->loadModel('project')->getByID($programID);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php if(empty($products)): ?>
|
||||
<div class='empty-tip'><?php common::printLink('product', 'create', '', "<i class='icon-plus'></i> " . $lang->product->create, '', "class='btn btn-primary'")?></div>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<div class="panel-body has-table scrollbar-hover">
|
||||
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
<div class="col-4 text-middle text-center">
|
||||
<div class="tile">
|
||||
<div class="tile-title"><?php echo $lang->block->allProject;?></div>
|
||||
<div class="tile-amount"><?php echo $summary->total;?></div>
|
||||
<?php $projectLink = $this->createLink('project', 'index', 'locate=no')?>
|
||||
<div class="tile-amount"><?php echo $summary->total ? html::a($projectLink, $summary->total) : 0;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 text-middle">
|
||||
|
||||
Reference in New Issue
Block a user