Enabled Search, Improved Navbar, Fixed Application Authorisation and some other minor fixes
This commit is contained in:
@@ -79,5 +79,26 @@ class Model_Service_Plugin_Domain extends Model_Service_Plugin {
|
||||
public function manage_dns_button() {
|
||||
return $this->service_plugin_host->manage_button('service_plugin_host');
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for services matching a term
|
||||
*/
|
||||
public function list_autocomplete($term,$index,$value,array $label,array $limit=array(),array $options=NULL) {
|
||||
// We only show domain names.
|
||||
if (is_numeric($term))
|
||||
return array();
|
||||
|
||||
$ao = Auth::instance()->get_user();
|
||||
|
||||
$options['key'] = 'id';
|
||||
$options['object'] = DB::select($this->_table_name.'.id',$this->_table_name.'.domain_name')
|
||||
->from($this->_table_name)
|
||||
->join('service')
|
||||
->on('service.id','=',$this->_table_name.'.service_id')
|
||||
->where('service.account_id','IN',$ao->RTM->customers($ao->RTM))
|
||||
->and_where($this->_table_name.'.domain_name','like','%'.$term.'%');
|
||||
|
||||
return parent::list_autocomplete($term,$index,$value,$label,$limit,$options);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user