mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
records per page select
This commit is contained in:
@@ -40,6 +40,7 @@ return [
|
||||
'useCache' => true,
|
||||
'recordsPerPage' => 20,
|
||||
'recordsPerPageSmall' => 5,
|
||||
'recordsPerPageSelect' => 10,
|
||||
'applicationName' => 'EspoCRM',
|
||||
'version' => '@@version',
|
||||
'timeZone' => 'UTC',
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"emailAddressLookupEntityTypeList": "Email address look-up scopes",
|
||||
"recordsPerPage": "Records Per Page",
|
||||
"recordsPerPageSmall": "Records Per Page (Small)",
|
||||
"recordsPerPageSelect": "Records Per Page (Select)",
|
||||
"tabList": "Tab List",
|
||||
"quickCreateList": "Quick Create List",
|
||||
"exportDelimiter": "Export Delimiter",
|
||||
@@ -185,6 +186,7 @@
|
||||
"massEmailVerp": "Variable envelope return path. For better handling of bounced messages. Make sure that your SMTP provider supports it.",
|
||||
"recordsPerPage": "Number of records initially displayed in list views.",
|
||||
"recordsPerPageSmall": "Number of records initially displayed in relationship panels.",
|
||||
"recordsPerPageSelect": "Number of records initially displayed when selecting records.",
|
||||
"outboundEmailIsShared": "Allow users to send emails from this address.",
|
||||
"followCreatedEntities": "Users will automatically follow records they created.",
|
||||
"emailMessageMaxSize": "All inbound emails exceeding a specified size will be fetched w/o body and attachments.",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[{"name": "applicationName"}, {"name": "userThemesDisabled"}],
|
||||
[{"name": "recordsPerPage"},{"name": "displayListViewRecordCount"}],
|
||||
[{"name": "recordsPerPageSmall"}, {"name": "avatarsDisabled"}],
|
||||
[{"name": "recordsPerPageSelect"}, false],
|
||||
[{"name": "tabList"},{"name": "quickCreateList"}],
|
||||
[{"name": "scopeColorsDisabled"}, {"name": "tabColorsDisabled"}],
|
||||
[{"name": "tabIconsDisabled"}, false],
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
"tooltip": true
|
||||
},
|
||||
"recordsPerPageSmall": {
|
||||
"type": "int",
|
||||
"min": 1,
|
||||
"max": 100,
|
||||
"default": 5,
|
||||
"required": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"recordsPerPageSelect": {
|
||||
"type": "int",
|
||||
"min": 1,
|
||||
"max": 100,
|
||||
|
||||
@@ -90,7 +90,7 @@ define('views/modals/select-category-tree-records', 'views/modals/select-records
|
||||
|
||||
Espo.require('search-manager', (SearchManager) => {
|
||||
this.getCollectionFactory().create(this.scope, (collection) => {
|
||||
collection.maxSize = this.getConfig().get('recordsPerPageSmall') || 5;
|
||||
collection.maxSize = this.getConfig().get('recordsPerPageSelect') || 5;
|
||||
|
||||
this.collection = collection;
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ define('views/modals/select-records', ['views/modal', 'search-manager'], functio
|
||||
}
|
||||
|
||||
this.getCollectionFactory().create(this.scope, (collection) => {
|
||||
collection.maxSize = this.getConfig().get('recordsPerPageSmall') || 5;
|
||||
collection.maxSize = this.getConfig().get('recordsPerPageSelect') || 5;
|
||||
|
||||
this.collection = collection;
|
||||
|
||||
|
||||
52
upgrades/7.1/scripts/AfterUpgrade.php
Normal file
52
upgrades/7.1/scripts/AfterUpgrade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2021 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
|
||||
* Website: https://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/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
use Espo\Core\Container;
|
||||
use Espo\Core\Utils\Config;
|
||||
use Espo\Core\Utils\Config\ConfigWriter;
|
||||
|
||||
class AfterUpgrade
|
||||
{
|
||||
public function run(Container $container): void
|
||||
{
|
||||
try {
|
||||
$this->updateConfig(
|
||||
$container->get('config'),
|
||||
$container->get('injectableFactory')->create(ConfigWriter::class)
|
||||
);
|
||||
}
|
||||
catch (\Throwable $e) {}
|
||||
}
|
||||
|
||||
private function updateConfig(Config $config, ConfigWriter $configWriter): void
|
||||
{
|
||||
$configWriter->set('recordsPerPageSelect', 10);
|
||||
$configWriter->save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user