* Fix program drop link.

This commit is contained in:
Yagami
2021-03-18 16:58:49 +08:00
parent 0bc5e1ddee
commit bca95c87eb
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -407,10 +407,12 @@ class programModel extends model
* @param int $programID
* @param string $from
* @param string $vars
* @param string $moduleName
* @param string $methodName
* @access public
* @return string
*/
public function getTreeMenu($programID = 0, $from = 'program', $vars = '')
public function getTreeMenu($programID = 0, $from = 'program', $vars = '', $moduleName = '', $methodName = '')
{
$programMenu = array();
$query = $this->dao->select('*')->from(TABLE_PROJECT)
@@ -430,7 +432,7 @@ class programModel extends model
while($program = $stmt->fetch())
{
$link = $from == 'program' ? helper::createLink('program', 'product', "programID=$program->id") : helper::createLink('product', 'all', "programID=$program->id" . $vars);
$link = $from == 'program' ? helper::createLink($moduleName, $methodName, "programID=$program->id") : helper::createLink('product', 'all', "programID=$program->id" . $vars);
$linkHtml = html::a($link, html::icon($this->lang->icons[$program->type], 'icon icon-sm text-muted') . ' ' . $program->name, '', "id='program$program->id' class='text-ellipsis' title=$program->name");
if(isset($programMenu[$program->id]) and !empty($programMenu[$program->id]))
+1 -1
View File
@@ -9,7 +9,7 @@ $programsPinYin = common::convert2Pinyin($programNames);
<div class="table-col col-left">
<div class='list-group'>
<?php
echo $this->program->getTreeMenu();
echo $this->program->getTreeMenu(0, 'program', '', $module, $method);
?>
</div>
<div class="col-footer">