N°2847 - ActivityPanel: Rework for new UX

- Add MetaModel::GetCaseLogs($sClass) function
- Rename ActivityNewEntryForm to CaseLogEntryForm
- Rework ActivityPanel and CaseLogEntryForm markup / CSS
- Change for 1 CaseLogEntryForm per tab (caselogs and activity) with specific "Add entry..." choices
This commit is contained in:
Molkobain
2020-11-20 16:11:43 +01:00
parent 1e7d4e5c31
commit 7d0f1f46d3
25 changed files with 1027 additions and 537 deletions

View File

@@ -1553,6 +1553,7 @@ abstract class MetaModel
{
$aLinkedSets = array();
foreach (self::ListAttributeDefs($sClass) as $sAttCode => $oAtt) {
// Note: Careful, this will only return SUB-classes, which does NOT include AttributeLinkedset itself! We might want to use "is_a()" instead.
if (is_subclass_of($oAtt, 'AttributeLinkedSet')) {
$aLinkedSets[$sAttCode] = $oAtt;
}
@@ -1600,6 +1601,27 @@ abstract class MetaModel
}
}
/** @var array Cache for caselog attributes of the classes */
protected static $m_aCaseLogsAttributesCache = [];
/**
* Return an array of attribute codes for the caselogs attributes of $sClass
*
* @param string $sClass
*
* @return array
* @throws \CoreException
* @since 3.0.0
*/
final public static function GetCaseLogs(string $sClass)
{
if (!isset(static::$m_aCaseLogsAttributesCache[$sClass])) {
static::$m_aCaseLogsAttributesCache[$sClass] = self::GetAttributesList($sClass, ['AttributeCaseLog']);
}
return static::$m_aCaseLogsAttributesCache[$sClass];
}
/** @var array */
protected static $m_aTrackForwardCache = array();