Improved the behavior when a link class to not have any other attributes than the external keys. Still, it requires some work to have this configuration working.

SVN:code[109]
This commit is contained in:
Romain Quetiez
2009-09-02 13:39:20 +00:00
parent 5cfcc1f516
commit a096d46a59

View File

@@ -28,6 +28,7 @@ class UILinksWidget
$sStateAttCode = MetaModel::GetStateAttributeCode($this->m_sClass); $sStateAttCode = MetaModel::GetStateAttributeCode($this->m_sClass);
$sDefaultState = MetaModel::GetDefaultState($this->m_sClass); $sDefaultState = MetaModel::GetDefaultState($this->m_sClass);
$aAttributes = array();
$sLinkedClass = $oAttDef->GetLinkedClass(); $sLinkedClass = $oAttDef->GetLinkedClass();
foreach(MetaModel::ListAttributeDefs($sLinkedClass) as $sAttCode=>$oAttDef) foreach(MetaModel::ListAttributeDefs($sLinkedClass) as $sAttCode=>$oAttDef)
{ {
@@ -256,6 +257,7 @@ EOF;
$sHTML .= "<form>\n"; $sHTML .= "<form>\n";
$index = 0; $index = 0;
$aAttrsMap = array(); $aAttrsMap = array();
$aDetails = array();
foreach(MetaModel::ListAttributeDefs($sLinkedClass) as $sAttCode=>$oAttDef) foreach(MetaModel::ListAttributeDefs($sLinkedClass) as $sAttCode=>$oAttDef)
{ {
if ($sStateAttCode == $sAttCode) if ($sStateAttCode == $sAttCode)