change note defs

This commit is contained in:
Yuri Kuznetsov
2014-01-17 15:49:55 +02:00
parent de4cb4ede3
commit af4d71d4d2
24 changed files with 35 additions and 264 deletions

3
.gitignore vendored
View File

@@ -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/*

View File

@@ -0,0 +1,13 @@
[
{
"label":"",
"rows": [
[
{"name":"message"}
],
[
{"name":"attachments","type": "attachmentMultiple"}
]
]
}
]

View File

@@ -6,7 +6,7 @@
{"name":"message"}
],
[
{"name":"attachments"}
{"name":"attachments","type": "attachmentMultiple"}
]
]
}

View File

@@ -0,0 +1,6 @@
{
"recordViews":{
"edit":"Note.Record.Edit",
"editQuick":"Note.Record.Edit"
}
}

View File

@@ -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,
));

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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.