mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-04 12:47:01 +00:00
Compare commits
168 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
725a2be959 | ||
|
|
08b576105c | ||
|
|
0e19fe087b | ||
|
|
44ddf9b400 | ||
|
|
9509d00fd4 | ||
|
|
70eb562400 | ||
|
|
6f89a01c50 | ||
|
|
2d85106a1f | ||
|
|
a9cad90a02 | ||
|
|
597d83c6f7 | ||
|
|
cbc3c3e921 | ||
|
|
cdcaf7cd24 | ||
|
|
ce782ab8bd | ||
|
|
8d179aa719 | ||
|
|
6688e19789 | ||
|
|
1db8b94ea7 | ||
|
|
63a61349ea | ||
|
|
811066a201 | ||
|
|
0b547c26a2 | ||
|
|
15497b96d1 | ||
|
|
9c3cf0b8dd | ||
|
|
eeaff7ac9d | ||
|
|
17e48c4e9f | ||
|
|
4a878c73be | ||
|
|
f05e41afb6 | ||
|
|
ba8e63c40b | ||
|
|
5d6b9b4785 | ||
|
|
06c0a59632 | ||
|
|
f6df48278c | ||
|
|
8207684193 | ||
|
|
49ac186f80 | ||
|
|
4325e1591c | ||
|
|
16eb1e0b6d | ||
|
|
68668acf57 | ||
|
|
5e5e82d6b6 | ||
|
|
8e23ef59a3 | ||
|
|
0213064217 | ||
|
|
d360cbcb4b | ||
|
|
d1dea478f7 | ||
|
|
778e7b335e | ||
|
|
5fc502c6a2 | ||
|
|
ba5bd60931 | ||
|
|
dfb72bb3e1 | ||
|
|
c4880b77e6 | ||
|
|
8aab9d17b1 | ||
|
|
205beb068c | ||
|
|
80cf2f2e10 | ||
|
|
5982b27b90 | ||
|
|
d696ca3013 | ||
|
|
9d10218487 | ||
|
|
b41ef6094a | ||
|
|
9a9a69ace4 | ||
|
|
1000139d01 | ||
|
|
129984f4c6 | ||
|
|
d665bc54e0 | ||
|
|
69b027698d | ||
|
|
6ffff16f06 | ||
|
|
79393f16d3 | ||
|
|
5821a06f9e | ||
|
|
3eb4cf27f2 | ||
|
|
94c345c386 | ||
|
|
6fe7853eb7 | ||
|
|
c45ea08ab2 | ||
|
|
04d41e9c86 | ||
|
|
2850cffc6a | ||
|
|
0cdc15ecaf | ||
|
|
ee85ee369b | ||
|
|
738e56cc63 | ||
|
|
6b38e1561b | ||
|
|
a56d8b7d1c | ||
|
|
db6e5ee778 | ||
|
|
a0bf1af3d3 | ||
|
|
5b47178162 | ||
|
|
3f0684c1ea | ||
|
|
d2bc49755d | ||
|
|
0502c1768b | ||
|
|
cf7d21db32 | ||
|
|
977fb47efb | ||
|
|
6c7a3adcdd | ||
|
|
3b22e08840 | ||
|
|
8d79524c62 | ||
|
|
3c70f28dc0 | ||
|
|
79b37e7047 | ||
|
|
3050d8b5b5 | ||
|
|
231a40e4a8 | ||
|
|
1f1c87513b | ||
|
|
910822334e | ||
|
|
af02d721c3 | ||
|
|
faf7cb9acd | ||
|
|
73869d5674 | ||
|
|
f60732170e | ||
|
|
aecf04a4f8 | ||
|
|
7a383912c8 | ||
|
|
21c288badf | ||
|
|
65492ea1dc | ||
|
|
7fd10104cc | ||
|
|
ad85c6fa3f | ||
|
|
e32bf06e4d | ||
|
|
f363d77cb7 | ||
|
|
8986b6f426 | ||
|
|
8b35c064c8 | ||
|
|
da5ea180ab | ||
|
|
3aca557420 | ||
|
|
ea723742c7 | ||
|
|
d85675f540 | ||
|
|
9b4aeb8e4c | ||
|
|
2c539b1fe6 | ||
|
|
5f31e7e148 | ||
|
|
cc9227910f | ||
|
|
85d8dfe885 | ||
|
|
563179bec7 | ||
|
|
386ada05d6 | ||
|
|
70c2992282 | ||
|
|
36d6483a51 | ||
|
|
01039b9881 | ||
|
|
bbd1297302 | ||
|
|
88c0d8810c | ||
|
|
b365bc17db | ||
|
|
3f24e64988 | ||
|
|
7a5ce2f4ee | ||
|
|
a410fb903a | ||
|
|
ba4004d720 | ||
|
|
cdc980c2b6 | ||
|
|
3578cc9523 | ||
|
|
09ff1d1e5a | ||
|
|
8e4a6ef183 | ||
|
|
0d111a6bd8 | ||
|
|
3e503852db | ||
|
|
d3fe435115 | ||
|
|
e6a0080c0e | ||
|
|
b8ddb72d3b | ||
|
|
58953ca009 | ||
|
|
d4e98155d0 | ||
|
|
86fabe3352 | ||
|
|
c5ccf8e6da | ||
|
|
b7e0a0de23 | ||
|
|
9c2a18f0aa | ||
|
|
aa95f2cf88 | ||
|
|
8dd7f262a2 | ||
|
|
b76feba080 | ||
|
|
1b5aea85ba | ||
|
|
c89c7f5e0e | ||
|
|
bcaaf539be | ||
|
|
48f0988373 | ||
|
|
a0c0d37bfd | ||
|
|
9c696fe8d6 | ||
|
|
224e3475d8 | ||
|
|
841c5f85bd | ||
|
|
6745419a4f | ||
|
|
6bf9bb875a | ||
|
|
d6e1322775 | ||
|
|
bb0e97160c | ||
|
|
8124ceea6b | ||
|
|
b5cb0c0881 | ||
|
|
8747ccc105 | ||
|
|
8b0147484c | ||
|
|
233037a1eb | ||
|
|
11446ef857 | ||
|
|
4403131235 | ||
|
|
9dde3d0645 | ||
|
|
2fcf00ef4f | ||
|
|
e94564b5e7 | ||
|
|
c6542c0698 | ||
|
|
f74959ab00 | ||
|
|
2bb28ac270 | ||
|
|
ca64d7c8ec | ||
|
|
ce2a2a03a3 | ||
|
|
d947223b9b |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -9,7 +9,10 @@
|
||||
/client
|
||||
/test.php
|
||||
/main.html
|
||||
/frontend/client/css/bootstrap.css
|
||||
/frontend/client/css/espo.css
|
||||
/frontend/client/css/espo-vertical.css
|
||||
/frontend/client/css/sakura.css
|
||||
/frontend/client/css/sakura-vertical.css
|
||||
/tests/testData/cache/*
|
||||
composer.phar
|
||||
vendor/
|
||||
|
||||
35
Gruntfile.js
35
Gruntfile.js
@@ -59,22 +59,44 @@ module.exports = function (grunt) {
|
||||
final: ['build/tmp'],
|
||||
},
|
||||
less: {
|
||||
bootstrap: {
|
||||
espo: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'frontend/client/css/bootstrap.css': 'frontend/less/espo/main.less',
|
||||
'frontend/client/css/espo.css': 'frontend/less/espo/main.less',
|
||||
},
|
||||
},
|
||||
sakura: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'frontend/client/css/sakura.css': 'frontend/less/sakura/main.less',
|
||||
},
|
||||
},
|
||||
espoVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'frontend/client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
|
||||
},
|
||||
},
|
||||
sakuraVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'frontend/client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
|
||||
},
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
minify: {
|
||||
files: {
|
||||
'build/tmp/client/css/espo.min.css': [
|
||||
'frontend/client/css/bootstrap.css',
|
||||
'frontend/client/css/datepicker.css',
|
||||
'frontend/client/css/jquery.timepicker.css',
|
||||
'build/tmp/client/css/espo.css': [
|
||||
'frontend/client/css/espo.css',
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -131,6 +153,7 @@ module.exports = function (grunt) {
|
||||
'rebuild.php',
|
||||
'clear_cache.php',
|
||||
'upgrade.php',
|
||||
'extension.php',
|
||||
'index.php',
|
||||
'LICENSE.txt',
|
||||
'.htaccess',
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error,
|
||||
\Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\NotFound;
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Admin extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
@@ -34,17 +36,19 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
}
|
||||
|
||||
public function actionRebuild($params, $data)
|
||||
public function postActionRebuild($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$result = $this->getContainer()->get('dataManager')->rebuild();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function actionClearCache($params, $data)
|
||||
public function postActionClearCache($params, $data)
|
||||
{
|
||||
$result = $this->getContainer()->get('dataManager')->clearCache();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -55,8 +59,13 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
return $scheduledJob->getAllNamesOnly();
|
||||
}
|
||||
|
||||
public function actionUploadUpgradePackage($params, $data)
|
||||
public function postActionUploadUpgradePackage($params, $data)
|
||||
{
|
||||
if ($this->getConfig()->get('restrictedMode')) {
|
||||
if (!$this->getUser()->get('isSuperAdmin')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
|
||||
|
||||
$upgradeId = $upgradeManager->upload($data);
|
||||
@@ -68,10 +77,15 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
);
|
||||
}
|
||||
|
||||
public function actionRunUpgrade($params, $data)
|
||||
public function postActionRunUpgrade($params, $data)
|
||||
{
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
|
||||
if ($this->getConfig()->get('restrictedMode')) {
|
||||
if (!$this->getUser()->get('isSuperAdmin')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
|
||||
$upgradeManager->install($data);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -44,7 +44,7 @@ class App extends \Espo\Core\Controllers\Base
|
||||
);
|
||||
}
|
||||
|
||||
public function actionDestroyAuthToken($params, $data)
|
||||
public function postActionDestroyAuthToken($params, $data)
|
||||
{
|
||||
$token = $data['token'];
|
||||
if (empty($token)) {
|
||||
|
||||
@@ -22,11 +22,18 @@
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Attachment extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
public function actionUpload($params, $data)
|
||||
public function actionUpload($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
list($prefix, $contents) = explode(',', $data);
|
||||
$contents = base64_decode($contents);
|
||||
|
||||
|
||||
@@ -18,49 +18,49 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class AuthToken extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
public function actionListLinked($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
public function actionMassUpdate($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
public function actionCreateLink($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
public function actionRemoveLink($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
@@ -58,6 +58,11 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
if (!$request->isPost()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if ($this->getConfig()->get('restrictedMode')) {
|
||||
if (!$this->getUser()->get('isSuperAdmin')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
|
||||
@@ -71,11 +76,14 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
if (!$request->isPost()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if ($this->getConfig()->get('restrictedMode')) {
|
||||
if (!$this->getUser()->get('isSuperAdmin')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
|
||||
$manager->uninstall($data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -99,12 +107,18 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionDelete($params)
|
||||
public function actionDelete($params, $data, $request)
|
||||
{
|
||||
if (!$request->isDelete()) {
|
||||
throw BadRequest();
|
||||
}
|
||||
if ($this->getConfig()->get('restrictedMode')) {
|
||||
if (!$this->getUser()->get('isSuperAdmin')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
|
||||
$manager->delete($params);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,13 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
@@ -34,7 +35,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
$integrations = $this->getEntityManager()->getRepository('Integration')->find();
|
||||
$arr = array();
|
||||
foreach ($integrations as $entity) {
|
||||
if ($entity->get('enabled') && $this->getMetadata()->get('integrations.' . $entity->id .'.allowUserAccounts')) {
|
||||
if ($entity->get('enabled') && $this->getMetadata()->get('integrations.' . $entity->id .'.allowUserAccounts')) {
|
||||
$arr[] = array(
|
||||
'id' => $entity->id
|
||||
);
|
||||
@@ -77,15 +78,18 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
return $entity->toArray();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
return $this->actionPatch($params, $data);
|
||||
return $this->actionPatch($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
if (!$request->isPost() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
list($integration, $userId) = explode('__', $params['id']);
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
throw new Forbidden();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
@@ -30,10 +30,10 @@ class GlobalSearch extends \Espo\Core\Controllers\Base
|
||||
public function actionSearch($params, $data, $request)
|
||||
{
|
||||
$query = $params['query'];
|
||||
|
||||
$offset = $request->get('offset');
|
||||
$maxSize = $request->get('maxSize');
|
||||
|
||||
|
||||
$offset = intval($request->get('offset'));
|
||||
$maxSize = intval($request->get('maxSize'));
|
||||
|
||||
return $this->getService('GlobalSearch')->find($query, $offset, $maxSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,10 +71,14 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
return $this->getContainer()->get('entityManager');
|
||||
}
|
||||
|
||||
public function actionUploadFile($params, $data)
|
||||
public function actionUploadFile($params, $data, $request)
|
||||
{
|
||||
$contents = $data;
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$attachment = $this->getEntityManager()->getEntity('Attachment');
|
||||
$attachment->set('type', 'text/csv');
|
||||
$attachment->set('role', 'Import File');
|
||||
@@ -88,24 +92,34 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
);
|
||||
}
|
||||
|
||||
public function actionRevert($params, $data)
|
||||
public function actionRevert($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getService('Import')->revert($data['id']);
|
||||
}
|
||||
|
||||
public function actionRemoveDuplicates($params, $data)
|
||||
public function actionRemoveDuplicates($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getService('Import')->removeDuplicates($data['id']);
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data)
|
||||
public function actionCreate($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost() && !$request->isPut()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$importParams = array(
|
||||
'headerRow' => $data['headerRow'],
|
||||
'fieldDelimiter' => $data['fieldDelimiter'],
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class InboundEmail extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
|
||||
@@ -18,21 +18,23 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Integration extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function actionIndex($params, $data, $request)
|
||||
{
|
||||
return false;
|
||||
@@ -40,22 +42,25 @@ class Integration extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function actionRead($params, $data, $request)
|
||||
{
|
||||
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
|
||||
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
|
||||
return $entity->toArray();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
return $this->actionPatch($params, $data);
|
||||
return $this->actionPatch($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPut() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
|
||||
$entity->set($data);
|
||||
$this->getEntityManager()->saveEntity($entity);
|
||||
|
||||
return $entity->toArray();
|
||||
|
||||
return $entity->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
72
application/Espo/Controllers/Job.php
Normal file
72
application/Espo/Controllers/Job.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class Job extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionListLinked($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ use Espo\Core\Utils as Utils;
|
||||
use \Espo\Core\Exceptions\NotFound;
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Layout extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
@@ -38,12 +39,16 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (!$request->isPut() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$layoutManager = $this->getContainer()->get('layout');
|
||||
$layoutManager->set($data, $params['scope'], $params['name']);
|
||||
$result = $layoutManager->save();
|
||||
@@ -57,8 +62,20 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
return $layoutManager->get($params['scope'], $params['name']);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
return $this->actionUpdate($params, $data);
|
||||
return $this->actionUpdate($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionResetToDefault($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (empty($data['scope']) || empty($data['name'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
return $this->getContainer()->get('layout')->resetToDefault($data['scope'], $data['name']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
@@ -32,32 +32,32 @@ class Notification extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
$scope = $params['scope'];
|
||||
$id = $params['id'];
|
||||
|
||||
|
||||
$userId = $this->getUser()->id;
|
||||
|
||||
|
||||
$offset = intval($request->get('offset'));
|
||||
$maxSize = intval($request->get('maxSize'));
|
||||
|
||||
$maxSize = intval($request->get('maxSize'));
|
||||
|
||||
$params = array(
|
||||
'offset' => $offset,
|
||||
'maxSize' => $maxSize,
|
||||
);
|
||||
|
||||
$result = $this->getService('Notification')->getList($userId, $params);
|
||||
|
||||
|
||||
$result = $this->getService('Notification')->getList($userId, $params);
|
||||
|
||||
return array(
|
||||
'total' => $result['total'],
|
||||
'list' => $result['collection']->toArray()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function actionNotReadCount()
|
||||
{
|
||||
$userId = $this->getUser()->id;
|
||||
return $this->getService('Notification')->getNotReadCount($userId);
|
||||
}
|
||||
|
||||
public function actionMarkAllRead($params, $data, $request)
|
||||
|
||||
public function postActionMarkAllRead($params, $data, $request)
|
||||
{
|
||||
$userId = $this->getUser()->id;
|
||||
return $this->getService('Notification')->markAllRead($userId);
|
||||
|
||||
@@ -53,27 +53,34 @@ class Preferences extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
}
|
||||
|
||||
public function actionDelete($params, $data)
|
||||
public function actionDelete($params, $data, $request)
|
||||
{
|
||||
$userId = $params['id'];
|
||||
if (empty($userId)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isDelete()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$this->handleUserAccess($userId);
|
||||
|
||||
return $this->getEntityManager()->getRepository('Preferences')->resetToDefaults($userId);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
return $this->actionUpdate($params, $data);
|
||||
return $this->actionUpdate($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
$userId = $params['id'];
|
||||
$this->handleUserAccess($userId);
|
||||
|
||||
if (!$request->isPost() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (array_key_exists('smtpPassword', $data)) {
|
||||
$data['smtpPassword'] = $this->getCrypt()->encrypt($data['smtpPassword']);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Settings extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
@@ -46,17 +47,21 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
return $this->getConfigData();
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data)
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
return $this->actionPatch($params, $data);
|
||||
return $this->actionPatch($params, $data, $request);
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data)
|
||||
public function actionPatch($params, $data, $request)
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (!$request->isPut() && !$request->isPatch()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (isset($data['useCache']) && $data['useCache'] != $this->getConfig()->get('useCache')) {
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
class Team extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Acl
|
||||
|
||||
public function checkScope($scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
|
||||
{
|
||||
return $this->getAclManager()->checkScope($this->getUser(), $subject, $action, $isOwner, $inTeam, $entity) ;
|
||||
return $this->getAclManager()->checkScope($this->getUser(), $scope, $action, $isOwner, $inTeam, $entity) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ class AclManager
|
||||
return true;
|
||||
}
|
||||
$data = $this->getTable($user)->getScopeData($entity->getEntityType());
|
||||
return $this->getImplementation($scope)->checkEntity($user, $entity, $data, $action);
|
||||
return $this->getImplementation($entity->getEntityType())->checkEntity($user, $entity, $data, $action);
|
||||
}
|
||||
|
||||
public function checkScope(User $user, $scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
|
||||
|
||||
@@ -86,10 +86,12 @@ class Application
|
||||
public function runClient()
|
||||
{
|
||||
$config = $this->getContainer()->get('config');
|
||||
$themeManager = $this->getContainer()->get('themeManager');
|
||||
|
||||
$html = file_get_contents('main.html');
|
||||
$html = str_replace('{{cacheTimestamp}}', $config->get('cacheTimestamp', 0), $html);
|
||||
$html = str_replace('{{useCache}}', $config->get('useCache') ? 'true' : 'false' , $html);
|
||||
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet(), $html);
|
||||
$html = str_replace('{{runScript}}', 'app.start();' , $html);
|
||||
echo $html;
|
||||
exit;
|
||||
|
||||
@@ -278,6 +278,14 @@ class Container
|
||||
);
|
||||
}
|
||||
|
||||
private function loadThemeManager()
|
||||
{
|
||||
return new \Espo\Core\Utils\ThemeManager(
|
||||
$this->get('config'),
|
||||
$this->get('metadata')
|
||||
);
|
||||
}
|
||||
|
||||
public function setUser($user)
|
||||
{
|
||||
$this->data['user'] = $user;
|
||||
|
||||
@@ -87,18 +87,27 @@ class ControllerManager
|
||||
$actionNameUcfirst = ucfirst($actionName);
|
||||
|
||||
$beforeMethodName = 'before' . $actionNameUcfirst;
|
||||
$actionMethodName = 'action' . $actionNameUcfirst;
|
||||
$afterMethodName = 'after' . $actionNameUcfirst;
|
||||
|
||||
$fullActionMethodName = strtolower($request->getMethod()) . ucfirst($actionMethodName);
|
||||
|
||||
if (method_exists($controller, $fullActionMethodName)) {
|
||||
$primaryActionMethodName = $fullActionMethodName;
|
||||
} else {
|
||||
$primaryActionMethodName = $actionMethodName;
|
||||
}
|
||||
|
||||
if (!method_exists($controller, $primaryActionMethodName)) {
|
||||
throw new NotFound("Action '$actionName' (".$request->getMethod().") does not exist in controller '$controller'");
|
||||
}
|
||||
|
||||
if (method_exists($controller, $beforeMethodName)) {
|
||||
$controller->$beforeMethodName($params, $data, $request);
|
||||
}
|
||||
$actionMethodName = 'action' . $actionNameUcfirst;
|
||||
|
||||
if (!method_exists($controller, $actionMethodName)) {
|
||||
throw new NotFound("Action '$actionMethodName' does not exist in controller '$controller'");
|
||||
}
|
||||
$result = $controller->$primaryActionMethodName($params, $data, $request);
|
||||
|
||||
$result = $controller->$actionMethodName($params, $data, $request);
|
||||
|
||||
$afterMethodName = 'after' . $actionNameUcfirst;
|
||||
if (method_exists($controller, $afterMethodName)) {
|
||||
$controller->$afterMethodName($params, $data, $request);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ class Record extends Base
|
||||
$maxSize = self::MAX_SIZE_LIMIT;
|
||||
}
|
||||
if (!empty($maxSize) && $maxSize > self::MAX_SIZE_LIMIT) {
|
||||
throw new Forbidden();
|
||||
throw new Forbidden("Max should should not exceed " . self::MAX_SIZE_LIMIT . ". Use pagination (offset, limit).");
|
||||
}
|
||||
|
||||
$result = $this->getRecordService()->findEntities(array(
|
||||
@@ -198,7 +198,7 @@ class Record extends Base
|
||||
|
||||
public function actionExport($params, $data, $request)
|
||||
{
|
||||
if ($this->getConfig()->get('disableExport') && !$this->getUser()->isAdmin()) {
|
||||
if ($this->getConfig()->get('exportDisabled') && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,9 @@ class HookManager
|
||||
foreach ($this->data[$scope][$hookName] as $className) {
|
||||
if (empty($this->hooks[$className])) {
|
||||
$this->hooks[$className] = $this->createHookByClassName($className);
|
||||
if (empty($this->hooks[$className])) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$hook = $this->hooks[$className];
|
||||
$hook->$hookName($injection, $options);
|
||||
@@ -122,7 +125,7 @@ class HookManager
|
||||
}
|
||||
return $hook;
|
||||
}
|
||||
throw new Error("Class '$className' does not exist");
|
||||
$GLOBALS['log']->error("Hook class '{$name}' does not exist.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,6 +99,7 @@ class Importer
|
||||
$usersIds = $duplicate->get('usersIds');
|
||||
$usersIds[] = $userId;
|
||||
$duplicate->set('usersIds', $usersIds);
|
||||
|
||||
$this->getEntityManager()->saveEntity($duplicate);
|
||||
|
||||
if (!empty($teamsIds)) {
|
||||
@@ -136,6 +137,10 @@ class Importer
|
||||
$this->importPartDataToEmail($email, $message, $inlineIds, 'text/plain');
|
||||
}
|
||||
|
||||
if (!$email->get('body') && $email->get('bodyPlain')) {
|
||||
$email->set('body', $email->get('bodyPlain'));
|
||||
}
|
||||
|
||||
$body = $email->get('body');
|
||||
if (!empty($body)) {
|
||||
foreach ($inlineIds as $cid => $attachmentId) {
|
||||
@@ -251,6 +256,15 @@ class Importer
|
||||
$type = strtok($part->contentType, ';');
|
||||
}
|
||||
|
||||
$contentDisposition = false;
|
||||
if (isset($part->ContentDisposition)) {
|
||||
if (strpos(strtolower($part->ContentDisposition), 'attachment') === 0) {
|
||||
$contentDisposition = 'attachment';
|
||||
} else if (strpos(strtolower($part->ContentDisposition), 'inline') === 0) {
|
||||
$contentDisposition = 'inline';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($type)) {
|
||||
if (!empty($defaultContentType)) {
|
||||
$type = $defaultContentType;
|
||||
@@ -260,28 +274,26 @@ class Importer
|
||||
}
|
||||
|
||||
$encoding = null;
|
||||
|
||||
$isAttachment = true;
|
||||
|
||||
if ($type == 'text/plain' || $type == 'text/html') {
|
||||
|
||||
$isAttachment = false;
|
||||
$content = $this->getContentFromPart($part);
|
||||
if ($type == 'text/plain') {
|
||||
if ($email->get('bodyPlain')) {
|
||||
$isAttachment = true;
|
||||
} else {
|
||||
$email->set('bodyPlain', $content);
|
||||
if (!$email->get('body')) {
|
||||
$email->set('body', $content);
|
||||
if ($contentDisposition !== 'inline' && $contentDisposition !== 'attachment') {
|
||||
$isAttachment = false;
|
||||
$content = $this->getContentFromPart($part);
|
||||
if ($type == 'text/plain') {
|
||||
$bodyPlain = '';
|
||||
if ($email->get('bodyPlain')) {
|
||||
$bodyPlain .= $email->get('bodyPlain') . "\n";
|
||||
}
|
||||
}
|
||||
} else if ($type == 'text/html') {
|
||||
if ($email->get('isHtml')) {
|
||||
$isAttachment = true;
|
||||
} else {
|
||||
$email->set('body', $content);
|
||||
$bodyPlain .= $content;
|
||||
$email->set('bodyPlain', $bodyPlain);
|
||||
} else if ($type == 'text/html') {
|
||||
$body = '';
|
||||
if ($email->get('body')) {
|
||||
$body .= $email->get('body') . "<br>";
|
||||
}
|
||||
$body .= $content;
|
||||
$email->set('isHtml', true);
|
||||
$email->set('body', $body);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,13 +305,13 @@ class Importer
|
||||
$fileName = null;
|
||||
$contentId = null;
|
||||
|
||||
if (isset($part->ContentDisposition)) {
|
||||
if (strpos($part->ContentDisposition, 'attachment') === 0) {
|
||||
if ($contentDisposition) {
|
||||
if ($contentDisposition === 'attachment') {
|
||||
if (preg_match('/filename="?([^"]+)"?/i', $part->ContentDisposition, $m)) {
|
||||
$fileName = $m[1];
|
||||
$disposition = 'attachment';
|
||||
}
|
||||
} else if (strpos($part->ContentDisposition, 'inline') === 0) {
|
||||
} else if ($contentDisposition === 'inline') {
|
||||
if (isset($part->contentID)) {
|
||||
$contentId = trim($part->contentID, '<>');
|
||||
$fileName = $contentId;
|
||||
|
||||
@@ -37,6 +37,7 @@ class Entity extends \Espo\ORM\Entity
|
||||
$collection = $this->get($field, $defs);
|
||||
$ids = array();
|
||||
$names = new \stdClass();
|
||||
$types = new \stdClass();
|
||||
if (!empty($columns)) {
|
||||
$columnsData = new \stdClass();
|
||||
}
|
||||
@@ -46,6 +47,7 @@ class Entity extends \Espo\ORM\Entity
|
||||
$id = $e->id;
|
||||
$ids[] = $id;
|
||||
$names->$id = $e->get('name');
|
||||
$types->$id = $e->get('type');
|
||||
if (!empty($columns)) {
|
||||
$columnsData->$id = new \stdClass();
|
||||
foreach ($columns as $column => $f) {
|
||||
@@ -57,6 +59,7 @@ class Entity extends \Espo\ORM\Entity
|
||||
|
||||
$this->set($field . 'Ids', $ids);
|
||||
$this->set($field . 'Names', $names);
|
||||
$this->set($field . 'Types', $types);
|
||||
if (!empty($columns)) {
|
||||
$this->set($field . 'Columns', $columnsData);
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ class Base
|
||||
$result['whereClause'][] = $part;
|
||||
}
|
||||
$result['joins'] = array_merge($result['joins'], $joins);
|
||||
$result['joins'] = array_unique($result['joins']);
|
||||
$result['distinct'] = true;
|
||||
}
|
||||
|
||||
@@ -313,6 +314,46 @@ class Base
|
||||
}
|
||||
}
|
||||
|
||||
public function manageAccess(&$result)
|
||||
{
|
||||
if (empty($result)) {
|
||||
$result = array();
|
||||
}
|
||||
if (empty($result['joins'])) {
|
||||
$result['joins'] = [];
|
||||
}
|
||||
if (empty($result['leftJoins'])) {
|
||||
$result['leftJoins'] = [];
|
||||
}
|
||||
if (empty($result['whereClause'])) {
|
||||
$result['whereClause'] = array();
|
||||
}
|
||||
if (empty($result['customJoin'])) {
|
||||
$result['customJoin'] = [];
|
||||
}
|
||||
$this->access($result);
|
||||
}
|
||||
|
||||
public function manageTextFilter($textFilter, &$result)
|
||||
{
|
||||
if (empty($result)) {
|
||||
$result = array();
|
||||
}
|
||||
if (empty($result['joins'])) {
|
||||
$result['joins'] = [];
|
||||
}
|
||||
if (empty($result['leftJoins'])) {
|
||||
$result['leftJoins'] = [];
|
||||
}
|
||||
if (empty($result['whereClause'])) {
|
||||
$result['whereClause'] = array();
|
||||
}
|
||||
if (empty($result['customJoin'])) {
|
||||
$result['customJoin'] = [];
|
||||
}
|
||||
$this->q(array('q' => $textFilter), $result);
|
||||
}
|
||||
|
||||
protected function access(&$result)
|
||||
{
|
||||
if ($this->acl->checkReadOnlyOwn($this->entityType)) {
|
||||
@@ -439,6 +480,24 @@ class Base
|
||||
$where['type'] = 'after';
|
||||
$dt->setTimezone(new \DateTimeZone('UTC'));
|
||||
$where['value'] = $dt->format($format);
|
||||
break;
|
||||
case 'lastSevenDays':
|
||||
$where['type'] = 'between';
|
||||
|
||||
$dtFrom = clone $dt;
|
||||
|
||||
$dt->setTimezone(new \DateTimeZone('UTC'));
|
||||
$to = $dt->format($format);
|
||||
|
||||
|
||||
$dtFrom->modify('-7 day');
|
||||
$dtFrom->setTime(0, 0, 0);
|
||||
$dtFrom->setTimezone(new \DateTimeZone('UTC'));
|
||||
|
||||
$from = $dtFrom->format($format);
|
||||
|
||||
$where['value'] = [$from, $to];
|
||||
|
||||
break;
|
||||
case 'on':
|
||||
$where['type'] = 'between';
|
||||
@@ -568,6 +627,15 @@ class Base
|
||||
case 'future':
|
||||
$part[$item['field'] . '>='] = date('Y-m-d');
|
||||
break;
|
||||
case 'lastSevenDays':
|
||||
$dt1 = new \DateTime();
|
||||
$dt2 = clone $dt1;
|
||||
$dt2->modify('-7 days');
|
||||
$part['AND'] = array(
|
||||
$item['field'] . '>=' => $dt2->format('Y-m-d'),
|
||||
$item['field'] . '<=' => $dt1->format('Y-m-d'),
|
||||
);
|
||||
break;
|
||||
case 'currentMonth':
|
||||
$dt = new \DateTime();
|
||||
$part['AND'] = array(
|
||||
|
||||
@@ -25,19 +25,19 @@ namespace Espo\Core\Utils;
|
||||
class Crypt
|
||||
{
|
||||
private $config;
|
||||
|
||||
|
||||
private $key = null;
|
||||
|
||||
|
||||
private $cryptKey = null;
|
||||
|
||||
private $iv = null;
|
||||
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->cryptKey = $config->get('cryptKey', '');
|
||||
}
|
||||
|
||||
|
||||
protected function getKey()
|
||||
{
|
||||
if (empty($this->key)) {
|
||||
@@ -53,13 +53,13 @@ class Crypt
|
||||
}
|
||||
return $this->iv;
|
||||
}
|
||||
|
||||
|
||||
public function encrypt($string)
|
||||
{
|
||||
$iv = $this->getIv();
|
||||
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->getKey(), $string, MCRYPT_MODE_CBC, $iv) . $iv);
|
||||
}
|
||||
|
||||
|
||||
public function decrypt($encryptedString)
|
||||
{
|
||||
$encryptedString = base64_decode($encryptedString);
|
||||
@@ -68,7 +68,7 @@ class Crypt
|
||||
$iv = substr($encryptedString, -16);
|
||||
return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->getKey(), $string, MCRYPT_MODE_CBC, $iv));
|
||||
}
|
||||
|
||||
|
||||
public function generateKey()
|
||||
{
|
||||
return md5(uniqid());
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Utils\Database\Orm\Fields;
|
||||
|
||||
class AttachmentMultiple extends Base
|
||||
{
|
||||
protected function load($fieldName, $entityType)
|
||||
{
|
||||
$data = array(
|
||||
$entityType => array (
|
||||
'fields' => array(
|
||||
$fieldName.'Ids' => array(
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true
|
||||
),
|
||||
$fieldName.'Names' => array(
|
||||
'type' => 'varchar',
|
||||
'notStorable' => true
|
||||
),
|
||||
)
|
||||
),
|
||||
'unset' => array(
|
||||
$entityType => array(
|
||||
'fields.'.$fieldName,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class Attachments extends HasChildren
|
||||
$entityName => array (
|
||||
'fields' => array(
|
||||
$linkName.'Types' => array(
|
||||
'type' => 'varchar',
|
||||
'type' => 'jsonObject',
|
||||
'notStorable' => true,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -66,23 +66,31 @@ class Layout
|
||||
return $this->metadata;
|
||||
}
|
||||
|
||||
protected function sanitizeInput($name)
|
||||
{
|
||||
return preg_replace("([\.]{2,})", '', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Layout context
|
||||
*
|
||||
* @param $controller
|
||||
* @param $scope
|
||||
* @param $name
|
||||
*
|
||||
* @return json
|
||||
*/
|
||||
public function get($controller, $name)
|
||||
public function get($scope, $name)
|
||||
{
|
||||
if (isset($this->changedData[$controller][$name])) {
|
||||
return Json::encode($this->changedData[$controller][$name]);
|
||||
$scope = $this->sanitizeInput($scope);
|
||||
$name = $this->sanitizeInput($name);
|
||||
|
||||
if (isset($this->changedData[$scope][$name])) {
|
||||
return Json::encode($this->changedData[$scope][$name]);
|
||||
}
|
||||
|
||||
$fileFullPath = Util::concatPath($this->getLayoutPath($controller, true), $name.'.json');
|
||||
$fileFullPath = Util::concatPath($this->getLayoutPath($scope, true), $name.'.json');
|
||||
if (!file_exists($fileFullPath)) {
|
||||
$fileFullPath = Util::concatPath($this->getLayoutPath($controller), $name.'.json');
|
||||
$fileFullPath = Util::concatPath($this->getLayoutPath($scope), $name.'.json');
|
||||
}
|
||||
|
||||
if (!file_exists($fileFullPath)) {
|
||||
@@ -101,21 +109,39 @@ class Layout
|
||||
|
||||
/**
|
||||
* Set Layout data
|
||||
* Ex. $controller = Account, $name = detail then will be created a file layoutFolder/Account/detail.json
|
||||
* Ex. $scope = Account, $name = detail then will be created a file layoutFolder/Account/detail.json
|
||||
*
|
||||
* @param array $data
|
||||
* @param string $controller - ex. Account
|
||||
* @param string $scope - ex. Account
|
||||
* @param string $name - detail
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($data, $controller, $name)
|
||||
public function set($data, $scope, $name)
|
||||
{
|
||||
if (empty($controller) || empty($name)) {
|
||||
$scope = $this->sanitizeInput($scope);
|
||||
$name = $this->sanitizeInput($name);
|
||||
|
||||
if (empty($scope) || empty($name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->changedData[$controller][$name] = $data;
|
||||
$this->changedData[$scope][$name] = $data;
|
||||
}
|
||||
|
||||
public function resetToDefault($scope, $name)
|
||||
{
|
||||
$scope = $this->sanitizeInput($scope);
|
||||
$name = $this->sanitizeInput($name);
|
||||
|
||||
$filePath = 'custom/Espo/Custom/Resources/layouts/' . $scope . '/' . $name . '.json';
|
||||
if ($this->getFileManager()->isFile($filePath)) {
|
||||
$this->getFileManager()->removeFile($filePath);
|
||||
}
|
||||
if (!empty($this->changedData[$scope]) && !empty($this->changedData[$scope][$name])) {
|
||||
unset($this->changedData[$scope][$name]);
|
||||
}
|
||||
return $this->get($scope, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,14 +154,14 @@ class Layout
|
||||
$result = true;
|
||||
|
||||
if (!empty($this->changedData)) {
|
||||
foreach ($this->changedData as $controllerName => $rowData) {
|
||||
foreach ($this->changedData as $scope => $rowData) {
|
||||
foreach ($rowData as $layoutName => $layoutData) {
|
||||
|
||||
if (empty($controllerName) || empty($layoutName)) {
|
||||
if (empty($scope) || empty($layoutName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$layoutPath = $this->getLayoutPath($controllerName, true);
|
||||
$layoutPath = $this->getLayoutPath($scope, true);
|
||||
$data = Json::encode($layoutData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$result &= $this->getFileManager()->putContents(array($layoutPath, $layoutName.'.json'), $data);
|
||||
@@ -162,17 +188,20 @@ class Layout
|
||||
|
||||
/**
|
||||
* Merge layout data
|
||||
* Ex. $controller= Account, $name= detail then will be created a file layoutFolder/Account/detail.json
|
||||
* Ex. $scope= Account, $name= detail then will be created a file layoutFolder/Account/detail.json
|
||||
*
|
||||
* @param JSON string $data
|
||||
* @param string $controller - ex. Account
|
||||
* @param string $scope - ex. Account
|
||||
* @param string $name - detail
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function merge($data, $controller, $name)
|
||||
public function merge($data, $scope, $name)
|
||||
{
|
||||
$prevData = $this->get($controller, $name);
|
||||
$scope = $this->sanitizeInput($scope);
|
||||
$name = $this->sanitizeInput($name);
|
||||
|
||||
$prevData = $this->get($scope, $name);
|
||||
|
||||
$prevDataArray = Json::getArrayData($prevData);
|
||||
$dataArray = Json::getArrayData($data);
|
||||
@@ -180,7 +209,7 @@ class Layout
|
||||
$data = Util::merge($prevDataArray, $dataArray);
|
||||
$data = Json::encode($data);
|
||||
|
||||
return $this->set($data, $controller, $name);
|
||||
return $this->set($data, $scope, $name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,9 +237,4 @@ class Layout
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -478,8 +478,7 @@ class Metadata
|
||||
}
|
||||
}
|
||||
|
||||
krsort($modulesToSort);
|
||||
asort($modulesToSort);
|
||||
array_multisort(array_values($modulesToSort), SORT_ASC, array_keys($modulesToSort), SORT_ASC, $modulesToSort);
|
||||
|
||||
$this->moduleList = array_keys($modulesToSort);
|
||||
}
|
||||
|
||||
52
application/Espo/Core/Utils/ThemeManager.php
Normal file
52
application/Espo/Core/Utils/ThemeManager.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Core\Utils;
|
||||
|
||||
class ThemeManager
|
||||
{
|
||||
protected $config;
|
||||
|
||||
protected $metadata;
|
||||
|
||||
private $defaultName = 'Espo';
|
||||
|
||||
private $defaultStylesheet = 'Espo';
|
||||
|
||||
public function __construct(Config $config, Metadata $metadata)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->metadata = $metadata;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->config->get('theme', $this->defaultName);
|
||||
}
|
||||
|
||||
public function getStylesheet()
|
||||
{
|
||||
return $this->metadata->get('themes.' . $this->getName() . '.stylesheet', 'client/css/espo.css');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ return array (
|
||||
"tabList" => array("Account", "Contact", "Lead", "Opportunity", "Calendar", "Meeting", "Call", "Task", "Case", "Email", "Document", "Campaign"),
|
||||
"quickCreateList" => array("Account", "Contact", "Lead", "Opportunity", "Meeting", "Call", "Task", "Case"),
|
||||
'calendarDefaultEntity' => 'Meeting',
|
||||
'disableExport' => false,
|
||||
'exportDisabled' => false,
|
||||
'assignmentEmailNotifications' => false,
|
||||
'assignmentEmailNotificationsEntityList' => array('Lead', 'Opportunity', 'Task', 'Case'),
|
||||
'assignmentNotificationsEntityList' => array('Meeting', 'Call', 'Task', 'Email'),
|
||||
@@ -101,6 +101,8 @@ return array (
|
||||
'maxEmailAccountCount' => 2,
|
||||
'followCreatedEntities' => false,
|
||||
'b2cMode' => false,
|
||||
'restrictedMode' => false,
|
||||
'theme' => 'Espo',
|
||||
'isInstalled' => false,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[{
|
||||
"label":"",
|
||||
"rows": [
|
||||
[{"name":"name"}]
|
||||
[{"name":"name", "fullWidth": true}, false]
|
||||
]
|
||||
}]
|
||||
|
||||
@@ -84,7 +84,10 @@ return array (
|
||||
'permissionMap',
|
||||
'permissionRules',
|
||||
'passwordSalt',
|
||||
'cryptKey'
|
||||
'cryptKey',
|
||||
'restrictedMode',
|
||||
'userLimit',
|
||||
'stylesheet'
|
||||
),
|
||||
'adminItems' =>
|
||||
array (
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\EntryPoints;
|
||||
|
||||
@@ -29,7 +29,7 @@ use \Espo\Core\Exceptions\BadRequest;
|
||||
class ChangePassword extends \Espo\Core\EntryPoints\Base
|
||||
{
|
||||
public static $authRequired = false;
|
||||
|
||||
|
||||
public function run()
|
||||
{
|
||||
$requestId = $_GET['id'];
|
||||
@@ -38,6 +38,7 @@ class ChangePassword extends \Espo\Core\EntryPoints\Base
|
||||
}
|
||||
|
||||
$config = $this->getConfig();
|
||||
$themeManager = $this->getThemeManager();
|
||||
|
||||
$p = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where(array(
|
||||
'requestId' => $requestId
|
||||
@@ -56,9 +57,15 @@ class ChangePassword extends \Espo\Core\EntryPoints\Base
|
||||
$html = file_get_contents('main.html');
|
||||
$html = str_replace('{{cacheTimestamp}}', $config->get('cacheTimestamp', 0), $html);
|
||||
$html = str_replace('{{useCache}}', $config->get('useCache') ? 'true' : 'false' , $html);
|
||||
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet(), $html);
|
||||
$html = str_replace('{{runScript}}', $runScript , $html);
|
||||
echo $html;
|
||||
exit;
|
||||
}
|
||||
|
||||
protected function getThemeManager()
|
||||
{
|
||||
return $this->getContainer()->get('themeManager');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ class Notifications extends \Espo\Core\Hooks\Base
|
||||
{
|
||||
public static $order = 10;
|
||||
|
||||
protected $noticatorsHash = array();
|
||||
protected $notifatorsHash = array();
|
||||
|
||||
private $streamService;
|
||||
|
||||
protected function init()
|
||||
{
|
||||
@@ -44,6 +46,11 @@ class Notifications extends \Espo\Core\Hooks\Base
|
||||
return $this->getInjection('container');
|
||||
}
|
||||
|
||||
protected function getServiceFactory()
|
||||
{
|
||||
return $this->getContainer()->get('serviceFactory');
|
||||
}
|
||||
|
||||
protected function getMetadata()
|
||||
{
|
||||
return $this->getInjection('metadata');
|
||||
@@ -59,7 +66,7 @@ class Notifications extends \Espo\Core\Hooks\Base
|
||||
|
||||
protected function getNotificator($entityType)
|
||||
{
|
||||
if (empty($this->noticatorsHash[$entityType])) {
|
||||
if (empty($this->notifatorsHash[$entityType])) {
|
||||
$normalizedName = Util::normilizeClassName($entityType);
|
||||
|
||||
$className = '\\Espo\\Custom\\Notificators\\' . $normalizedName;
|
||||
@@ -81,19 +88,19 @@ class Notifications extends \Espo\Core\Hooks\Base
|
||||
$notificator->inject($name, $this->getContainer()->get($name));
|
||||
}
|
||||
|
||||
$this->noticatorsHash[$entityType] = $notificator;
|
||||
$this->notifatorsHash[$entityType] = $notificator;
|
||||
}
|
||||
return $this->noticatorsHash[$entityType];
|
||||
return $this->notifatorsHash[$entityType];
|
||||
}
|
||||
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$entityType = $entity->getEntityType();
|
||||
|
||||
if (!empty($options['silent']) && !empty($options['noNotifications'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$entityType = $entity->getEntityType();
|
||||
|
||||
if (!$this->checkHasStream($entityType)) {
|
||||
if (in_array($entityType, $this->getConfig()->get('assignmentNotificationsEntityList', []))) {
|
||||
$notificator = $this->getNotificator($entityType);
|
||||
@@ -102,5 +109,43 @@ class Notifications extends \Espo\Core\Hooks\Base
|
||||
}
|
||||
}
|
||||
|
||||
public function beforeRemove(Entity $entity, array $options = array())
|
||||
{
|
||||
if (!empty($options['silent']) && !empty($options['noNotifications'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$entityType = $entity->getEntityType();
|
||||
if ($this->checkHasStream($entityType)) {
|
||||
$followersData = $this->getStreamService()->getEntityFollowers($entity);
|
||||
foreach ($followersData['idList'] as $userId) {
|
||||
if ($userId === $this->getUser()->id) {
|
||||
continue;
|
||||
}
|
||||
$notification = $this->getEntityManager()->getEntity('Notification');
|
||||
$notification->set(array(
|
||||
'userId' => $userId,
|
||||
'type' => 'EntityRemoved',
|
||||
'data' => array(
|
||||
'entityType' => $entity->getEntityType(),
|
||||
'entityId' => $entity->id,
|
||||
'entityName' => $entity->get('name'),
|
||||
'userId' => $this->getUser()->id,
|
||||
'userName' => $this->getUser()->get('name')
|
||||
)
|
||||
));
|
||||
$this->getEntityManager()->saveEntity($notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getStreamService()
|
||||
{
|
||||
if (empty($this->streamService)) {
|
||||
$this->streamService = $this->getServiceFactory()->create('Stream');
|
||||
}
|
||||
return $this->streamService;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ class Stream extends \Espo\Core\Hooks\Base
|
||||
|
||||
protected function getAutofollowUserIdList(Entity $entity, array $ignoreList = array())
|
||||
{
|
||||
$entityType = $entity->getEntityName();
|
||||
$entityType = $entity->getEntityType();
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
$userIdList = [];
|
||||
|
||||
@@ -160,7 +160,7 @@ class Stream extends \Espo\Core\Hooks\Base
|
||||
|
||||
public function afterSave(Entity $entity, array $options = array())
|
||||
{
|
||||
$entityName = $entity->getEntityName();
|
||||
$entityName = $entity->getEntityType();
|
||||
|
||||
if ($this->checkHasStream($entity)) {
|
||||
if ($entity->isNew()) {
|
||||
|
||||
@@ -40,7 +40,7 @@ class Cleanup extends \Espo\Core\Jobs\Base
|
||||
|
||||
protected function cleanupJobs()
|
||||
{
|
||||
$query = "DELETE FROM `job` WHERE DATE(modified_at) < '".$this->getDate()."' ";
|
||||
$query = "DELETE FROM `job` WHERE DATE(modified_at) < '".$this->getCleanupFromDate()."' AND status <> 'Pending'";
|
||||
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
$sth = $pdo->prepare($query);
|
||||
@@ -64,14 +64,14 @@ class Cleanup extends \Espo\Core\Jobs\Base
|
||||
|
||||
$delSql = "DELETE FROM `scheduled_job_log_record`
|
||||
WHERE scheduled_job_id = '".$id."'
|
||||
AND DATE(created_at) < '".$this->getDate()."'
|
||||
AND DATE(created_at) < '".$this->getCleanupFromDate()."'
|
||||
AND id NOT IN ('".implode("', '", $lastRowIds)."')
|
||||
";
|
||||
$pdo->query($delSql);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getDate($format = 'Y-m-d')
|
||||
protected function getCleanupFromDate($format = 'Y-m-d')
|
||||
{
|
||||
$datetime = new \DateTime();
|
||||
$datetime->modify($this->period);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Modules\Crm\Controllers;
|
||||
|
||||
@@ -27,16 +27,19 @@ use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Lead extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function actionConvert($params, $data)
|
||||
{
|
||||
public function actionConvert($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$entity = $this->getRecordService()->convert($data['id'], $data['records']);
|
||||
|
||||
|
||||
if (!empty($entity)) {
|
||||
return $entity->toArray();
|
||||
}
|
||||
throw new Error();
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class CheckEmailAccounts extends \Espo\Core\Jobs\Base
|
||||
try {
|
||||
$service->fetchFromMailServer($entity);
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('Job CheckEmailAccounts: [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
$GLOBALS['log']->error('Job CheckEmailAccounts '.$entity->id.': [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class CheckInboundEmails extends \Espo\Core\Jobs\Base
|
||||
try {
|
||||
$service->fetchFromMailServer($entity);
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('Job CheckInboundEmails: [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
$GLOBALS['log']->error('Job CheckInboundEmails '.$entity->id.': [' . $e->getCode() . '] ' .$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
67
application/Espo/Modules/Crm/Repositories/CaseObj.php
Normal file
67
application/Espo/Modules/Crm/Repositories/CaseObj.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Modules\Crm\Repositories;
|
||||
|
||||
use Espo\ORM\Entity;
|
||||
|
||||
class CaseObj extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
{
|
||||
$result = parent::afterSave($entity, $options);
|
||||
$this->handleAfterSaveContacts($entity, $options);
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function handleAfterSaveContacts(Entity $entity, array $options)
|
||||
{
|
||||
$contactIdChanged = $entity->has('contactId') && $entity->get('contactId') != $entity->getFetched('contactId');
|
||||
|
||||
if ($contactIdChanged) {
|
||||
$contactId = $entity->get('contactId');
|
||||
if (empty($contactId)) {
|
||||
$this->unrelate($entity, 'contacts', $entity->getFetched('contactId'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($contactIdChanged) {
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
|
||||
$sql = "
|
||||
SELECT id FROM case_contact
|
||||
WHERE
|
||||
contact_id = ".$pdo->quote($contactId)." AND
|
||||
case_id = ".$pdo->quote($entity->id)." AND
|
||||
deleted = 0
|
||||
";
|
||||
$sth = $pdo->prepare($sql);
|
||||
$sth->execute();
|
||||
|
||||
if (!$sth->fetch()) {
|
||||
$this->relate($entity, 'contacts', $contactId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,17 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
public function afterSave(Entity $entity, array $options)
|
||||
{
|
||||
$result = parent::afterSave($entity, $options);
|
||||
$this->handleAfterSaveAccounts($entity, $options);
|
||||
|
||||
if ($entity->has('targetListId') && $entity->isNew()) {
|
||||
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
protected function handleAfterSaveAccounts(Entity $entity, array $options)
|
||||
{
|
||||
$accountIdChanged = $entity->has('accountId') && $entity->get('accountId') != $entity->getFetched('accountId');
|
||||
$titleChanged = $entity->has('title') && $entity->get('title') != $entity->getFetched('title');
|
||||
|
||||
@@ -51,7 +61,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
$accountId = $entity->get('accountId');
|
||||
if (empty($accountId)) {
|
||||
$this->unrelate($entity, 'accounts', $entity->getFetched('accountId'));
|
||||
return $result;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +69,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
if (empty($accountId)) {
|
||||
$accountId = $entity->getFetched('accountId');
|
||||
if (empty($accountId)) {
|
||||
return $result;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,12 +101,6 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($entity->has('targetListId') && $entity->isNew()) {
|
||||
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,15 +44,18 @@
|
||||
"Computer": "Informationstechnologie",
|
||||
"Education": "Bildungswesen",
|
||||
"Electronics": "Elektronik",
|
||||
"Energy": "Energieerzeuger",
|
||||
"Entertainment & Leisure": "Freizeit- und Unterhaltungsindustrie",
|
||||
"Finance": "Finanzsektor",
|
||||
"Food & Beverage": "Speisen und Getränke",
|
||||
"Grocery": "Einzelhandel",
|
||||
"Healthcare": "Gesundheitswesen",
|
||||
"Insurance": "Versicherung",
|
||||
"Legal": "Rechtswesen",
|
||||
"Manufacturing": "Produktion",
|
||||
"Publishing": "Medien",
|
||||
"Real Estate": "Immobilien",
|
||||
"Service": "Dienstleistung",
|
||||
"Service": "Service",
|
||||
"Sports": "Sport",
|
||||
"Software": "Software",
|
||||
"Technology": "Technologie",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"softBouncedCount": "Soft Bounced",
|
||||
"leadCreatedCount": "Erstellte Interessenten",
|
||||
"revenue": "Umsatz",
|
||||
"revenueConverted": "Umsatz (konvertiert)"
|
||||
"revenueConverted": "Umsatz (konvertiert)",
|
||||
"budget": "Budget"
|
||||
},
|
||||
"links": {
|
||||
"targetLists": "Kontaktlisten",
|
||||
|
||||
@@ -5,11 +5,21 @@
|
||||
"status": "Status",
|
||||
"account": "Firma",
|
||||
"contact": "Kontakt",
|
||||
"contacts": "Kontakte",
|
||||
"priority": "Priorität",
|
||||
"type": "Typ",
|
||||
"description": "Beschreibung"
|
||||
"description": "Beschreibung",
|
||||
"inboundEmail": "Eingehende E-Mails"
|
||||
},
|
||||
"links": {
|
||||
"inboundEmail": "Eingehende E-Mails",
|
||||
"account": "Firma",
|
||||
"contact": "Kontakt (Primär)",
|
||||
"Contacts": "Kontakte",
|
||||
"meetings": "Meetings",
|
||||
"calls": "Anrufe",
|
||||
"tasks": "Aufgaben",
|
||||
"emails": "E-Mails"
|
||||
},
|
||||
"options": {
|
||||
"status": {
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
"cases": "Fälle",
|
||||
"targetLists": "Kontaktlisten",
|
||||
"campaignLogRecords": "Kampagnen Log",
|
||||
"campaign": "Kampagne"
|
||||
"campaign": "Kampagne",
|
||||
"account": "Firma (Primär)",
|
||||
"accounts": "Firmen",
|
||||
"casesPrimary": "Fälle (Primär)"
|
||||
},
|
||||
"labels": {
|
||||
"Create Contact": "Kontakt erstellen"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"Log Call": "Anruf erfassen",
|
||||
"Archive Email": "E-Mail archivieren",
|
||||
"Create Task": "Neue Aufgabe",
|
||||
"Tasks": "Aufgaben"
|
||||
"Tasks": "Aufgaben"
|
||||
},
|
||||
"fields": {
|
||||
"billingAddressCity": "Ort",
|
||||
@@ -68,7 +68,7 @@
|
||||
"addressStreet": "Straße",
|
||||
"addressCountry": "Land",
|
||||
"addressState": "Bundesland/Kanton",
|
||||
"addressPostalCode": "PLZ",
|
||||
"addressPostalCode": "PLZ",
|
||||
"shippingAddressCity": "Ort (Lieferadresse)",
|
||||
"shippingAddressStreet": "Straße (Lieferadresse)",
|
||||
"shippingAddressCountry": "Land (Lieferadresse)",
|
||||
@@ -78,7 +78,7 @@
|
||||
"links": {
|
||||
"contacts": "Kontakte",
|
||||
"opportunities": "Verkaufschancen",
|
||||
"leads": "Interessenten",
|
||||
"leads": "Interessenten",
|
||||
"meetings": "Meetings",
|
||||
"calls": "Anrufe",
|
||||
"tasks": "Aufgaben",
|
||||
@@ -87,7 +87,7 @@
|
||||
"cases": "Fälle",
|
||||
"documents": "Dokumente",
|
||||
"account": "Firma",
|
||||
"opportunity": "Verkaufschance",
|
||||
"opportunity": "Verkaufschance",
|
||||
"contact": "Kontakt",
|
||||
"parent": "Bezieht sich auf"
|
||||
},
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
"links": {
|
||||
"targetLists": "Kontaktlisten",
|
||||
"campaignLogRecords": "Kampagnen Log",
|
||||
"campaign": "Kampagne"
|
||||
"campaign": "Kampagne",
|
||||
"createdAccount": "Firma",
|
||||
"createdContact": "Kontakt",
|
||||
"createdOpportunity": "Verkaufschance"
|
||||
},
|
||||
"options": {
|
||||
"status": {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"Set Not Held": "Auf nicht gehalten setzen",
|
||||
"Send Invitations": "Einladungen versenden",
|
||||
"on time": "Aktuelle Zeit",
|
||||
"before": "bevor"
|
||||
"before": "Bevor"
|
||||
},
|
||||
"presetFilters": {
|
||||
"planned": "Geplant",
|
||||
|
||||
@@ -44,12 +44,15 @@
|
||||
"Computer": "Computer",
|
||||
"Education": "Education",
|
||||
"Electronics": "Electronics",
|
||||
"Energy": "Energy",
|
||||
"Entertainment & Leisure": "Entertainment & Leisure",
|
||||
"Finance": "Finance",
|
||||
"Food & Beverage": "Food & Beverage",
|
||||
"Grocery": "Grocery",
|
||||
"Healthcare": "Healthcare",
|
||||
"Insurance": "Insurance",
|
||||
"Legal": "Legal",
|
||||
"Manufacturing": "Manufacturing",
|
||||
"Publishing": "Publishing",
|
||||
"Real Estate": "Real Estate",
|
||||
"Service": "Service",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"softBouncedCount": "Soft Bounced",
|
||||
"leadCreatedCount": "Leads Created",
|
||||
"revenue": "Revenue",
|
||||
"revenueConverted": "revenue (converted)"
|
||||
"revenueConverted": "revenue (converted)",
|
||||
"budget": "Budget"
|
||||
},
|
||||
"links": {
|
||||
"targetLists": "Target Lists",
|
||||
|
||||
@@ -5,11 +5,21 @@
|
||||
"status": "Status",
|
||||
"account": "Account",
|
||||
"contact": "Contact",
|
||||
"contacts": "Contacts",
|
||||
"priority": "Priority",
|
||||
"type": "Type",
|
||||
"description": "Description"
|
||||
"description": "Description",
|
||||
"inboundEmail": "Inbound Email"
|
||||
},
|
||||
"links": {
|
||||
"inboundEmail": "Inbound Email",
|
||||
"account": "Account",
|
||||
"contact": "Contact (Primary)",
|
||||
"Contacts": "Contacts",
|
||||
"meetings": "Meetings",
|
||||
"calls": "Calls",
|
||||
"tasks": "Tasks",
|
||||
"emails": "Emails"
|
||||
},
|
||||
"options": {
|
||||
"status": {
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
"cases": "Cases",
|
||||
"targetLists": "Target Lists",
|
||||
"campaignLogRecords": "Campaign Log",
|
||||
"campaign": "Campaign"
|
||||
"campaign": "Campaign",
|
||||
"account": "Account (Primary)",
|
||||
"accounts": "Accounts",
|
||||
"casesPrimary": "Cases (Primary)"
|
||||
},
|
||||
"labels": {
|
||||
"Create Contact": "Create Contact"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"Log Call": "Log Call",
|
||||
"Archive Email": "Archive Email",
|
||||
"Create Task": "Create Task",
|
||||
"Tasks": "Tasks"
|
||||
"Tasks": "Tasks"
|
||||
},
|
||||
"fields": {
|
||||
"billingAddressCity": "City",
|
||||
@@ -68,7 +68,7 @@
|
||||
"addressStreet": "Street",
|
||||
"addressCountry": "Country",
|
||||
"addressState": "State",
|
||||
"addressPostalCode": "Postal Code",
|
||||
"addressPostalCode": "Postal Code",
|
||||
"shippingAddressCity": "City (Shipping)",
|
||||
"shippingAddressStreet": "Street (Shipping)",
|
||||
"shippingAddressCountry": "Country (Shipping)",
|
||||
@@ -78,7 +78,7 @@
|
||||
"links": {
|
||||
"contacts": "Contacts",
|
||||
"opportunities": "Opportunities",
|
||||
"leads": "Leads",
|
||||
"leads": "Leads",
|
||||
"meetings": "Meetings",
|
||||
"calls": "Calls",
|
||||
"tasks": "Tasks",
|
||||
@@ -87,7 +87,7 @@
|
||||
"cases": "Cases",
|
||||
"documents": "Documents",
|
||||
"account": "Account",
|
||||
"opportunity": "Opportunity",
|
||||
"opportunity": "Opportunity",
|
||||
"contact": "Contact",
|
||||
"parent": "Parent"
|
||||
},
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
"links": {
|
||||
"targetLists": "Target Lists",
|
||||
"campaignLogRecords": "Campaign Log",
|
||||
"campaign": "Campaign"
|
||||
"campaign": "Campaign",
|
||||
"createdAccount": "Account",
|
||||
"createdContact": "Contact",
|
||||
"createdOpportunity": "Opportunity"
|
||||
},
|
||||
"options": {
|
||||
"status": {
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
"Send Invitations": "Отправить приглашения"
|
||||
},
|
||||
"presetFilters": {
|
||||
"planned": "Запланированный",
|
||||
"held": "Выполнен",
|
||||
"planned": "Запланированные",
|
||||
"held": "Завершенные",
|
||||
"todays": "На сегодня"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"Create Case": "Создать обращение"
|
||||
},
|
||||
"presetFilters": {
|
||||
"open": "Открыть",
|
||||
"closed": "Закрыто"
|
||||
"open": "Открытые",
|
||||
"closed": "Закрытые"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
"Send Invitations": "Отправить приглашения"
|
||||
},
|
||||
"presetFilters": {
|
||||
"planned": "Запланированный",
|
||||
"held": "Выполнен",
|
||||
"planned": "Запланированные",
|
||||
"held": "Завершенные",
|
||||
"todays": "На сегодня"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
[{"name":"name"}, {"name":"status"}],
|
||||
[{"name":"type"}, {"name":"startDate"}],
|
||||
[{"name":"targetLists"}, {"name":"endDate"}],
|
||||
[false, {"name":"budget"}],
|
||||
[{"name":"description", "fullWidth": true}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"rows":[
|
||||
[{"name":"name"},{"name":"number"}],
|
||||
[{"name":"status"},{"name":"account"}],
|
||||
[{"name":"priority"},{"name":"contact"}],
|
||||
[{"name":"priority"},{"name":"contacts"}],
|
||||
[{"name":"type"},false],
|
||||
[{"name":"description", "fullWidth": true}]
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"label":false,
|
||||
"label": "",
|
||||
"rows":[
|
||||
[{"name":"file"}, {"name":"source"}],
|
||||
[{"name":"name"}, {"name":"folder"}]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"label": false,
|
||||
"label": "",
|
||||
"rows": [
|
||||
[{"name":"file"}, {"name":"source"}],
|
||||
[{"name":"name"}],
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{"name":"name", "width": 35, "link": true},
|
||||
{"name":"stage", "width": 25},
|
||||
{"name":"createdAt"},
|
||||
{"name":"amount", "align": "right"}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{"name":"name", "width": 35, "link": true},
|
||||
{"name":"stage", "width": 25},
|
||||
{"name":"createdAt"},
|
||||
{"name":"amount", "align": "right"}
|
||||
{"name":"name", "width": 32, "link": true},
|
||||
{"name":"account", "width": 22},
|
||||
{"name":"stage", "width": 22},
|
||||
{"name":"createdAt"}
|
||||
]
|
||||
@@ -8,7 +8,7 @@
|
||||
[{"name":"dateStart"},{"name":"dateCompleted"}],
|
||||
[{"name":"dateEnd"},false],
|
||||
[{"name":"description", "fullWidth": true}],
|
||||
[{"name":"attachments"},false]
|
||||
[{"name":"attachments", "fullWidth": true}]
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -24,9 +24,9 @@
|
||||
},
|
||||
"relationshipPanels":{
|
||||
"contacts":{
|
||||
"actions":[
|
||||
|
||||
],
|
||||
"layout":"listForAccount"
|
||||
},
|
||||
"opportunities":{
|
||||
"layout":"listForAccount"
|
||||
},
|
||||
"campaignLogRecords": {
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"detailSmall":[
|
||||
@@ -33,7 +34,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
@@ -47,7 +49,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"editSmall":[
|
||||
@@ -61,7 +64,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -37,5 +37,35 @@
|
||||
"filterList": [
|
||||
"active"
|
||||
],
|
||||
"formDependency": {
|
||||
"type": {
|
||||
"map": {
|
||||
"Email": [
|
||||
{
|
||||
"action": "show",
|
||||
"fields": ["targetLists"]
|
||||
}
|
||||
],
|
||||
"Newsletter": [
|
||||
{
|
||||
"action": "show",
|
||||
"fields": ["targetLists"]
|
||||
}
|
||||
],
|
||||
"Mail": [
|
||||
{
|
||||
"action": "show",
|
||||
"fields": ["targetLists"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": [
|
||||
{
|
||||
"action": "hide",
|
||||
"fields": ["targetLists"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"boolFilterList": ["onlyMy"]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
"rowActionsView": "Record.RowActions.Empty",
|
||||
"select": false,
|
||||
"create": false
|
||||
},
|
||||
"opportunities":{
|
||||
"layout":"listForAccount"
|
||||
}
|
||||
},
|
||||
"boolFilterList": ["onlyMy"],
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"detailSmall":[
|
||||
@@ -33,7 +34,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"edit":[
|
||||
@@ -47,7 +49,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
],
|
||||
"editSmall":[
|
||||
@@ -61,7 +64,8 @@
|
||||
"contacts",
|
||||
"leads"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sticked": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
"additionalLayouts": {
|
||||
"detailConvert": {
|
||||
"type": "detail"
|
||||
},
|
||||
"listForAccount": {
|
||||
"type": "listSmall"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
},
|
||||
"type": {
|
||||
"type": "enum",
|
||||
"options": ["", "Customer", "Investor", "Partner", "Reseller"]
|
||||
"options": ["", "Customer", "Investor", "Partner", "Reseller"],
|
||||
"default": ""
|
||||
},
|
||||
"industry": {
|
||||
"type": "enum",
|
||||
"options": [
|
||||
"",
|
||||
"Agriculture",
|
||||
"Advertising",
|
||||
"Agriculture",
|
||||
"Apparel & Accessories",
|
||||
"Automotive",
|
||||
"Banking",
|
||||
@@ -33,12 +34,15 @@
|
||||
"Computer",
|
||||
"Education",
|
||||
"Electronics",
|
||||
"Energy",
|
||||
"Entertainment & Leisure",
|
||||
"Finance",
|
||||
"Food & Beverage",
|
||||
"Grocery",
|
||||
"Healthcare",
|
||||
"Insurance",
|
||||
"Legal",
|
||||
"Manufacturing",
|
||||
"Publishing",
|
||||
"Real Estate",
|
||||
"Service",
|
||||
@@ -49,7 +53,9 @@
|
||||
"Television",
|
||||
"Transportation",
|
||||
"Venture Capital"
|
||||
]
|
||||
],
|
||||
"default": "",
|
||||
"isSorted": true
|
||||
},
|
||||
"sicCode": {
|
||||
"type": "varchar",
|
||||
|
||||
@@ -101,6 +101,9 @@
|
||||
"notStorable": true,
|
||||
"readOnly": true,
|
||||
"disabled": true
|
||||
},
|
||||
"budget": {
|
||||
"type": "currency"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
"type": "link",
|
||||
"view": "Crm:Case.Fields.Contact"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "linkMultiple",
|
||||
"view": "crm:views/case/fields/contacts"
|
||||
},
|
||||
"inboundEmail": {
|
||||
"type": "link",
|
||||
"readOnly": true
|
||||
@@ -100,7 +104,13 @@
|
||||
"contact": {
|
||||
"type": "belongsTo",
|
||||
"entity": "Contact",
|
||||
"foreign": "cases"
|
||||
"foreign": "casesPrimary"
|
||||
},
|
||||
"contacts": {
|
||||
"type": "hasMany",
|
||||
"entity": "Contact",
|
||||
"foreign": "cases",
|
||||
"layoutRelationshipsDisabled": true
|
||||
},
|
||||
"meetings": {
|
||||
"type": "hasChildren",
|
||||
|
||||
@@ -183,10 +183,16 @@
|
||||
"entity": "Opportunity",
|
||||
"foreign": "contacts"
|
||||
},
|
||||
"casesPrimary": {
|
||||
"type": "hasMany",
|
||||
"entity": "Case",
|
||||
"foreign": "contact",
|
||||
"layoutRelationshipsDisabled": true
|
||||
},
|
||||
"cases": {
|
||||
"type": "hasMany",
|
||||
"entity": "Case",
|
||||
"foreign": "contact"
|
||||
"foreign": "contacts"
|
||||
},
|
||||
"meetings": {
|
||||
"type": "hasMany",
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
},
|
||||
"source": {
|
||||
"type": "enum",
|
||||
"options": ["", "Call", "Email", "Existing Customer", "Partner", "Public Relations", "Web Site", "Campaign", "Other"]
|
||||
"options": ["", "Call", "Email", "Existing Customer", "Partner", "Public Relations", "Web Site", "Campaign", "Other"],
|
||||
"default": ""
|
||||
},
|
||||
"opportunityAmount": {
|
||||
"type": "currency",
|
||||
@@ -230,6 +231,11 @@
|
||||
"foreign": "leads"
|
||||
}
|
||||
},
|
||||
"convertEntityList": [
|
||||
"Account",
|
||||
"Contact",
|
||||
"Opportunity"
|
||||
],
|
||||
"convertFields": {
|
||||
"Contact": {
|
||||
},
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
"max": 100
|
||||
},
|
||||
"leadSource": {
|
||||
"type": "varchar",
|
||||
"type": "enum",
|
||||
"view": "Crm:Opportunity.Fields.LeadSource",
|
||||
"customizationDisabled": true
|
||||
"customizationOptionsDisabled": true,
|
||||
"default": ""
|
||||
},
|
||||
"closeDate": {
|
||||
"type": "date",
|
||||
|
||||
@@ -84,8 +84,7 @@
|
||||
"type": "linkMultiple"
|
||||
},
|
||||
"attachments": {
|
||||
"type": "linkMultiple",
|
||||
"view": "Fields.AttachmentMultiple"
|
||||
"type": "attachmentMultiple"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
@@ -114,13 +113,6 @@
|
||||
"account": {
|
||||
"type": "belongsTo",
|
||||
"entity": "Account"
|
||||
},
|
||||
"attachments": {
|
||||
"type": "hasChildren",
|
||||
"entity": "Attachment",
|
||||
"foreign": "parent",
|
||||
"relationName": "attachments",
|
||||
"layoutRelationshipsDisabled": true
|
||||
}
|
||||
},
|
||||
"collection": {
|
||||
|
||||
@@ -37,14 +37,21 @@ class Task extends \Espo\Core\SelectManagers\Base
|
||||
protected function filterActual(&$result)
|
||||
{
|
||||
$result['whereClause'][] = array(
|
||||
'status!=' => array('Completed', 'Canceled')
|
||||
'status!=' => ['Completed', 'Canceled']
|
||||
);
|
||||
}
|
||||
|
||||
protected function filterActualNotDeferred(&$result)
|
||||
{
|
||||
$result['whereClause'][] = array(
|
||||
'status!=' => ['Completed', 'Canceled', 'Deferred']
|
||||
);
|
||||
}
|
||||
|
||||
protected function filterCompleted(&$result)
|
||||
{
|
||||
$result['whereClause'][] = array(
|
||||
'status' => array('Completed')
|
||||
'status' => ['Completed']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
|
||||
protected function getUserMeetingQuery($id, $op, $notIn)
|
||||
{
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
$sql = "
|
||||
SELECT meeting.id AS 'id', meeting.name AS 'name', meeting.date_start AS 'dateStart', meeting.date_end AS 'dateEnd', 'Meeting' AS '_scope',
|
||||
meeting.assigned_user_id AS assignedUserId, TRIM(CONCAT(assignedUser.first_name, ' ', assignedUser.last_name)) AS assignedUserName,
|
||||
@@ -76,7 +77,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
FROM `meeting`
|
||||
LEFT JOIN `user` AS `assignedUser` ON assignedUser.id = meeting.assigned_user_id
|
||||
JOIN `meeting_user` AS `usersMiddle` ON usersMiddle.meeting_id = meeting.id AND usersMiddle.deleted = 0
|
||||
WHERE meeting.deleted = 0 AND usersMiddle.user_id = '".$this->getUser()->id."'
|
||||
WHERE meeting.deleted = 0 AND usersMiddle.user_id = ".$pdo->quote($id)."
|
||||
";
|
||||
if (!empty($notIn)) {
|
||||
$sql .= "
|
||||
@@ -88,6 +89,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
|
||||
protected function getUserCallQuery($id, $op, $notIn)
|
||||
{
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
$sql = "
|
||||
SELECT call.id AS 'id', call.name AS 'name', call.date_start AS 'dateStart', call.date_end AS 'dateEnd', 'Call' AS '_scope',
|
||||
call.assigned_user_id AS assignedUserId, TRIM(CONCAT(assignedUser.first_name, ' ', assignedUser.last_name)) AS assignedUserName,
|
||||
@@ -95,7 +97,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
FROM `call`
|
||||
LEFT JOIN `user` AS `assignedUser` ON assignedUser.id = call.assigned_user_id
|
||||
JOIN `call_user` AS `usersMiddle` ON usersMiddle.call_id = call.id AND usersMiddle.deleted = 0
|
||||
WHERE call.deleted = 0 AND usersMiddle.user_id = '".$this->getUser()->id."'
|
||||
WHERE call.deleted = 0 AND usersMiddle.user_id = ".$pdo->quote($id)."
|
||||
";
|
||||
if (!empty($notIn)) {
|
||||
$sql .= "
|
||||
@@ -107,6 +109,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
|
||||
protected function getUserEmailQuery($id, $op, $notIn)
|
||||
{
|
||||
$pdo = $this->getEntityManager()->getPDO();
|
||||
$sql = "
|
||||
SELECT email.id AS 'id', email.name AS 'name', email.date_sent AS 'dateStart', '' AS 'dateEnd', 'Email' AS '_scope',
|
||||
email.assigned_user_id AS assignedUserId, TRIM(CONCAT(assignedUser.first_name, ' ', assignedUser.last_name)) AS assignedUserName,
|
||||
@@ -114,7 +117,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
FROM `email`
|
||||
LEFT JOIN `user` AS `assignedUser` ON assignedUser.id = email.assigned_user_id
|
||||
JOIN `email_user` AS `usersMiddle` ON usersMiddle.email_id = email.id AND usersMiddle.deleted = 0
|
||||
WHERE email.deleted = 0 AND usersMiddle.user_id = '".$this->getUser()->id."'
|
||||
WHERE email.deleted = 0 AND usersMiddle.user_id = ".$pdo->quote($id)."
|
||||
";
|
||||
if (!empty($notIn)) {
|
||||
$sql .= "
|
||||
@@ -326,7 +329,7 @@ class Activities extends \Espo\Core\Services\Base
|
||||
";
|
||||
}
|
||||
|
||||
if ($this->isPerson($scope)) {
|
||||
if ($this->isPerson($scope) || $scope == 'Account') {
|
||||
$sql = $sql . "
|
||||
UNION
|
||||
" . $baseSql;
|
||||
|
||||
@@ -94,7 +94,6 @@ class Lead extends \Espo\Services\Record
|
||||
|
||||
$entityManager = $this->getEntityManager();
|
||||
|
||||
|
||||
if (!empty($recordsData->Account)) {
|
||||
$account = $entityManager->getEntity('Account');
|
||||
$account->set(get_object_vars($recordsData->Account));
|
||||
@@ -173,6 +172,19 @@ class Lead extends \Espo\Services\Record
|
||||
}
|
||||
}
|
||||
|
||||
$streamService = $this->getStreamService();
|
||||
if ($streamService->checkIsFollowed($lead, $this->getUser()->id)) {
|
||||
if (!empty($opportunity)) {
|
||||
$streamService->followEntity($opportunity, $this->getUser()->id);
|
||||
}
|
||||
if (!empty($account)) {
|
||||
$streamService->followEntity($account, $this->getUser()->id);
|
||||
}
|
||||
if (!empty($contact)) {
|
||||
$streamService->followEntity($contact, $this->getUser()->id);
|
||||
}
|
||||
}
|
||||
|
||||
return $lead;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,30 +29,6 @@ use \Espo\ORM\Entity;
|
||||
|
||||
class Task extends \Espo\Services\Record
|
||||
{
|
||||
public function loadAdditionalFields(Entity $entity)
|
||||
{
|
||||
parent::loadAdditionalFields($entity);
|
||||
|
||||
if ($entity->id) {
|
||||
$this->loadAttachmentsTypes($entity);
|
||||
}
|
||||
}
|
||||
|
||||
protected function loadAttachmentsTypes(Entity $entity)
|
||||
{
|
||||
$types = new \stdClass();
|
||||
|
||||
$attachmentsIds = $entity->get('attachmentsIds');
|
||||
if (!empty($attachmentsIds)) {
|
||||
foreach ($attachmentsIds as $id) {
|
||||
$attachment = $this->getEntityManager()->getEntity('Attachment', $id);
|
||||
if ($attachment) {
|
||||
$types->$id = $attachment->get('type');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$entity->set('attachmentsTypes', $types);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,13 +43,17 @@ class Email extends \Espo\Core\Notificators\Base
|
||||
|
||||
public function process(Entity $entity)
|
||||
{
|
||||
if ($entity->get('status') != 'Archived' && $entity->get('status') != 'Sent') {
|
||||
if ($entity->get('status') !== 'Archived' && $entity->get('status') !== 'Sent') {
|
||||
return;
|
||||
}
|
||||
|
||||
$previousUserIdList = $entity->getFetched('usersIds');
|
||||
if (!is_array($previousUserIdList)) {
|
||||
if ($entity->get('status') === 'Sent') {
|
||||
$previousUserIdList = [];
|
||||
} else {
|
||||
$previousUserIdList = $entity->getFetched('usersIds');
|
||||
if (!is_array($previousUserIdList)) {
|
||||
$previousUserIdList = [];
|
||||
}
|
||||
}
|
||||
|
||||
$emailUserIdList = $entity->get('usersIds');
|
||||
@@ -70,6 +74,10 @@ class Email extends \Espo\Core\Notificators\Base
|
||||
'emailName' => $entity->get('name'),
|
||||
);
|
||||
|
||||
if (!$entity->has('from')) {
|
||||
$this->getEntityManager()->getRepository('Email')->loadFromField($entity);
|
||||
}
|
||||
|
||||
$from = $entity->get('from');
|
||||
if ($from) {
|
||||
$person = $this->getEntityManager()->getRepository('EmailAddress')->getEntityByAddress($from, null, ['User', 'Contact', 'Lead']);
|
||||
|
||||
@@ -137,6 +137,7 @@ abstract class Base
|
||||
}
|
||||
|
||||
if (!empty($params['joins']) && is_array($params['joins'])) {
|
||||
$params['joins'] = array_unique($params['joins']);
|
||||
$joinsRelated = $this->getJoins($entity, $params['joins'], false, $params['joinConditions']);
|
||||
if (!empty($joinsRelated)) {
|
||||
if (!empty($joinsPart)) {
|
||||
@@ -147,6 +148,7 @@ abstract class Base
|
||||
}
|
||||
|
||||
if (!empty($params['leftJoins']) && is_array($params['leftJoins'])) {
|
||||
$params['leftJoins'] = array_unique($params['leftJoins']);
|
||||
$joinsRelated = $this->getJoins($entity, $params['leftJoins'], true, $params['joinConditions']);
|
||||
if (!empty($joinsRelated)) {
|
||||
if (!empty($joinsPart)) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"Data": "Daten",
|
||||
"Customization": "Anpassung",
|
||||
"Available Fields": "Verfügbare Felder",
|
||||
"Layout": "Layout",
|
||||
"Layout": "Aktuelles Layout",
|
||||
"Entity Manager": "Entitäts-/Modulmanager",
|
||||
"Add Panel": "Panel hinzufügen",
|
||||
"Add Field": "Feld hinzufügen",
|
||||
@@ -20,7 +20,7 @@
|
||||
"Teams": "Teams",
|
||||
"Roles": "Rollen",
|
||||
"Outbound Emails": "Ausgehende E-Mails",
|
||||
"Inbound Emails": "Eingehende E-Mails",
|
||||
"Inbound Emails": "Gruppen E-Mail Konten",
|
||||
"Email Templates": "E-Mail Vorlagen",
|
||||
"Import": "Import",
|
||||
"Layout Manager": "Layouts anpassen",
|
||||
@@ -45,7 +45,9 @@
|
||||
"Edit Entity": "Entität/Modul bearbeiten",
|
||||
"Create Link": "Relation erstellen",
|
||||
"Edit Link": "Relation bearbeiten",
|
||||
"Notifications": "Benachrichtigungen"
|
||||
"Notifications": "Benachrichtigungen",
|
||||
"Jobs": "Jobs",
|
||||
"Reset to Default": "Zurücksetzen auf Standard"
|
||||
},
|
||||
"layouts": {
|
||||
"list": "Liste",
|
||||
@@ -85,7 +87,8 @@
|
||||
"varchar": "Text (max. 255)",
|
||||
"file": "Datei",
|
||||
"image": "Bild",
|
||||
"multiEnum": "Mehrfachauswahl"
|
||||
"multiEnum": "Mehrfachauswahl",
|
||||
"attachmentMultiple": "Mehrfach Anhänge"
|
||||
},
|
||||
"fields": {
|
||||
"type": "Typ",
|
||||
@@ -106,17 +109,19 @@
|
||||
"noEmptyString": "Keine leere Zeichenkette",
|
||||
"defaultType": "Standardtyp",
|
||||
"seeMoreDisabled": "Abschneiden des Texts verhindern",
|
||||
"entityList": "Entity List"
|
||||
"entityList": "Entitätsliste",
|
||||
"isSorted": "Sortiert (alphabetisch)",
|
||||
"audited": "Auditiert"
|
||||
},
|
||||
"messages": {
|
||||
"upgradeVersion": "Ihr EspoCRM wird nun auf Version <strong>{version}</strong> aktualisiert. Dies kann einige Zeit dauern.",
|
||||
"upgradeDone": "Ihr EspoCRM wurde auf Version <strong>{version}</strong> aktualisiert.",
|
||||
"upgradeBackup": "Wir empfehlen, vor der Aktualisierung von EspoCRM das Programmverzeichnis sowie die Datenbank zu sichern.",
|
||||
"upgradeBackup": "Wie empfehlen VOR einer Aktualisierung die Espo Dateien sowie die Datenbank zu sichern.",
|
||||
"thousandSeparatorEqualsDecimalMark": "Das Tausendertrennzeichen kann nicht gleich dem Dezimaltrennzeichen sein",
|
||||
"userHasNoEmailAddress": "Der Benutzer hat keine E-Mail Adresse.",
|
||||
"selectEntityType": "Modul/Entität links auswählen",
|
||||
"selectUpgradePackage": "Aktualisierungspaket auswählen",
|
||||
"downloadUpgradePackage": "Download upgrade package(s) <a href=\"{url}\">here</a>.",
|
||||
"downloadUpgradePackage": "Aktualisierungspaket(e) <a href=\"{url}\">hier </a>herunterladen.",
|
||||
"selectLayout": "Layout zum Editieren links auswählen",
|
||||
"selectExtensionPackage": "Erweiterungspaket auswählen",
|
||||
"extensionInstalled": "Erweiterung {name} {version} wurde installiert.",
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
"Forward": "Weiterleiten",
|
||||
"Original message": "Originalnachricht",
|
||||
"Forwarded message": "Weitergeleitete Nachricht:",
|
||||
"Email Accounts": "E-Mail Konten",
|
||||
"Email Accounts": "Persönliche E-Mail Konten",
|
||||
"Inbound Emails": "Gruppen E-Mail Konten",
|
||||
"Email Templates": "E-Mail Vorlagen",
|
||||
"Send Test Email": "Test E-Mail senden",
|
||||
"Send": "Senden",
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"fetchSince": "Holen seit",
|
||||
"emailAddress": "E-Mail Adresse",
|
||||
"sentFolder": "Gesendet Ordner",
|
||||
"storeSentEmails": "Gesendete E-Mails speichern"
|
||||
"storeSentEmails": "Gesendete E-Mails speichern",
|
||||
"keepFetchedEmailsUnread": "Geholte E-Mails als ungelesen behalten"
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"body": "Inhalt",
|
||||
"subject": "Betreff",
|
||||
"attachments": "Anhänge",
|
||||
"insertField": "Project-Id-Version: 3.50\nPOT-Creation-Date: 2015-07-22\nPO-Revision-Date: \nLast-Translator: iscon\nLanguage-Team: iscon group <info@iscongroup.net>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nLanguage: de_DE\n"
|
||||
"insertField": "Project-Id-Version: \nPOT-Creation-Date: \nPO-Revision-Date: \nLast-Translator: \nLanguage-Team: iscon group <info@iscongroup.net>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nLanguage: de_DE\nX-Generator: Poedit 1.8.4\n"
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
"Team": "Team",
|
||||
"Role": "Rolle",
|
||||
"EmailTemplate": "E-Mail Vorlage",
|
||||
"EmailAccount": "E-Mail Konto",
|
||||
"EmailAccountScope": "E-Mail Konto",
|
||||
"EmailAccount": "Persönliches E-Mail Konto",
|
||||
"EmailAccountScope": "Persönliches E-Mail Konto",
|
||||
"OutboundEmail": "Ausgehende E-Mail",
|
||||
"ScheduledJob": "Geplante Aufgabe",
|
||||
"ExternalAccount": "Externes Konto",
|
||||
"Extension": "Erweiterung",
|
||||
"Dashboard": "Übersicht",
|
||||
"InboundEmail": "Eingehende E-Mail",
|
||||
"InboundEmail": "Gruppen E-Mail Konto",
|
||||
"Stream": "Vorgänge",
|
||||
"Import": "Import",
|
||||
"Template": "Vorlage"
|
||||
"Template": "Vorlage",
|
||||
"Job": "Job"
|
||||
},
|
||||
"scopeNamesPlural": {
|
||||
"Email": "E-Mails",
|
||||
@@ -23,17 +24,18 @@
|
||||
"Team": "Teams",
|
||||
"Role": "Rollen",
|
||||
"EmailTemplate": "E-Mail Vorlagen",
|
||||
"EmailAccount": "E-Mail Konten",
|
||||
"EmailAccountScope": "E-Mail Konten",
|
||||
"EmailAccount": "Persönliche E-Mail Konten",
|
||||
"EmailAccountScope": "Persönliche E-Mail Konten",
|
||||
"OutboundEmail": "Ausgehende E-Mails",
|
||||
"ScheduledJob": "Geplante Jobs",
|
||||
"ExternalAccount": "Externe Konten",
|
||||
"Extension": "Erweiterungen",
|
||||
"Dashboard": "Übersicht",
|
||||
"InboundEmail": "Eingehende E-Mails",
|
||||
"InboundEmail": "Gruppen E-Mail Konten",
|
||||
"Stream": "Vorgänge",
|
||||
"Import": "Importergebnis",
|
||||
"Template": "Vorlagen"
|
||||
"Template": "Vorlagen",
|
||||
"Job": "Jobs"
|
||||
},
|
||||
"labels": {
|
||||
"Misc": "Verschiedenes",
|
||||
@@ -160,7 +162,8 @@
|
||||
"Tree View": "Baumansicht",
|
||||
"Unlink All": "Alle Links entfernen",
|
||||
"Total": "Gesamt",
|
||||
"Print to PDF": "Als PDF drucken"
|
||||
"Print to PDF": "Als PDF drucken",
|
||||
"Default": "Standard"
|
||||
},
|
||||
"messages": {
|
||||
"pleaseWait": "Bitte warten...",
|
||||
@@ -251,7 +254,8 @@
|
||||
},
|
||||
"notificationMessages": {
|
||||
"assign": "{entityType} {entity} wurde Ihnen zugewiesen",
|
||||
"emailReceived": "E-Mail empfangen von {from}"
|
||||
"emailReceived": "E-Mail empfangen von {from}",
|
||||
"entityRemoved": "{user} hat {entityType} {entity} entfernt"
|
||||
},
|
||||
"streamMessages": {
|
||||
"create": "{user} hat {entityType} {entity} erstellt",
|
||||
@@ -391,7 +395,8 @@
|
||||
"currentQuarter": "Aktuelles Quartal",
|
||||
"lastQuarter": "Letztes Quartal",
|
||||
"currentYear": "Aktuelles Jahr",
|
||||
"lastYear": "Letztes Jahr"
|
||||
"lastYear": "Letztes Jahr",
|
||||
"lastSevenDays": "Letzten 7 Tage"
|
||||
},
|
||||
"searchRanges": {
|
||||
"is": "Ist",
|
||||
@@ -480,7 +485,7 @@
|
||||
"style":{
|
||||
"style": "Stil",
|
||||
"normal": "Normal",
|
||||
"blockquote": "Zitat",
|
||||
"blockquote": "Angebot",
|
||||
"pre": "Quellcode",
|
||||
"h1": "Überschrift 1",
|
||||
"h2": "Überschrift 2",
|
||||
@@ -530,5 +535,11 @@
|
||||
"redo": "Wiederholen"
|
||||
}
|
||||
}
|
||||
},
|
||||
"themes": {
|
||||
"Espo": "Espo",
|
||||
"Sakura": "Sakura",
|
||||
"EspoVertical": "Espo (Vertikal)",
|
||||
"SakuraVertical": "Sakura (Vertical)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"fields": {
|
||||
"name": "Name",
|
||||
"emailAddress": "E-Mail Adresse",
|
||||
"team": "Team",
|
||||
"status": "Status",
|
||||
"assignToUser": "Mit Benutzer verknüpfen",
|
||||
|
||||
20
application/Espo/Resources/i18n/de_DE/Job.json
Normal file
20
application/Espo/Resources/i18n/de_DE/Job.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"fields": {
|
||||
"status": "Status",
|
||||
"executeTime": "Ausführen um",
|
||||
"attempts": "Verbleibende Versuche",
|
||||
"failedAttempts": "Fehlgeschlagene Versuche",
|
||||
"serviceName": "Service",
|
||||
"method": "Methode",
|
||||
"scheduledJob": "Geplante Aufgabe",
|
||||
"data": "Daten"
|
||||
},
|
||||
"options": {
|
||||
"status": {
|
||||
"Pending": "Schwebend",
|
||||
"Success": "Erfolg",
|
||||
"Running": "Läuft",
|
||||
"Failed": "Fehlgeschlagen"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@
|
||||
"autoFollowEntityTypeList": "Autom. Beobachten",
|
||||
"signature": "E-Mail Signatur",
|
||||
"dashboardTabList": "Reiter Liste",
|
||||
"defaultReminders": "Standarderinnerungen"
|
||||
"defaultReminders": "Standarderinnerungen",
|
||||
"theme": "Design"
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
|
||||
@@ -45,13 +45,16 @@
|
||||
"ldapUserLoginFilter": "Login Filter benutzen",
|
||||
"ldapAccountDomainNameShort": "Domain Name Konto kurz",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Export deaktivieren (nur Admin ist berechtigt)",
|
||||
"exportDisabled": "Export deaktivieren (nur Admin ist berechtigt)",
|
||||
"assignmentNotificationsEntityList": "Entitäten über die bei Zuweisung benachrichtigt werden soll",
|
||||
"assignmentEmailNotifications": "E-Mail Nachrichten bei Zuweisungen senden",
|
||||
"assignmentEmailNotificationsEntityList": "Entitäten über die mit E-Mail bei Zuweisung benachrichtigt werden soll",
|
||||
"b2cMode": "B2C Modus",
|
||||
"disableAvatars": "Avatare deaktivieren",
|
||||
"followCreatedEntities": "Erstellten Einträgen beobachten"
|
||||
"avatarsDisabled": "Avatare deaktivieren",
|
||||
"followCreatedEntities": "Erstellten Einträgen beobachten",
|
||||
"displayListViewRecordCount": "Gesamtanzahl anzeigen (in Listenansicht)",
|
||||
"theme": "Design",
|
||||
"userThemesDisabled": "Benutzerdesigns deaktivieren"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
@@ -62,7 +65,7 @@
|
||||
"tooltips": {
|
||||
"recordsPerPageSmall": "Anzahl Sätze in Beziehungssubpanels",
|
||||
"outboundEmailIsShared": "Benutzern gestatten, E-Mails über dieses SMTP Konto zu senden",
|
||||
"followCreatedEntities": "Wenn ein Benutzer einen Datensatz erstellt hat dann folgt er ihm automatisch"
|
||||
"followCreatedEntities": "Benutzer folgen automatisch jenen Sätzen die sie erstellt haben"
|
||||
},
|
||||
"labels": {
|
||||
"System": "System",
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"Teams": "Teams",
|
||||
"Roles": "Roles",
|
||||
"Outbound Emails": "Outbound Emails",
|
||||
"Inbound Emails": "Inbound Emails",
|
||||
"Inbound Emails": "Group Email Accounts",
|
||||
"Email Templates": "Email Templates",
|
||||
"Import": "Import",
|
||||
"Layout Manager": "Layout Manager",
|
||||
@@ -45,7 +45,9 @@
|
||||
"Edit Entity": "Edit Entity",
|
||||
"Create Link": "Create Link",
|
||||
"Edit Link": "Edit Link",
|
||||
"Notifications": "Notifications"
|
||||
"Notifications": "Notifications",
|
||||
"Jobs": "Jobs",
|
||||
"Reset to Default": "Reset to Default"
|
||||
},
|
||||
"layouts": {
|
||||
"list": "List",
|
||||
@@ -85,7 +87,8 @@
|
||||
"varchar": "Varchar",
|
||||
"file": "File",
|
||||
"image": "Image",
|
||||
"multiEnum": "Multi-Enum"
|
||||
"multiEnum": "Multi-Enum",
|
||||
"attachmentMultiple": "Attachment Multiple"
|
||||
},
|
||||
"fields": {
|
||||
"type": "Type",
|
||||
@@ -106,12 +109,14 @@
|
||||
"noEmptyString": "No Empty String",
|
||||
"defaultType": "Default Type",
|
||||
"seeMoreDisabled": "Disable Text Cut",
|
||||
"entityList": "Entity List"
|
||||
"entityList": "Entity List",
|
||||
"isSorted": "Is Sorted (alphabetically)",
|
||||
"audited": "Audited"
|
||||
},
|
||||
"messages": {
|
||||
"upgradeVersion": "Your EspoCRM will be upgraded to version <strong>{version}</strong>. This can take some time.",
|
||||
"upgradeDone": "Your EspoCRM has been upgraded to version <strong>{version}</strong>.",
|
||||
"upgradeBackup": "We recommend you to make backup of your EspoCRM files and data before upgrade.",
|
||||
"upgradeBackup": "We recommend to make a backup of your EspoCRM files and data before upgrade.",
|
||||
"thousandSeparatorEqualsDecimalMark": "Thousand separator can not be same as decimal mark",
|
||||
"userHasNoEmailAddress": "User has not email address.",
|
||||
"selectEntityType": "Select entity type in the left menu.",
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
"Forward": "Forward",
|
||||
"Original message": "Original message",
|
||||
"Forwarded message": "Forwarded message",
|
||||
"Email Accounts": "Email Accounts",
|
||||
"Email Accounts": "Personal Email Accounts",
|
||||
"Inbound Emails": "Group Email Accounts",
|
||||
"Email Templates": "Email Templates",
|
||||
"Send Test Email": "Send Test Email",
|
||||
"Send": "Send",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user