Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(search): update search options fields for Flyvemdm ItemTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
DIOHz0r committed Jan 25, 2018
1 parent 7f52837 commit 93e94c7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 55 deletions.
14 changes: 14 additions & 0 deletions inc/agent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,20 @@ public function post_purgeItem() {
public function getSearchOptionsNew() {
$tab = parent::getSearchOptionsNew();

$tab[0] = [
'id' => 'common',
'name' => __('Agent', 'flyvemdm'),
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
'field' => 'id',
'name' => __('ID'),
'massiveaction' => false,
'datatype' => 'number'
];

$tab[] = [
'id' => '3',
'table' => 'glpi_plugin_flyvemdm_fleets',
Expand Down
13 changes: 2 additions & 11 deletions inc/file.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,13 @@ protected function createEntityDirectory($dir) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = [];
$tab = parent::getSearchOptionsNew();

$tab[] = [
$tab[0] = [
'id' => 'common',
'name' => __s('File', 'flyvemdm'),
];

$tab[] = [
'id' => '1',
'table' => $this->getTable(),
'field' => 'name',
'name' => __('Name'),
'datatype' => 'itemlink',
'massiveaction' => false,
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
Expand Down
13 changes: 2 additions & 11 deletions inc/fleet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,22 +228,13 @@ public function pre_deleteItem() {
* @return array
*/
public function getSearchOptionsNew() {
$tab = [];
$tab = parent::getSearchOptionsNew();

$tab[] = [
$tab[0] = [
'id' => 'common',
'name' => __s('Fleet', 'flyvemdm')
];

$tab[] = [
'id' => '1',
'table' => $this->getTable(),
'field' => 'name',
'name' => __('Name'),
'datatype' => 'itemlink',
'massiveaction' => false
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
Expand Down
13 changes: 2 additions & 11 deletions inc/package.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,22 +363,13 @@ protected function createEntityDirectory($dir) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = [];
$tab = parent::getSearchOptionsNew();

$tab[] = [
$tab[0] = [
'id' => 'common',
'name' => __s('Package', 'flyvemdm'),
];

$tab[] = [
'id' => '1',
'table' => $this->getTable(),
'field' => 'name',
'name' => __('Name'),
'datatype' => 'itemlink',
'massiveaction' => false,
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
Expand Down
13 changes: 2 additions & 11 deletions inc/policy.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,13 @@ static function getTypeName($nb = 0) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = [];
$tab = parent::getSearchOptionsNew();

$tab[] = [
$tab[0] = [
'id' => 'common',
'name' => __('Policy', 'flyvemdm'),
];

$tab[] = [
'id' => '1',
'table' => $this->getTable(),
'field' => 'name',
'name' => __('Name'),
'datatype' => 'itemlink',
'massiveaction' => false,
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
Expand Down
13 changes: 2 additions & 11 deletions inc/wellknownpath.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,13 @@ public function prepareInputForUpdate($input) {
* @return array
*/
public function getSearchOptionsNew() {
$tab = [];
$tab = parent::getSearchOptionsNew();

$tab[] = [
$tab[0] = [
'id' => 'common',
'name' => __('Well known path', 'flyvemdm'),
];

$tab[] = [
'id' => '1',
'table' => $this->getTable(),
'field' => 'name',
'name' => __('Name'),
'datatype' => 'itemlink',
'massiveaction' => false,
];

$tab[] = [
'id' => '2',
'table' => $this->getTable(),
Expand Down

0 comments on commit 93e94c7

Please sign in to comment.