Add groupware settings section
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
221f558f66
commit
f3949cf1a8
|
@ -57,13 +57,13 @@ class CalDAVSettings implements ISettings {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getSection() {
|
public function getSection() {
|
||||||
return 'server';
|
return 'groupware';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getPriority() {
|
public function getPriority() {
|
||||||
return 20;
|
return 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,10 +49,10 @@ class CalDAVSettingsTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetSection() {
|
public function testGetSection() {
|
||||||
$this->assertEquals('server', $this->settings->getSection());
|
$this->assertEquals('groupware', $this->settings->getSection());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetPriority() {
|
public function testGetPriority() {
|
||||||
$this->assertEquals(20, $this->settings->getPriority());
|
$this->assertEquals(10, $this->settings->getPriority());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,6 +231,7 @@ class Manager implements IManager {
|
||||||
5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))],
|
5 => [new Section('sharing', $this->l->t('Sharing'), 0, $this->url->imagePath('core', 'actions/share.svg'))],
|
||||||
10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
10 => [new Section('security', $this->l->t('Security'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
||||||
45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
45 => [new Section('encryption', $this->l->t('Encryption'), 0, $this->url->imagePath('core', 'actions/password.svg'))],
|
||||||
|
50 => [new Section('groupware', $this->l->t('Groupware'), 0, $this->url->imagePath('core', 'places/contacts-dark.svg'))],
|
||||||
98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))],
|
98 => [new Section('additional', $this->l->t('Additional settings'), 0, $this->url->imagePath('core', 'actions/settings-dark.svg'))],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -115,13 +115,14 @@ class ManagerTest extends TestCase {
|
||||||
|
|
||||||
$this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class);
|
$this->manager->registerSection('admin', \OCA\WorkflowEngine\Settings\Section::class);
|
||||||
|
|
||||||
$this->url->expects($this->exactly(6))
|
$this->url->expects($this->exactly(7))
|
||||||
->method('imagePath')
|
->method('imagePath')
|
||||||
->willReturnMap([
|
->willReturnMap([
|
||||||
['settings', 'admin.svg', '0'],
|
['settings', 'admin.svg', '0'],
|
||||||
['core', 'actions/settings-dark.svg', '1'],
|
['core', 'actions/settings-dark.svg', '1'],
|
||||||
['core', 'actions/share.svg', '2'],
|
['core', 'actions/share.svg', '2'],
|
||||||
['core', 'actions/password.svg', '3'],
|
['core', 'actions/password.svg', '3'],
|
||||||
|
['core', 'places/contacts-dark.svg', '5'],
|
||||||
['settings', 'help.svg', '4'],
|
['settings', 'help.svg', '4'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -131,6 +132,7 @@ class ManagerTest extends TestCase {
|
||||||
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
||||||
10 => [new Section('security', 'Security', 0, '3')],
|
10 => [new Section('security', 'Security', 0, '3')],
|
||||||
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
||||||
|
50 => [new Section('groupware', 'Groupware', 0, '5')],
|
||||||
55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
|
55 => [\OC::$server->query(\OCA\WorkflowEngine\Settings\Section::class)],
|
||||||
98 => [new Section('additional', 'Additional settings', 0, '1')],
|
98 => [new Section('additional', 'Additional settings', 0, '1')],
|
||||||
], $this->manager->getAdminSections());
|
], $this->manager->getAdminSections());
|
||||||
|
@ -166,13 +168,14 @@ class ManagerTest extends TestCase {
|
||||||
->method('t')
|
->method('t')
|
||||||
->will($this->returnArgument(0));
|
->will($this->returnArgument(0));
|
||||||
|
|
||||||
$this->url->expects($this->exactly(6))
|
$this->url->expects($this->exactly(7))
|
||||||
->method('imagePath')
|
->method('imagePath')
|
||||||
->willReturnMap([
|
->willReturnMap([
|
||||||
['settings', 'admin.svg', '0'],
|
['settings', 'admin.svg', '0'],
|
||||||
['core', 'actions/settings-dark.svg', '1'],
|
['core', 'actions/settings-dark.svg', '1'],
|
||||||
['core', 'actions/share.svg', '2'],
|
['core', 'actions/share.svg', '2'],
|
||||||
['core', 'actions/password.svg', '3'],
|
['core', 'actions/password.svg', '3'],
|
||||||
|
['core', 'places/contacts-dark.svg', '5'],
|
||||||
['settings', 'help.svg', '4'],
|
['settings', 'help.svg', '4'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -182,6 +185,7 @@ class ManagerTest extends TestCase {
|
||||||
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
5 => [new Section('sharing', 'Sharing', 0, '2')],
|
||||||
10 => [new Section('security', 'Security', 0, '3')],
|
10 => [new Section('security', 'Security', 0, '3')],
|
||||||
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
45 => [new Section('encryption', 'Encryption', 0, '3')],
|
||||||
|
50 => [new Section('groupware', 'Groupware', 0, '5')],
|
||||||
98 => [new Section('additional', 'Additional settings', 0, '1')],
|
98 => [new Section('additional', 'Additional settings', 0, '1')],
|
||||||
], $this->manager->getAdminSections());
|
], $this->manager->getAdminSections());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue