N°2334 n:n relations : same fields displayed in EDIT and VIEW modes

Before we were only showing lnk fields in VIEW, and lnk+remote in EDIT (excluding some fields, see below).
Now by default (as this is customizable in VIEW mode) we have the same !

Rules to choose fields are moved from \UILinksWidget::__construct to :
  * \MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass
  * \MetaModel::GetZListAttDefsFilteredForIndirectLinkClass
This commit is contained in:
Pierre Goiffon
2020-07-30 11:40:54 +02:00
parent 5d686d733f
commit b58a084de5
5 changed files with 160 additions and 40 deletions

View File

@@ -971,13 +971,13 @@ class DataTableSettings implements Serializable
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
static public function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
public static function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
{
$oSettings = new DataTableSettings($aClassAliases);
// Retrieve the class specific settings for each class/alias based on the 'list' ZList
//TODO let the caller pass some other default settings (another Zlist, extre fields...)
$aColumns = array();
foreach($aClassAliases as $sAlias => $sClass)
foreach ($aClassAliases as $sAlias => $sClass)
{
if ($aDefaultLists == null)
{