Merge pull request #1898 from norahmollo/master
Translations added - Modified
This commit is contained in:
@@ -237,34 +237,34 @@ class dashletOpenVSCompleted implements DashletInterface
|
||||
$this->completed = $casesCompleted + $casesTodo;
|
||||
switch ($config['DAS_INS_CONTEXT_TIME']) {
|
||||
case 'TODAY':
|
||||
$this->centerLabel = 'Today';
|
||||
$this->centerLabel = G::LoadTranslation('ID_TODAY');
|
||||
break;
|
||||
case 'YESTERDAY':
|
||||
$this->centerLabel = 'Yesterday';
|
||||
$this->centerLabel = G::LoadTranslation('ID_YESTERDAY');
|
||||
break;
|
||||
case 'THIS_WEEK':
|
||||
$this->centerLabel = 'This week';
|
||||
$this->centerLabel = G::LoadTranslation('ID_THIS_WEEK');
|
||||
break;
|
||||
case 'PREVIOUS_WEEK':
|
||||
$this->centerLabel = 'Previous week';
|
||||
$this->centerLabel = G::LoadTranslation('ID_PREVIOUS_WEEK');
|
||||
break;
|
||||
case 'THIS_MONTH':
|
||||
$this->centerLabel = 'This month';
|
||||
$this->centerLabel = G::LoadTranslation('ID_THIS_MONTH');
|
||||
break;
|
||||
case 'PREVIOUS_MONTH':
|
||||
$this->centerLabel = 'Previous month';
|
||||
$this->centerLabel = G::LoadTranslation('ID_PREVIOUS_MONTH');
|
||||
break;
|
||||
case 'THIS_QUARTER':
|
||||
$this->centerLabel = 'This quarter';
|
||||
$this->centerLabel = G::LoadTranslation('ID_THIS_QUARTER');
|
||||
break;
|
||||
case 'PREVIOUS_QUARTER':
|
||||
$this->centerLabel = 'Previous quarter';
|
||||
$this->centerLabel = G::LoadTranslation('ID_PREVIOUS_QUARTER');
|
||||
break;
|
||||
case 'THIS_YEAR':
|
||||
$this->centerLabel = 'This year';
|
||||
$this->centerLabel = G::LoadTranslation('ID_THIS_YEAR');
|
||||
break;
|
||||
case 'PREVIOUS_YEAR':
|
||||
$this->centerLabel = 'Previous year';
|
||||
$this->centerLabel = G::LoadTranslation('ID_PREVIOUS_YEAR');
|
||||
break;
|
||||
default:
|
||||
$this->centerLabel = '';
|
||||
|
||||
@@ -33,6 +33,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
{
|
||||
try {
|
||||
$this->dashletInstance = $this->loadDashletInstance( $dasInsUid );
|
||||
|
||||
if (! isset( $this->dashletInstance['DAS_CLASS'] )) {
|
||||
throw new Exception( G::LoadTranslation( 'ID_ERROR_OBJECT_NOT_EXISTS' ) . ' - Probably the plugin related is disabled' );
|
||||
}
|
||||
@@ -78,7 +79,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
|
||||
|
||||
public function getDashletsInstances ($start = null, $limit = null)
|
||||
{
|
||||
{
|
||||
try {
|
||||
$dashletsInstances = array ();
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
@@ -96,6 +97,9 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
while ($row = $dataset->getRow()) {
|
||||
$arrayField = unserialize( $row["DAS_INS_ADDITIONAL_PROPERTIES"] );
|
||||
|
||||
if (strstr($row['DAS_TITLE'], '*')) {
|
||||
$row['DAS_TITLE'] = G::LoadTranslationPlugin('advancedDashboards', str_replace("*","",$row['DAS_TITLE']));
|
||||
}
|
||||
$row['DAS_INS_STATUS_LABEL'] = ($row['DAS_INS_STATUS'] == '1' ? G::LoadTranslation( 'ID_ACTIVE' ) : G::LoadTranslation( 'ID_INACTIVE' ));
|
||||
$row['DAS_INS_TITLE'] = (isset( $arrayField['DAS_INS_TITLE'] ) && ! empty( $arrayField['DAS_INS_TITLE'] )) ? $arrayField['DAS_INS_TITLE'] : '';
|
||||
if (! class_exists( $row['DAS_CLASS'] )) {
|
||||
@@ -154,6 +158,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
|
||||
}
|
||||
$dataset->next();
|
||||
}
|
||||
|
||||
return $dashletsInstances;
|
||||
} catch (Exception $error) {
|
||||
throw $error;
|
||||
|
||||
Reference in New Issue
Block a user