mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:27:01 +00:00
change note defs
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
data/logs/*
|
||||
data/cache/*
|
||||
data/upload/*
|
||||
application/config.php
|
||||
/test.php
|
||||
/test2.php
|
||||
@@ -8,4 +9,4 @@ application/Espo/Modules/Crm/Resources/metadata/scopes/CustomTest.json
|
||||
application/Espo/Resources/layouts/CustomTest/*
|
||||
application/Espo/Modules/Crm/Resources/layouts/CustomTest/*
|
||||
application/Espo/Resources/metadata/customTest/*
|
||||
application/Espo/Modules/Crm/Resources/metadata/customTest/*
|
||||
application/Espo/Modules/Crm/Resources/metadata/customTest/*
|
||||
|
||||
13
application/Espo/Resources/layouts/Note/detail.json
Normal file
13
application/Espo/Resources/layouts/Note/detail.json
Normal file
@@ -0,0 +1,13 @@
|
||||
[
|
||||
{
|
||||
"label":"",
|
||||
"rows": [
|
||||
[
|
||||
{"name":"message"}
|
||||
],
|
||||
[
|
||||
{"name":"attachments","type": "attachmentMultiple"}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -6,7 +6,7 @@
|
||||
{"name":"message"}
|
||||
],
|
||||
[
|
||||
{"name":"attachments"}
|
||||
{"name":"attachments","type": "attachmentMultiple"}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
6
application/Espo/Resources/metadata/viewDefs/Note.json
Normal file
6
application/Espo/Resources/metadata/viewDefs/Note.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"recordViews":{
|
||||
"edit":"Note.Record.Edit",
|
||||
"editQuick":"Note.Record.Edit"
|
||||
}
|
||||
}
|
||||
@@ -51,11 +51,17 @@ class Stream extends \Espo\Core\Services\Base
|
||||
|
||||
$collection = $this->getEntityManager()->getRepository('Note')->find($selectParams);
|
||||
|
||||
foreach ($collection as $e) {
|
||||
if ($e->get('type') == 'Post') {
|
||||
$e->loadLinkMultipleField('attachments');
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($collection as $e) {
|
||||
if ($e->get('type') == 'Post' && $e->get('parentId') && $e->get('parentType')) {
|
||||
$entity = $this->getEntityManager()->getEntity($e->get('parentType'), $e->get('parentId'));
|
||||
$e->set('parentName', $entity->get('name'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$count = $this->getEntityManager()->getRepository('Note')->count($selectParams);
|
||||
@@ -94,6 +100,12 @@ class Stream extends \Espo\Core\Services\Base
|
||||
'order' => 'DESC'
|
||||
));
|
||||
|
||||
foreach ($collection as $e) {
|
||||
if ($e->get('type') == 'Post') {
|
||||
$e->loadLinkMultipleField('attachments');
|
||||
}
|
||||
}
|
||||
|
||||
$count = $this->getEntityManager()->getRepository('Note')->count(array(
|
||||
'whereClause' => $where,
|
||||
));
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
class cacheExampe
|
||||
{
|
||||
private $espoMetadata;
|
||||
|
||||
public function getOrmMetadata()
|
||||
{
|
||||
if (!empty($this->espoMetadata)) {
|
||||
return $this->espoMetadata;
|
||||
}
|
||||
|
||||
$espoMetadataFile = Util::concatPath($this->getConfig()->get('cachePath'), 'ormMetadata.php');
|
||||
|
||||
if (!file_exists($espoMetadataFile) || !$this->getConfig()->get('useCache')) {
|
||||
$this->getConverter()->process();
|
||||
}
|
||||
|
||||
$this->espoMetadata = $this->getFileManager()->getContent($espoMetadataFile);
|
||||
|
||||
return $this->espoMetadata;
|
||||
}
|
||||
|
||||
public function setOrmMetadata(array $espoMetadata)
|
||||
{
|
||||
$result = $this->getFileManager()->setContentPHP($espoMetadata, $this->getConfig()->get('cachePath'), 'ormMetadata.php');
|
||||
if ($result == false) {
|
||||
$GLOBALS['log']->add('EXCEPTION', 'Metadata::setOrmMetadata() - Cannot save ormMetadata to a file');
|
||||
throw new \Espo\Core\Exceptions\Error();
|
||||
}
|
||||
|
||||
$this->espoMetadata = $espoMetadata;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Link
|
||||
Icon[en_US]=gnome-panel-launcher
|
||||
URL=/var/www
|
||||
Name[en_US]=www
|
||||
Name=www
|
||||
Icon=gnome-panel-launcher
|
||||
@@ -1,19 +0,0 @@
|
||||
git remote add upstream git@github.com:sugarcrm/Mango.git
|
||||
git checkout -t -b caramel upstream/caramel
|
||||
git checkout -b caramel
|
||||
|
||||
git fetch upstream
|
||||
git checkout caramel
|
||||
git merge upstream/caramel
|
||||
|
||||
git add --all
|
||||
git commit -m 'comment'
|
||||
git push origin caramel
|
||||
|
||||
|
||||
git push -f origin HEAD^:master // remove last push from remote
|
||||
git reset --soft HEAD^
|
||||
|
||||
git stash
|
||||
git stash apply
|
||||
git stash drop
|
||||
Binary file not shown.
Reference in New Issue
Block a user