AdminNotifications improvements

This commit is contained in:
Taras Machyshyn
2018-06-29 16:03:43 +03:00
parent f92b3c3d16
commit dcd90b6f70
7 changed files with 17 additions and 11 deletions
@@ -95,7 +95,13 @@ class AdminNotificationManager
$extensionsNeedingUpgrade = $this->getExtensionsNeedingUpgrade();
if (!empty($extensionsNeedingUpgrade)) {
foreach ($extensionsNeedingUpgrade as $extensionName => $extensionDetails) {
$message = $this->getLanguage()->translate('newExtensionVersionIsAvailable', 'messages', 'Admin');
$label = 'new' . Util::toCamelCase($extensionName, ' ', true) .'VersionIsAvailable';
$message = $this->getLanguage()->get(['Admin', 'messages', $label]);
if (!$message) {
$message = $this->getLanguage()->translate('newExtensionVersionIsAvailable', 'messages', 'Admin');
}
$notificationList[] = array(
'id' => 'newExtensionVersionIsAvailable' . Util::toCamelCase($extensionName, ' ', true),
'type' => 'newExtensionVersionIsAvailable',
@@ -31,7 +31,7 @@ namespace Espo\Jobs;
use Espo\Core\Exceptions;
class CheckNewExtensionsVersions extends CheckNewVersion
class CheckNewExtensionVersion extends CheckNewVersion
{
public function run()
{
@@ -41,9 +41,9 @@ class CheckNewExtensionsVersions extends CheckNewVersion
$job = $this->getEntityManager()->getEntity('Job');
$job->set(array(
'name' => 'Check for New Version of installed extensions (job)',
'name' => 'Check for new versions of installed extensions (job)',
'serviceName' => 'AdminNotifications',
'methodName' => 'jobCheckNewExtensionsVersions',
'methodName' => 'jobCheckNewExtensionVersion',
'executeTime' => $this->getRunTime()
));
@@ -177,9 +177,9 @@
"selectExtensionPackage": "Select extension package",
"extensionInstalled": "Extension {name} {version} has been installed.",
"installExtension": "Extension {name} {version} is ready for an installation.",
"cronIsNotConfigured": "Scheduled jobs are not running. Hence inbound emails, notifications and reminders are not working. Please follow the <a target=\"_blank\" href=\"https://www.espocrm.com/documentation/administration/server-configuration/#user-content-setup-a-crontab\">instructions</a> to setup cron job.",
"cronIsNotConfigured": "Scheduled jobs are not running. Hence inbound emails, notifications and reminders are not working. Please follow the [instructions](https://www.espocrm.com/documentation/administration/server-configuration/#user-content-setup-a-crontab) to setup cron job.",
"newVersionIsAvailable": "New EspoCRM version {latestVersion} is available.",
"newExtensionVersionIsAvailable": "New release {latestVersion} of {extensionName} is available.",
"newExtensionVersionIsAvailable": "New {extensionName} version {latestVersion} is available.",
"uninstallConfirmation": "Are you sure you want to uninstall the extension?"
},
"descriptions": {
@@ -93,7 +93,7 @@
"aclAllowDeleteCreated": "Allow to remove created records",
"adminNotifications": "System notifications in administration panel",
"adminNotificationsNewVersion": "Show notification when new EspoCRM version is available",
"adminNotificationsNewExtensionVersion": "Show notification when new version of extensions are available",
"adminNotificationsNewExtensionVersion": "Show notification when new versions of extensions are available",
"textFilterUseContainsForVarchar": "Use 'contains' operator when filtering varchar fields",
"authTokenPreventConcurrent": "Only one auth token per user",
"scopeColorsDisabled": "Disable scope colors",
@@ -83,8 +83,8 @@
"isSystem": true,
"scheduling": "15 5 * * *"
},
"CheckNewExtensionsVersions": {
"name": "Check for New Version of Installed Extensions",
"CheckNewExtensionVersion": {
"name": "Check for New Versions of Installed Extensions",
"isSystem": true,
"scheduling": "25 5 * * *"
}
@@ -78,7 +78,7 @@ class AdminNotifications extends \Espo\Core\Services\Base
*
* @return boolean
*/
public function jobCheckNewExtensionsVersions($data)
public function jobCheckNewExtensionVersion($data)
{
$config = $this->getConfig();
@@ -5,7 +5,7 @@
<div class="list-group list list-expanded">
{{#each notificationList}}
<div data-id="{{id}}" class="list-group-item notificatin-item">
<div class="text-danger">{{{message}}}</div>
<div class="text-danger complex-text">{{complexText message}}</div>
</div>
{{/each}}
</div>