本文整理汇总了PHP中Notepad::getSearchOptionsToAdd方法的典型用法代码示例。如果您正苦于以下问题:PHP Notepad::getSearchOptionsToAdd方法的具体用法?PHP Notepad::getSearchOptionsToAdd怎么用?PHP Notepad::getSearchOptionsToAdd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notepad
的用法示例。
在下文中一共展示了Notepad::getSearchOptionsToAdd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_printertypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_printermodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_printer`";
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[42]['table'] = $this->getTable();
$tab[42]['field'] = 'have_serial';
$tab[42]['name'] = __('Serial');
$tab[42]['datatype'] = 'bool';
$tab[43]['table'] = $this->getTable();
$tab[43]['field'] = 'have_parallel';
$tab[43]['name'] = __('Parallel');
$tab[43]['datatype'] = 'bool';
$tab[44]['table'] = $this->getTable();
$tab[44]['field'] = 'have_usb';
$tab[44]['name'] = __('USB');
$tab[44]['datatype'] = 'bool';
$tab[45]['table'] = $this->getTable();
$tab[45]['field'] = 'have_ethernet';
$tab[45]['name'] = __('Ethernet');
$tab[45]['datatype'] = 'bool';
$tab[46]['table'] = $this->getTable();
$tab[46]['field'] = 'have_wifi';
$tab[46]['name'] = __('Wifi');
$tab[46]['datatype'] = 'bool';
$tab[13]['table'] = $this->getTable();
$tab[13]['field'] = 'memory_size';
$tab[13]['name'] = __('Memory');
$tab[13]['datatype'] = 'string';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'init_pages_counter';
$tab[11]['name'] = __('Initial page counter');
$tab[11]['datatype'] = 'number';
$tab[11]['nosearch'] = true;
// only display and histo, no index
$tab[12]['table'] = $this->getTable();
$tab[12]['field'] = 'last_pages_counter';
$tab[12]['name'] = __('Current counter of pages');
$tab[12]['datatype'] = 'number';
$tab[9]['table'] = 'glpi_printers';
$tab[9]['field'] = '_virtual';
$tab[9]['linkfield'] = '_virtual';
//.........这里部分代码省略.........
示例2: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'completename';
$tab[1]['name'] = __('Complete name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab[14]['table'] = $this->getTable();
$tab[14]['field'] = 'name';
$tab[14]['name'] = __('Name');
$tab[14]['datatype'] = 'itemlink';
$tab[14]['massiveaction'] = false;
$tab[3]['table'] = $this->getTable();
$tab[3]['field'] = 'address';
$tab[3]['name'] = __('Address');
$tab[3]['massiveaction'] = false;
$tab[3]['datatype'] = 'text';
$tab[4]['table'] = $this->getTable();
$tab[4]['field'] = 'website';
$tab[4]['name'] = __('Website');
$tab[4]['massiveaction'] = false;
$tab[4]['datatype'] = 'string';
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'phonenumber';
$tab[5]['name'] = __('Phone');
$tab[5]['massiveaction'] = false;
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'email';
$tab[6]['name'] = _n('Email', 'Emails', 1);
$tab[6]['datatype'] = 'email';
$tab[6]['massiveaction'] = false;
$tab[10]['table'] = $this->getTable();
$tab[10]['field'] = 'fax';
$tab[10]['name'] = __('Fax');
$tab[10]['massiveaction'] = false;
$tab[10]['datatype'] = 'string';
$tab[25]['table'] = $this->getTable();
$tab[25]['field'] = 'postcode';
$tab[25]['name'] = __('Postal code');
$tab[25]['datatype'] = 'string';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'town';
$tab[11]['name'] = __('City');
$tab[11]['massiveaction'] = false;
$tab[11]['datatype'] = 'string';
$tab[12]['table'] = $this->getTable();
$tab[12]['field'] = 'state';
$tab[12]['name'] = _x('location', 'State');
$tab[12]['massiveaction'] = false;
$tab[12]['datatype'] = 'string';
$tab[13]['table'] = $this->getTable();
$tab[13]['field'] = 'country';
$tab[13]['name'] = __('Country');
$tab[13]['massiveaction'] = false;
$tab[13]['datatype'] = 'string';
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[122]['table'] = $this->getTable();
$tab[122]['field'] = 'date_mod';
$tab[122]['name'] = __('Last update');
$tab[122]['datatype'] = 'datetime';
$tab[122]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
// add objectlock search options
$tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
$tab += Notepad::getSearchOptionsToAdd();
$tab['advanced'] = __('Advanced information');
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'ldap_dn';
$tab[7]['name'] = __('LDAP directory information attribute representing the entity');
$tab[7]['massiveaction'] = false;
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'tag';
$tab[8]['name'] = __('Information in inventory tool (TAG) representing the entity');
$tab[8]['massiveaction'] = false;
$tab[8]['datatype'] = 'string';
$tab[9]['table'] = 'glpi_authldaps';
$tab[9]['field'] = 'name';
$tab[9]['name'] = __('LDAP directory of an entity');
$tab[9]['massiveaction'] = false;
$tab[9]['datatype'] = 'dropdown';
$tab[17]['table'] = $this->getTable();
$tab[17]['field'] = 'entity_ldapfilter';
$tab[17]['name'] = __('Search filter (if needed)');
$tab[17]['massiveaction'] = false;
//.........这里部分代码省略.........
示例3: getSearchOptions
//.........这里部分代码省略.........
$tab[12]['name'] = __('Expiration');
$tab[12]['datatype'] = 'date_delay';
$tab[12]['datafields'][1] = 'begin_date';
$tab[12]['datafields'][2] = 'duration';
$tab[12]['searchunit'] = 'DAY';
$tab[12]['delayunit'] = 'MONTH';
$tab[12]['maybefuture'] = true;
$tab[12]['massiveaction'] = false;
$tab[13]['table'] = $this->getTable();
$tab[13]['field'] = 'expire_notice';
$tab[13]['name'] = __('Expiration date + notice');
$tab[13]['datatype'] = 'date_delay';
$tab[13]['datafields'][1] = 'begin_date';
$tab[13]['datafields'][2] = 'duration';
$tab[13]['datafields'][3] = 'notice';
$tab[13]['searchunit'] = 'DAY';
$tab[13]['delayunit'] = 'MONTH';
$tab[13]['maybefuture'] = true;
$tab[13]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[59]['table'] = $this->getTable();
$tab[59]['field'] = 'alert';
$tab[59]['name'] = __('Email alarms');
$tab[59]['datatype'] = 'specific';
$tab[59]['searchtype'] = array('equals', 'notequals');
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
$tab[72]['table'] = 'glpi_contracts_items';
$tab[72]['field'] = 'id';
$tab[72]['name'] = _x('quantity', 'Number of items');
$tab[72]['forcegroupby'] = true;
$tab[72]['usehaving'] = true;
$tab[72]['datatype'] = 'count';
$tab[72]['massiveaction'] = false;
$tab[72]['joinparams'] = array('jointype' => 'child');
$tab[29]['table'] = 'glpi_suppliers';
$tab[29]['field'] = 'name';
$tab[29]['name'] = _n('Associated supplier', 'Associated suppliers', Session::getPluralNumber());
$tab[29]['forcegroupby'] = true;
$tab[29]['datatype'] = 'itemlink';
$tab[29]['massiveaction'] = false;
$tab[29]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contracts_suppliers', 'joinparams' => array('jointype' => 'child')));
$tab += Notepad::getSearchOptionsToAdd();
$tab['cost'] = __('Cost');
$tab[11]['table'] = 'glpi_contractcosts';
$tab[11]['field'] = 'totalcost';
$tab[11]['name'] = __('Total cost');
$tab[11]['datatype'] = 'decimal';
$tab[11]['forcegroupby'] = true;
$tab[11]['usehaving'] = true;
$tab[11]['massiveaction'] = false;
$tab[11]['joinparams'] = array('jointype' => 'child');
$tab[11]['computation'] = "(SUM(TABLE.`cost`) / COUNT(TABLE.`id`))\n * COUNT(DISTINCT TABLE.`id`)";
$tab[41]['table'] = 'glpi_contractcosts';
$tab[41]['field'] = 'cost';
$tab[41]['name'] = _n('Cost', 'Costs', Session::getPluralNumber());
$tab[41]['datatype'] = 'decimal';
$tab[41]['forcegroupby'] = true;
$tab[41]['massiveaction'] = false;
$tab[41]['joinparams'] = array('jointype' => 'child');
$tab[42]['table'] = 'glpi_contractcosts';
$tab[42]['field'] = 'begin_date';
$tab[42]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Begin date'));
$tab[42]['datatype'] = 'date';
$tab[42]['forcegroupby'] = true;
$tab[42]['massiveaction'] = false;
$tab[42]['joinparams'] = array('jointype' => 'child');
$tab[43]['table'] = 'glpi_contractcosts';
$tab[43]['field'] = 'end_date';
$tab[43]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('End date'));
$tab[43]['datatype'] = 'date';
$tab[43]['forcegroupby'] = true;
$tab[43]['massiveaction'] = false;
$tab[43]['joinparams'] = array('jointype' => 'child');
$tab[44]['table'] = 'glpi_contractcosts';
$tab[44]['field'] = 'name';
$tab[44]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Name'));
$tab[44]['forcegroupby'] = true;
$tab[44]['massiveaction'] = false;
$tab[44]['joinparams'] = array('jointype' => 'child');
$tab[44]['datatype'] = 'dropdown';
$tab[45]['table'] = 'glpi_budgets';
$tab[45]['field'] = 'name';
$tab[45]['name'] = sprintf(__('%1$s - %2$s'), __('Cost'), __('Budget'));
$tab[45]['datatype'] = 'dropdown';
$tab[45]['forcegroupby'] = true;
$tab[45]['massiveaction'] = false;
$tab[45]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contractcosts', 'joinparams' => array('jointype' => 'child')));
return $tab;
}
示例4: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Surname');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'firstname';
$tab[11]['name'] = __('First name');
$tab[11]['datatype'] = 'string';
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab[3]['table'] = $this->getTable();
$tab[3]['field'] = 'phone';
$tab[3]['name'] = __('Phone');
$tab[3]['datatype'] = 'string';
$tab[4]['table'] = $this->getTable();
$tab[4]['field'] = 'phone2';
$tab[4]['name'] = __('Phone 2');
$tab[4]['datatype'] = 'string';
$tab[10]['table'] = $this->getTable();
$tab[10]['field'] = 'mobile';
$tab[10]['name'] = __('Mobile phone');
$tab[10]['datatype'] = 'string';
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'fax';
$tab[5]['name'] = __('Fax');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'email';
$tab[6]['name'] = _n('Email', 'Emails', 1);
$tab[6]['datatype'] = 'email';
$tab[82]['table'] = $this->getTable();
$tab[82]['field'] = 'address';
$tab[82]['name'] = __('Address');
$tab[83]['datatype'] = 'text';
$tab[84]['table'] = $this->getTable();
$tab[84]['field'] = 'town';
$tab[84]['name'] = __('City');
$tab[84]['datatype'] = 'string';
$tab[83]['table'] = $this->getTable();
$tab[83]['field'] = 'postcode';
$tab[83]['name'] = __('Postal code');
$tab[83]['datatype'] = 'string';
$tab[85]['table'] = $this->getTable();
$tab[85]['field'] = 'state';
$tab[85]['name'] = _x('location', 'State');
$tab[85]['datatype'] = 'string';
$tab[87]['table'] = $this->getTable();
$tab[87]['field'] = 'country';
$tab[87]['name'] = __('Country');
$tab[87]['datatype'] = 'string';
$tab[9]['table'] = 'glpi_contacttypes';
$tab[9]['field'] = 'name';
$tab[9]['name'] = __('Type');
$tab[9]['datatype'] = 'dropdown';
$tab[81]['table'] = 'glpi_usertitles';
$tab[81]['field'] = 'name';
$tab[81]['name'] = _x('person', 'Title');
$tab[81]['datatype'] = 'dropdown';
$tab[8]['table'] = 'glpi_suppliers';
$tab[8]['field'] = 'name';
$tab[8]['name'] = _n('Associated supplier', 'Associated suppliers', Session::getPluralNumber());
$tab[8]['forcegroupby'] = true;
$tab[8]['datatype'] = 'itemlink';
$tab[8]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contacts_suppliers', 'joinparams' => array('jointype' => 'child')));
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
// add objectlock search options
$tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
$tab += Notepad::getSearchOptionsToAdd();
return $tab;
}
示例5: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_phonetypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_phonemodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_phone`";
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[9]['table'] = $this->getTable();
$tab[9]['field'] = 'number_line';
$tab[9]['name'] = _x('quantity', 'Number of lines');
$tab[9]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'brand';
$tab[11]['name'] = __('Brand');
$tab[11]['datatype'] = 'string';
$tab[23]['table'] = 'glpi_manufacturers';
$tab[23]['field'] = 'name';
$tab[23]['name'] = __('Manufacturer');
$tab[23]['datatype'] = 'dropdown';
$tab[32]['table'] = $this->getTable();
$tab[32]['field'] = 'firmware';
$tab[32]['name'] = __('Firmware');
$tab[32]['datatype'] = 'string';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id_tech';
$tab[24]['name'] = __('Technician in charge of the hardware');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'own_ticket';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id_tech';
$tab[49]['name'] = __('Group in charge of the hardware');
$tab[49]['condition'] = '`is_assign`';
$tab[49]['datatype'] = 'dropdown';
$tab[42]['table'] = 'glpi_phonepowersupplies';
$tab[42]['field'] = 'name';
$tab[42]['name'] = __('Power supply');
$tab[42]['datatype'] = 'dropdown';
$tab[43]['table'] = $this->getTable();
$tab[43]['field'] = 'have_headset';
$tab[43]['name'] = __('Headset');
$tab[43]['datatype'] = 'bool';
$tab[44]['table'] = $this->getTable();
//.........这里部分代码省略.........
示例6: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_networkequipmenttypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_networkequipmentmodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_networkequipment`";
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['datatype'] = 'dropdown';
$tab[71]['condition'] = '`is_itemgroup`';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[11]['table'] = 'glpi_networkequipmentfirmwares';
$tab[11]['field'] = 'name';
$tab[11]['name'] = _n('Firmware', 'Firmwares', 1);
$tab[11]['datatype'] = 'dropdown';
$tab[14]['table'] = $this->getTable();
$tab[14]['field'] = 'ram';
$tab[14]['name'] = sprintf(__('%1$s (%2$s)'), __('Memory'), __('Mio'));
$tab[14]['datatype'] = 'number';
$tab[32]['table'] = 'glpi_networks';
$tab[32]['field'] = 'name';
$tab[32]['name'] = __('Network');
$tab[32]['datatype'] = 'dropdown';
$tab[33]['table'] = 'glpi_domains';
$tab[33]['field'] = 'name';
$tab[33]['name'] = __('Domain');
$tab[33]['datatype'] = 'dropdown';
$tab[23]['table'] = 'glpi_manufacturers';
$tab[23]['field'] = 'name';
$tab[23]['name'] = __('Manufacturer');
$tab[23]['datatype'] = 'dropdown';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id_tech';
$tab[24]['name'] = __('Technician in charge of the hardware');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'own_ticket';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id_tech';
$tab[49]['name'] = __('Group in charge of the hardware');
$tab[49]['condition'] = '`is_assign`';
$tab[49]['datatype'] = 'dropdown';
//.........这里部分代码省略.........
示例7: getSearchOptions
//.........这里部分代码省略.........
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab[3]['table'] = $this->getTable();
$tab[3]['field'] = 'address';
$tab[3]['name'] = __('Address');
$tab[3]['datatype'] = 'text';
$tab[10]['table'] = $this->getTable();
$tab[10]['field'] = 'fax';
$tab[10]['name'] = __('Fax');
$tab[10]['datatype'] = 'string';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'town';
$tab[11]['name'] = __('City');
$tab[11]['datatype'] = 'string';
$tab[14]['table'] = $this->getTable();
$tab[14]['field'] = 'postcode';
$tab[14]['name'] = __('Postal code');
$tab[14]['datatype'] = 'string';
$tab[12]['table'] = $this->getTable();
$tab[12]['field'] = 'state';
$tab[12]['name'] = _x('location', 'State');
$tab[12]['datatype'] = 'string';
$tab[13]['table'] = $this->getTable();
$tab[13]['field'] = 'country';
$tab[13]['name'] = __('Country');
$tab[13]['datatype'] = 'string';
$tab[4]['table'] = $this->getTable();
$tab[4]['field'] = 'website';
$tab[4]['name'] = __('Website');
$tab[4]['datatype'] = 'weblink';
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'phonenumber';
$tab[5]['name'] = __('Phone');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'email';
$tab[6]['name'] = _n('Email', 'Emails', 1);
$tab[6]['datatype'] = 'email';
$tab[9]['table'] = 'glpi_suppliertypes';
$tab[9]['field'] = 'name';
$tab[9]['name'] = __('Third party type');
$tab[9]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
if ($_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE) {
$name1 = 'firstname';
$name2 = 'name';
} else {
$name1 = 'name';
$name2 = 'firstname';
}
$tab[8]['table'] = 'glpi_contacts';
$tab[8]['field'] = 'completename';
$tab[8]['name'] = _n('Associated contact', 'Associated contacts', Session::getPluralNumber());
$tab[8]['forcegroupby'] = true;
$tab[8]['datatype'] = 'itemlink';
$tab[8]['massiveaction'] = false;
$tab[8]['computation'] = "CONCAT(TABLE.`{$name1}`, ' ', TABLE.`{$name2}`)";
$tab[8]['computationgroupby'] = true;
$tab[8]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contacts_suppliers', 'joinparams' => array('jointype' => 'child')));
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
$tab[29]['table'] = 'glpi_contracts';
$tab[29]['field'] = 'name';
$tab[29]['name'] = _n('Associated contract', 'Associated contracts', Session::getPluralNumber());
$tab[29]['forcegroupby'] = true;
$tab[29]['datatype'] = 'itemlink';
$tab[29]['massiveaction'] = false;
$tab[29]['joinparams'] = array('beforejoin' => array('table' => 'glpi_contracts_suppliers', 'joinparams' => array('jointype' => 'child')));
// add objectlock search options
$tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
$tab += Notepad::getSearchOptionsToAdd();
return $tab;
}
示例8: getSearchOptions
function getSearchOptions()
{
global $CFG_GLPI;
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
// implicit key==1
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
// implicit field is id
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_computertypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_computermodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_computer`";
$tab[45]['table'] = 'glpi_operatingsystems';
$tab[45]['field'] = 'name';
$tab[45]['name'] = __('Operating system');
$tab[45]['datatype'] = 'dropdown';
$tab[46]['table'] = 'glpi_operatingsystemversions';
$tab[46]['field'] = 'name';
$tab[46]['name'] = __('Version of the operating system');
$tab[46]['datatype'] = 'dropdown';
$tab[41]['table'] = 'glpi_operatingsystemservicepacks';
$tab[41]['field'] = 'name';
$tab[41]['name'] = __('Service pack');
$tab[41]['datatype'] = 'dropdown';
$tab[42]['table'] = 'glpi_autoupdatesystems';
$tab[42]['field'] = 'name';
$tab[42]['name'] = __('Update Source');
$tab[42]['datatype'] = 'dropdown';
$tab[43]['table'] = $this->getTable();
$tab[43]['field'] = 'os_license_number';
$tab[43]['name'] = __('Serial of the operating system');
$tab[43]['datatype'] = 'string';
$tab[44]['table'] = $this->getTable();
$tab[44]['field'] = 'os_licenseid';
$tab[44]['name'] = __('Product ID of the operating system');
$tab[44]['datatype'] = 'string';
$tab[47]['table'] = $this->getTable();
$tab[47]['field'] = 'uuid';
$tab[47]['name'] = __('UUID');
$tab[47]['datatype'] = 'string';
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[32]['table'] = 'glpi_networks';
$tab[32]['field'] = 'name';
$tab[32]['name'] = __('Network');
$tab[32]['datatype'] = 'dropdown';
$tab[33]['table'] = 'glpi_domains';
$tab[33]['field'] = 'name';
//.........这里部分代码省略.........
示例9: getSearchOptions
function getSearchOptions()
{
// Only use for History (not by search Engine)
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[62]['table'] = 'glpi_softwarecategories';
$tab[62]['field'] = 'completename';
$tab[62]['name'] = __('Category');
$tab[62]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
$tab[23]['table'] = 'glpi_manufacturers';
$tab[23]['field'] = 'name';
$tab[23]['name'] = __('Publisher');
$tab[23]['datatype'] = 'dropdown';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id_tech';
$tab[24]['name'] = __('Technician in charge of the hardware');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'own_ticket';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id_tech';
$tab[49]['name'] = __('Group in charge of the hardware');
$tab[49]['condition'] = '`is_assign`';
$tab[49]['datatype'] = 'dropdown';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[61]['table'] = $this->getTable();
$tab[61]['field'] = 'is_helpdesk_visible';
$tab[61]['name'] = __('Associable to a ticket');
$tab[61]['datatype'] = 'bool';
$tab[63]['table'] = $this->getTable();
$tab[63]['field'] = 'is_valid';
//TRANS: Indicator to know is all licenses of the software are valids
$tab[63]['name'] = __('Valid licenses');
$tab[63]['datatype'] = 'bool';
$tab += SoftwareLicense::getSearchOptionsToAdd();
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[72]['table'] = 'glpi_computers_softwareversions';
$tab[72]['field'] = 'id';
$tab[72]['name'] = _x('quantity', 'Number of installations');
$tab[72]['forcegroupby'] = true;
$tab[72]['usehaving'] = true;
$tab[72]['datatype'] = 'count';
$tab[72]['nometa'] = true;
$tab[72]['massiveaction'] = false;
if (Session::getLoginUserID()) {
$tab[72]['joinparams'] = array('jointype' => 'child', 'condition' => "AND NEWTABLE.`is_deleted_computer` = '0'\n AND NEWTABLE.`is_deleted` = '0'\n AND NEWTABLE.`is_template_computer` = '0'\n " . getEntitiesRestrictRequest('AND', 'NEWTABLE'), 'beforejoin' => array('table' => 'glpi_softwareversions', 'joinparams' => array('jointype' => 'child')));
}
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
$tab[86]['massiveaction'] = false;
$tab['versions'] = _n('Version', 'Versions', Session::getPluralNumber());
$tab[5]['table'] = 'glpi_softwareversions';
$tab[5]['field'] = 'name';
$tab[5]['name'] = __('Version name');
$tab[5]['forcegroupby'] = true;
$tab[5]['massiveaction'] = false;
$tab[5]['joinparams'] = array('jointype' => 'child');
$tab[5]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
//.........这里部分代码省略.........
示例10: getSearchOptions
//.........这里部分代码省略.........
$tab[21]['datatype'] = 'text';
$tab[3]['table'] = $this->getTable();
$tab[3]['field'] = 'priority';
$tab[3]['name'] = __('Priority');
$tab[3]['searchtype'] = 'equals';
$tab[3]['datatype'] = 'specific';
$tab[14]['table'] = 'glpi_projecttypes';
$tab[14]['field'] = 'name';
$tab[14]['name'] = __('Type');
$tab[14]['datatype'] = 'dropdown';
$tab[12]['table'] = 'glpi_projectstates';
$tab[12]['field'] = 'name';
$tab[12]['name'] = _x('item', 'State');
$tab[12]['datatype'] = 'dropdown';
$tab[15]['table'] = $this->getTable();
$tab[15]['field'] = 'date';
$tab[15]['name'] = __('Creation date');
$tab[15]['datatype'] = 'datetime';
$tab[15]['massiveaction'] = false;
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'percent_done';
$tab[5]['name'] = __('Percent done');
$tab[5]['datatype'] = 'number';
$tab[5]['unit'] = '%';
$tab[5]['min'] = 0;
$tab[5]['max'] = 100;
$tab[5]['step'] = 5;
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'show_on_global_gantt';
$tab[6]['name'] = __('Show on global GANTT');
$tab[6]['datatype'] = 'bool';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id';
$tab[24]['name'] = __('Manager');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'see_project';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id';
$tab[49]['name'] = __('Manager group');
$tab[49]['condition'] = '`is_manager`';
$tab[49]['datatype'] = 'dropdown';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'plan_start_date';
$tab[7]['name'] = __('Planned start date');
$tab[7]['datatype'] = 'datetime';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'plan_end_date';
$tab[8]['name'] = __('Planned end date');
$tab[8]['datatype'] = 'datetime';
$tab[17]['table'] = $this->getTable();
$tab[17]['field'] = '_virtual_planned_duration';
$tab[17]['name'] = __('Planned duration');
$tab[17]['datatype'] = 'specific';
$tab[17]['nosearch'] = true;
$tab[17]['massiveaction'] = false;
$tab[17]['nosort'] = true;
$tab[9]['table'] = $this->getTable();
$tab[9]['field'] = 'real_start_date';
$tab[9]['name'] = __('Real start date');
$tab[9]['datatype'] = 'datetime';
$tab[10]['table'] = $this->getTable();
$tab[10]['field'] = 'real_end_date';
$tab[10]['name'] = __('Real end date');
$tab[10]['datatype'] = 'datetime';
$tab[18]['table'] = $this->getTable();
$tab[18]['field'] = '_virtual_effective_duration';
$tab[18]['name'] = __('Effective duration');
$tab[18]['datatype'] = 'specific';
$tab[18]['nosearch'] = true;
$tab[18]['massiveaction'] = false;
$tab[18]['nosort'] = true;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['datatype'] = 'dropdown';
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
// add objectlock search options
$tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
$tab += Notepad::getSearchOptionsToAdd();
return $tab;
}
示例11: getSearchOptions
function getSearchOptions()
{
// Only use for History (not by search Engine)
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[62]['table'] = 'glpi_softwarecategories';
$tab[62]['field'] = 'completename';
$tab[62]['name'] = __('Category');
$tab[62]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[23]['table'] = 'glpi_manufacturers';
$tab[23]['field'] = 'name';
$tab[23]['name'] = __('Publisher');
$tab[23]['datatype'] = 'dropdown';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id_tech';
$tab[24]['name'] = __('Technician in charge of the hardware');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'own_ticket';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id_tech';
$tab[49]['name'] = __('Group in charge of the hardware');
$tab[49]['condition'] = '`is_assign`';
$tab[49]['datatype'] = 'dropdown';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[61]['table'] = $this->getTable();
$tab[61]['field'] = 'is_helpdesk_visible';
$tab[61]['name'] = __('Associable to a ticket');
$tab[61]['datatype'] = 'bool';
$tab[63]['table'] = $this->getTable();
$tab[63]['field'] = 'is_valid';
//TRANS: Indicator to know is all licenses of the software are valids
$tab[63]['name'] = __('Valid licenses');
$tab[63]['datatype'] = 'bool';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[72]['table'] = 'glpi_computers_softwareversions';
$tab[72]['field'] = 'id';
$tab[72]['name'] = _x('quantity', 'Number of installations');
$tab[72]['forcegroupby'] = true;
$tab[72]['usehaving'] = true;
$tab[72]['datatype'] = 'count';
$tab[72]['nometa'] = true;
$tab[72]['massiveaction'] = false;
if (Session::getLoginUserID()) {
$tab[72]['joinparams'] = array('jointype' => 'child', 'condition' => "AND NEWTABLE.`is_deleted_computer` = '0'\n AND NEWTABLE.`is_deleted` = '0'\n AND NEWTABLE.`is_template_computer` = '0'\n " . getEntitiesRestrictRequest('AND', 'NEWTABLE'), 'beforejoin' => array('table' => 'glpi_softwareversions', 'joinparams' => array('jointype' => 'child')));
}
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
$tab[86]['massiveaction'] = false;
$tab['versions'] = _n('Version', 'Versions', Session::getPluralNumber());
$tab[5]['table'] = 'glpi_softwareversions';
$tab[5]['field'] = 'name';
$tab[5]['name'] = __('Version name');
$tab[5]['forcegroupby'] = true;
$tab[5]['massiveaction'] = false;
$tab[5]['joinparams'] = array('jointype' => 'child');
$tab[5]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['forcegroupby'] = true;
$tab[31]['massiveaction'] = false;
$tab[31]['joinparams'] = array('beforejoin' => array('table' => 'glpi_softwareversions', 'joinparams' => array('jointype' => 'child')));
//.........这里部分代码省略.........
示例12: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab += $this->getSearchOptionsMain();
$tab[63]['table'] = 'glpi_items_problems';
$tab[63]['field'] = 'id';
$tab[63]['name'] = _x('quantity', 'Number of items');
$tab[63]['forcegroupby'] = true;
$tab[63]['usehaving'] = true;
$tab[63]['datatype'] = 'count';
$tab[63]['massiveaction'] = false;
$tab[63]['joinparams'] = array('jointype' => 'child');
$tab[13]['table'] = 'glpi_items_problems';
$tab[13]['field'] = 'items_id';
$tab[13]['name'] = _n('Associated element', 'Associated elements', Session::getPluralNumber());
$tab[13]['datatype'] = 'specific';
$tab[13]['comments'] = true;
$tab[13]['nosort'] = true;
$tab[13]['nosearch'] = true;
$tab[13]['additionalfields'] = array('itemtype');
$tab[13]['joinparams'] = array('jointype' => 'child');
$tab[13]['forcegroupby'] = true;
$tab[13]['massiveaction'] = false;
$tab[131]['table'] = 'glpi_items_problems';
$tab[131]['field'] = 'itemtype';
$tab[131]['name'] = _n('Associated item type', 'Associated item types', Session::getPluralNumber());
$tab[131]['datatype'] = 'itemtypename';
$tab[131]['itemtype_list'] = 'ticket_types';
$tab[131]['nosort'] = true;
$tab[131]['additionalfields'] = array('itemtype');
$tab[131]['joinparams'] = array('jointype' => 'child');
$tab[131]['forcegroupby'] = true;
$tab[131]['massiveaction'] = false;
$tab += $this->getSearchOptionsActors();
$tab['analysis'] = __('Analysis');
$tab[60]['table'] = $this->getTable();
$tab[60]['field'] = 'impactcontent';
$tab[60]['name'] = __('Impacts');
$tab[60]['massiveaction'] = false;
$tab[60]['datatype'] = 'text';
$tab[61]['table'] = $this->getTable();
$tab[61]['field'] = 'causecontent';
$tab[61]['name'] = __('Causes');
$tab[61]['massiveaction'] = false;
$tab[61]['datatype'] = 'text';
$tab[62]['table'] = $this->getTable();
$tab[62]['field'] = 'symptomcontent';
$tab[62]['name'] = __('Symptoms');
$tab[62]['massiveaction'] = false;
$tab[62]['datatype'] = 'text';
$tab += Notepad::getSearchOptionsToAdd();
$tab += ProblemTask::getSearchOptionsToAdd();
$tab += $this->getSearchOptionsSolution();
$tab += $this->getSearchOptionsStats();
$tab += ProblemCost::getSearchOptionsToAdd();
$tab['ticket'] = Ticket::getTypeName(Session::getPluralNumber());
$tab[141]['table'] = 'glpi_problems_tickets';
$tab[141]['field'] = 'id';
$tab[141]['name'] = _x('quantity', 'Number of tickets');
$tab[141]['forcegroupby'] = true;
$tab[141]['usehaving'] = true;
$tab[141]['datatype'] = 'count';
$tab[141]['massiveaction'] = false;
$tab[141]['joinparams'] = array('jointype' => 'child');
return $tab;
}
示例13: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_peripheraltypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_peripheralmodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_peripheral`";
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[121]['table'] = $this->getTable();
$tab[121]['field'] = 'date_creation';
$tab[121]['name'] = __('Creation date');
$tab[121]['datatype'] = 'datetime';
$tab[121]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'brand';
$tab[11]['name'] = __('Brand');
$tab[11]['datatype'] = 'string';
$tab[23]['table'] = 'glpi_manufacturers';
$tab[23]['field'] = 'name';
$tab[23]['name'] = __('Manufacturer');
$tab[23]['datatype'] = 'dropdown';
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id_tech';
$tab[24]['name'] = __('Technician in charge of the hardware');
$tab[24]['datatype'] = 'dropdown';
$tab[24]['right'] = 'own_ticket';
$tab[49]['table'] = 'glpi_groups';
$tab[49]['field'] = 'completename';
$tab[49]['linkfield'] = 'groups_id_tech';
$tab[49]['name'] = __('Group in charge of the hardware');
$tab[49]['condition'] = '`is_assign`';
$tab[49]['datatype'] = 'dropdown';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['massiveaction'] = false;
$tab[80]['datatype'] = 'dropdown';
$tab[82]['table'] = $this->getTable();
$tab[82]['field'] = 'is_global';
$tab[82]['name'] = __('Global management');
$tab[82]['datatype'] = 'bool';
$tab[82]['massiveaction'] = false;
// add objectlock search options
$tab += ObjectLock::getSearchOptionsToAdd(get_class($this));
//.........这里部分代码省略.........
示例14: getSearchOptions
function getSearchOptions()
{
$tab = array();
$tab['common'] = __('Characteristics');
$tab[1]['table'] = $this->getTable();
$tab[1]['field'] = 'name';
$tab[1]['name'] = __('Name');
$tab[1]['datatype'] = 'itemlink';
$tab[1]['massiveaction'] = false;
$tab[2]['table'] = $this->getTable();
$tab[2]['field'] = 'id';
$tab[2]['name'] = __('ID');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'number';
$tab += Location::getSearchOptionsToAdd();
$tab[4]['table'] = 'glpi_monitortypes';
$tab[4]['field'] = 'name';
$tab[4]['name'] = __('Type');
$tab[4]['datatype'] = 'dropdown';
$tab[40]['table'] = 'glpi_monitormodels';
$tab[40]['field'] = 'name';
$tab[40]['name'] = __('Model');
$tab[40]['datatype'] = 'dropdown';
$tab[31]['table'] = 'glpi_states';
$tab[31]['field'] = 'completename';
$tab[31]['name'] = __('Status');
$tab[31]['datatype'] = 'dropdown';
$tab[31]['condition'] = "`is_visible_monitor`";
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'serial';
$tab[5]['name'] = __('Serial number');
$tab[5]['datatype'] = 'string';
$tab[6]['table'] = $this->getTable();
$tab[6]['field'] = 'otherserial';
$tab[6]['name'] = __('Inventory number');
$tab[6]['datatype'] = 'string';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'contact';
$tab[7]['name'] = __('Alternate username');
$tab[7]['datatype'] = 'string';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'contact_num';
$tab[8]['name'] = __('Alternate username number');
$tab[8]['datatype'] = 'string';
$tab[70]['table'] = 'glpi_users';
$tab[70]['field'] = 'name';
$tab[70]['name'] = __('User');
$tab[70]['datatype'] = 'dropdown';
$tab[70]['right'] = 'all';
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['name'] = __('Group');
$tab[71]['condition'] = '`is_itemgroup`';
$tab[71]['datatype'] = 'dropdown';
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'size';
$tab[11]['name'] = __('Size');
$tab[11]['datatype'] = 'number';
$tab[41]['table'] = $this->getTable();
$tab[41]['field'] = 'have_micro';
$tab[41]['name'] = __('Microphone');
$tab[41]['datatype'] = 'bool';
$tab[42]['table'] = $this->getTable();
$tab[42]['field'] = 'have_speaker';
$tab[42]['name'] = __('Speakers');
$tab[42]['datatype'] = 'bool';
$tab[43]['table'] = $this->getTable();
$tab[43]['field'] = 'have_subd';
$tab[43]['name'] = __('Sub-D');
$tab[43]['datatype'] = 'bool';
$tab[44]['table'] = $this->getTable();
$tab[44]['field'] = 'have_bnc';
$tab[44]['name'] = 'BNC';
$tab[44]['datatype'] = 'bool';
$tab[45]['table'] = $this->getTable();
$tab[45]['field'] = 'have_dvi';
$tab[45]['name'] = __('DVI');
$tab[45]['datatype'] = 'bool';
$tab[46]['table'] = $this->getTable();
$tab[46]['field'] = 'have_pivot';
$tab[46]['name'] = __('Pivot');
$tab[46]['datatype'] = 'bool';
$tab[47]['table'] = $this->getTable();
$tab[47]['field'] = 'have_hdmi';
$tab[47]['name'] = __('HDMI');
$tab[47]['datatype'] = 'bool';
$tab[48]['table'] = $this->getTable();
$tab[48]['field'] = 'have_displayport';
$tab[48]['name'] = __('DisplayPort');
$tab[48]['datatype'] = 'bool';
$tab[23]['table'] = 'glpi_manufacturers';
//.........这里部分代码省略.........
示例15: getSearchOptions
//.........这里部分代码省略.........
$tab[2]['field'] = 'name';
$tab[2]['name'] = __('Project');
$tab[2]['massiveaction'] = false;
$tab[2]['datatype'] = 'dropdown';
$tab[13]['table'] = $this->getTable();
$tab[13]['field'] = 'name';
$tab[13]['name'] = __('Father');
$tab[13]['datatype'] = 'dropdown';
$tab[13]['massiveaction'] = false;
// Add virtual condition to relink table
$tab[13]['joinparams'] = array('condition' => "AND 1=1");
$tab[21]['table'] = $this->getTable();
$tab[21]['field'] = 'content';
$tab[21]['name'] = __('Description');
$tab[21]['massiveaction'] = false;
$tab[21]['datatype'] = 'text';
$tab[12]['table'] = 'glpi_projectstates';
$tab[12]['field'] = 'name';
$tab[12]['name'] = _x('item', 'State');
$tab[12]['datatype'] = 'dropdown';
$tab[14]['table'] = 'glpi_projecttasktypes';
$tab[14]['field'] = 'name';
$tab[14]['name'] = __('Type');
$tab[14]['datatype'] = 'dropdown';
$tab[15]['table'] = $this->getTable();
$tab[15]['field'] = 'date';
$tab[15]['name'] = __('Opening date');
$tab[15]['datatype'] = 'datetime';
$tab[15]['massiveaction'] = false;
$tab[19]['table'] = $this->getTable();
$tab[19]['field'] = 'date_mod';
$tab[19]['name'] = __('Last update');
$tab[19]['datatype'] = 'datetime';
$tab[19]['massiveaction'] = false;
$tab[5]['table'] = $this->getTable();
$tab[5]['field'] = 'percent_done';
$tab[5]['name'] = __('Percent done');
$tab[5]['datatype'] = 'number';
$tab[5]['unit'] = '%';
$tab[5]['min'] = 0;
$tab[5]['max'] = 100;
$tab[5]['step'] = 5;
$tab[24]['table'] = 'glpi_users';
$tab[24]['field'] = 'name';
$tab[24]['linkfield'] = 'users_id';
$tab[24]['name'] = __('Creator');
$tab[24]['datatype'] = 'dropdown';
$tab[7]['table'] = $this->getTable();
$tab[7]['field'] = 'plan_start_date';
$tab[7]['name'] = __('Planned start date');
$tab[7]['datatype'] = 'datetime';
$tab[8]['table'] = $this->getTable();
$tab[8]['field'] = 'plan_end_date';
$tab[8]['name'] = __('Planned end date');
$tab[8]['datatype'] = 'datetime';
$tab[9]['table'] = $this->getTable();
$tab[9]['field'] = 'real_start_date';
$tab[9]['name'] = __('Real start date');
$tab[9]['datatype'] = 'datetime';
$tab[10]['table'] = $this->getTable();
$tab[10]['field'] = 'real_end_date';
$tab[10]['name'] = __('Real end date');
$tab[10]['datatype'] = 'datetime';
$tab[11]['table'] = $this->getTable();
$tab[11]['field'] = 'planned_duration';
$tab[11]['name'] = __('Planned duration');
$tab[11]['datatype'] = 'timestamp';
$tab[11]['min'] = 0;
$tab[11]['max'] = 100 * HOUR_TIMESTAMP;
$tab[11]['step'] = HOUR_TIMESTAMP;
$tab[11]['addfirstminutes'] = true;
$tab[11]['inhours'] = true;
$tab[17]['table'] = $this->getTable();
$tab[17]['field'] = 'effective_duration';
$tab[17]['name'] = __('Effective duration');
$tab[17]['datatype'] = 'timestamp';
$tab[17]['min'] = 0;
$tab[17]['max'] = 100 * HOUR_TIMESTAMP;
$tab[17]['step'] = HOUR_TIMESTAMP;
$tab[17]['addfirstminutes'] = true;
$tab[17]['inhours'] = true;
$tab[16]['table'] = $this->getTable();
$tab[16]['field'] = 'comment';
$tab[16]['name'] = __('Comments');
$tab[16]['datatype'] = 'text';
$tab[18]['table'] = $this->getTable();
$tab[18]['field'] = 'is_milestone';
$tab[18]['name'] = __('Milestone');
$tab[18]['datatype'] = 'bool';
$tab[80]['table'] = 'glpi_entities';
$tab[80]['field'] = 'completename';
$tab[80]['name'] = __('Entity');
$tab[80]['datatype'] = 'dropdown';
$tab[86]['table'] = $this->getTable();
$tab[86]['field'] = 'is_recursive';
$tab[86]['name'] = __('Child entities');
$tab[86]['datatype'] = 'bool';
$tab += Notepad::getSearchOptionsToAdd();
return $tab;
}