This commit is contained in:
holan20180123
2020-12-04 14:05:57 +08:00
parent f7a2b2e4b3
commit c0072603fd
2 changed files with 6 additions and 5 deletions
+6 -4
View File
@@ -367,10 +367,12 @@ class actionModel extends model
$action->extra = strtolower($extra);
if($id)
{
$table = $this->config->objectTables[$action->extra];
$field = $this->config->action->objectNameFields[$action->extra];
$name = $this->dao->select($field)->from($table)->where('id')->eq($id)->fetch($field);
if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id"), "#$id " . $name);
$table = $this->config->objectTables[$action->extra];
$field = $this->config->action->objectNameFields[$action->extra];
$object = $this->dao->select($field . ',PRJ')->from($table)->where('id')->eq($id)->fetch();
$name = $object->$field;
$PRJ = $object->PRJ;
if($name) $action->appendLink = html::a(helper::createLink($action->extra, 'view', "id=$id", '', '', $PRJ), "#$id " . $name);
}
}
}
-1
View File
@@ -370,7 +370,6 @@ class todo extends control
}
$projects = $this->loadModel('program')->getPRJPairs();
//$projectID = isset($this->session->PRJ) ? $this->session->PRJ : key($projects);
if(!isset($this->session->PRJ)) $this->session->set('PRJ', key($projects));
$this->view->title = $this->app->user->account == $todo->account ? "{$this->lang->todo->common} #$todo->id $todo->name" : $this->lang->todo->common ;