* Handle more link url for story block.
This commit is contained in:
@@ -145,10 +145,10 @@ class block extends control
|
||||
/**
|
||||
* 设置一个区块的大小。
|
||||
* Resize a block.
|
||||
*
|
||||
* @param string $blockID
|
||||
* @param string $type
|
||||
* @param string $data
|
||||
*
|
||||
* @param string $blockID
|
||||
* @param string $type
|
||||
* @param string $data
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -281,16 +281,10 @@ class block extends control
|
||||
if(method_exists('blockZen', $function)) $this->blockZen->$function($block);
|
||||
|
||||
/* 补全 moreLink 信息。 */
|
||||
$module = $block->module;
|
||||
$moreLink = '';
|
||||
if(isset($this->config->block->modules[$module]->moreLinkList->{$code}))
|
||||
{
|
||||
list($moduleName, $method, $vars) = explode('|', sprintf($this->config->block->modules[$module]->moreLinkList->{$code}, isset($block->params->type) ? $block->params->type : ''));
|
||||
$this->view->moreLink = $this->createLink($moduleName, $method, $vars);
|
||||
}
|
||||
$this->blockZen->createMoreLink($block, 0);
|
||||
|
||||
/* 组织渲染页面需要的数据。*/
|
||||
$this->view->moreLink = $moreLink;
|
||||
$this->view->moreLink = $block->moreLink;
|
||||
$this->view->title = $block->title;
|
||||
$this->view->block = $block;
|
||||
$this->view->longBlock = $this->block->isLongBlock($block);
|
||||
|
||||
@@ -56,7 +56,7 @@ class blockModel extends model
|
||||
/**
|
||||
* 获取被永久关闭的区块数据。
|
||||
* Get closed block pairs.
|
||||
*
|
||||
*
|
||||
* @param string $closedBlock
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -73,7 +73,7 @@ class blockModel extends model
|
||||
|
||||
list($moduleName, $blockKey) = explode('|', $block);
|
||||
if($moduleName == $blockKey)
|
||||
{
|
||||
{
|
||||
$blockPairs[$block] = $this->lang->block->moduleList[$moduleName];
|
||||
}
|
||||
else
|
||||
@@ -91,8 +91,8 @@ class blockModel extends model
|
||||
/**
|
||||
* 获取后台信息区块参数信息。
|
||||
* get admin information block parameter information.
|
||||
*
|
||||
* @param string $startDate
|
||||
*
|
||||
* @param string $startDate
|
||||
* @access public
|
||||
* @return array|false
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ class blockModel extends model
|
||||
->andWhere('module')->eq('zentao')
|
||||
->andWhere('code')->in('plugin,patch,publicclass,news')
|
||||
->beginIF($startDate)->andWhere('createdDate')->ge($startDate)->fi()
|
||||
->fetchPairs();
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-2
@@ -188,7 +188,7 @@ class blockZen extends block
|
||||
* @access protected
|
||||
* @return object
|
||||
*/
|
||||
private function createMoreLink(object $block, int $projectID): object
|
||||
protected function createMoreLink(object $block, int $projectID): object
|
||||
{
|
||||
$module = empty($block->module) ? 'common' : $block->module;
|
||||
|
||||
@@ -202,7 +202,15 @@ class blockZen extends block
|
||||
$block->moreLink = $this->createLink($moduleName, $method, $vars);
|
||||
if($moduleName == 'my' && strpos($this->config->block->workMethods, $method) !== false)
|
||||
{
|
||||
$block->moreLink = $this->createLink($moduleName, 'work', 'mode=' . $method . '&' . $vars);
|
||||
/* 处理研发需求列表区块点击更多后的跳转连接。 */
|
||||
if($moduleName == 'my' && $method == 'story' && $block->params->type != 'assignedTo')
|
||||
{
|
||||
$block->moreLink = $this->createLink('my', 'contribute', 'module=story&type=' . $block->params->type); // 当指派给我时跳转到贡献中由我创建。
|
||||
}
|
||||
else
|
||||
{
|
||||
$block->moreLink = $this->createLink($moduleName, 'work', 'mode=' . $method . '&' . $vars);
|
||||
}
|
||||
}
|
||||
elseif($moduleName == 'project' && $method == 'dynamic')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user