save default search options (#2445)
* set default times for daterange objects * allow to show order and order by fields * move search to modal * more options for page size * save export visibility in cookie
This commit is contained in:
@@ -59,7 +59,7 @@ class ActivityControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/activity/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
'visibility' => 1,
|
||||
@@ -102,7 +102,7 @@ class ActivityControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/activity/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/admin/activity/export'));
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
|
||||
@@ -60,7 +60,7 @@ class CustomerControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/customer/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
'visibility' => 1,
|
||||
@@ -92,7 +92,7 @@ class CustomerControllerTest extends ControllerBaseTest
|
||||
$this->request($client, '/admin/customer/');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/admin/customer/export'));
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
|
||||
@@ -66,7 +66,7 @@ class ProjectControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/project/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
'visibility' => 1,
|
||||
@@ -108,7 +108,7 @@ class ProjectControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/project/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/admin/project/export'));
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'feature:timetracking foo',
|
||||
|
||||
@@ -55,7 +55,7 @@ class TagControllerTest extends ControllerBaseTest
|
||||
$this->request($client, '/admin/tags/');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'Support',
|
||||
]);
|
||||
|
||||
@@ -41,7 +41,7 @@ class TeamControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/teams/');
|
||||
$this->assertPageActions($client, [
|
||||
'search search-toggle visible-xs-inline' => '#',
|
||||
'search' => '#',
|
||||
'create' => $this->createUrl('/admin/teams/create'),
|
||||
'help' => 'https://www.kimai.org/documentation/teams.html'
|
||||
]);
|
||||
@@ -62,7 +62,7 @@ class TeamControllerTest extends ControllerBaseTest
|
||||
|
||||
$this->assertAccessIsGranted($client, '/admin/teams/');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'foo',
|
||||
]);
|
||||
|
||||
@@ -39,7 +39,7 @@ class TimesheetControllerTest extends ControllerBaseTest
|
||||
// there are no records by default in the test database
|
||||
$this->assertHasNoEntriesWithFilter($client);
|
||||
$this->assertPageActions($client, [
|
||||
'search search-toggle visible-xs-inline' => '#',
|
||||
'search' => '#',
|
||||
'toolbar-action exporter-csv' => $this->createUrl('/timesheet/export/csv'),
|
||||
'toolbar-action exporter-print' => $this->createUrl('/timesheet/export/print'),
|
||||
'toolbar-action exporter-pdf' => $this->createUrl('/timesheet/export/pdf'),
|
||||
@@ -67,7 +67,7 @@ class TimesheetControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = ($start)->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime('last day of this month'))->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'state' => 1,
|
||||
'pageSize' => 25,
|
||||
@@ -113,7 +113,7 @@ class TimesheetControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = ($start)->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime('last day of this month'))->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'location:homeoffice foobar',
|
||||
]);
|
||||
@@ -138,7 +138,7 @@ class TimesheetControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = (new \DateTime('-10 days'))->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime())->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/timesheet/export/print'));
|
||||
$client->submit($form, [
|
||||
'state' => 1,
|
||||
|
||||
@@ -41,7 +41,7 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
|
||||
$this->assertHasNoEntriesWithFilter($client);
|
||||
|
||||
$this->assertPageActions($client, [
|
||||
'search search-toggle visible-xs-inline' => '#',
|
||||
'search' => '#',
|
||||
'toolbar-action exporter-csv' => $this->createUrl('/team/timesheet/export/csv'),
|
||||
'toolbar-action exporter-print' => $this->createUrl('/team/timesheet/export/print'),
|
||||
'toolbar-action exporter-pdf' => $this->createUrl('/team/timesheet/export/pdf'),
|
||||
@@ -73,7 +73,7 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = ($start)->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime('last day of this month'))->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'state' => 1,
|
||||
'users' => [$user->getId()],
|
||||
@@ -119,7 +119,7 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = ($start)->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime('last day of this month'))->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'location:homeoffice foobar',
|
||||
]);
|
||||
@@ -150,7 +150,7 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
|
||||
|
||||
$dateRange = (new \DateTime('-10 days'))->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime())->format('Y-m-d');
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/team/timesheet/export/print'));
|
||||
$client->submit($form, [
|
||||
'state' => 1,
|
||||
|
||||
@@ -35,7 +35,7 @@ class UserControllerTest extends ControllerBaseTest
|
||||
$this->assertHasDataTable($client);
|
||||
$this->assertDataTableRowCount($client, 'datatable_user_admin', 7);
|
||||
$this->assertPageActions($client, [
|
||||
'search search-toggle visible-xs-inline' => '#',
|
||||
'search' => '#',
|
||||
'visibility' => '#',
|
||||
'download toolbar-action' => $this->createUrl('/admin/user/export'),
|
||||
'create' => $this->createUrl('/admin/user/create'),
|
||||
@@ -50,7 +50,7 @@ class UserControllerTest extends ControllerBaseTest
|
||||
$this->request($client, '/admin/user/');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'hourly_rate:35 tony',
|
||||
'role' => 'ROLE_TEAMLEAD',
|
||||
@@ -83,7 +83,7 @@ class UserControllerTest extends ControllerBaseTest
|
||||
$this->request($client, '/admin/user/');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$form = $client->getCrawler()->filter('form.header-search')->form();
|
||||
$form = $client->getCrawler()->filter('form.searchform')->form();
|
||||
$form->getFormNode()->setAttribute('action', $this->createUrl('/admin/user/export'));
|
||||
$client->submit($form, [
|
||||
'searchTerm' => 'hourly_rate:35 tony',
|
||||
|
||||
Reference in New Issue
Block a user