Refactored the compiler list view body builder, in preparation of the relation fields. Added more options to the relation admin fields. gh-287
This commit is contained in:
@ -123,6 +123,8 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
$item->main_source = $this->selectionTranslation($item->main_source, 'main_source');
|
||||
// convert gettype
|
||||
$item->gettype = $this->selectionTranslation($item->gettype, 'gettype');
|
||||
// convert addcalculation
|
||||
$item->addcalculation = $this->selectionTranslation($item->addcalculation, 'addcalculation');
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +170,19 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
return $gettypeArray[$value];
|
||||
}
|
||||
}
|
||||
// Array of addcalculation language strings
|
||||
if ($name === 'addcalculation')
|
||||
{
|
||||
$addcalculationArray = array(
|
||||
1 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_YES',
|
||||
0 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_NO'
|
||||
);
|
||||
// Now check if value is found in this array
|
||||
if (isset($addcalculationArray[$value]) && ComponentbuilderHelper::checkString($addcalculationArray[$value]))
|
||||
{
|
||||
return $addcalculationArray[$value];
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
@ -190,6 +205,10 @@ class ComponentbuilderModelDynamic_gets extends JModelList
|
||||
// From the componentbuilder_item table
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
|
||||
|
||||
// From the componentbuilder_admin_view table.
|
||||
$query->select($db->quoteName('h.system_name','view_table_main_system_name'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'h') . ' ON (' . $db->quoteName('a.view_table_main') . ' = ' . $db->quoteName('h.id') . ')');
|
||||
|
||||
// Filter by published state
|
||||
$published = $this->getState('filter.published');
|
||||
if (is_numeric($published))
|
||||
|
Reference in New Issue
Block a user