mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Part one of two - implement filter by first char of last name, fullname, or company (for now)
This commit is contained in:
parent
d6bc8af79a
commit
314fa566c6
@ -74,8 +74,9 @@
|
||||
$this->use_session = True;
|
||||
}
|
||||
|
||||
$start = get_var('start', array('POST','GET'));
|
||||
$start = intval(get_var('start', array('POST','GET')));
|
||||
$query = get_var('query', array('POST','GET'));
|
||||
$cquery = get_var('cquery', array('GET'));
|
||||
$sort = get_var('sort', array('POST','GET'));
|
||||
$order = get_var('order', array('POST','GET'));
|
||||
$filter = get_var('filter', array('POST','GET'));
|
||||
@ -83,6 +84,7 @@
|
||||
|
||||
$this->start = (!empty($start) || ($start == '0')) ? $start : $this->start;
|
||||
$this->query = (empty($query) && !empty($this->query)) || !empty($query) ? $query : $this->query;
|
||||
$this->cquery = (empty($cquery) && !empty($this->cquery)) || !empty($cquery) ? $cquery : $this->cquery;
|
||||
$this->sort = (!empty($sort)) ? $sort : $this->sort;
|
||||
$this->order = (!empty($order)) ? $order : $this->order;
|
||||
$this->filter = (!empty($filter) || ($filter == '0')) ? $filter : $this->filter;
|
||||
@ -104,7 +106,8 @@
|
||||
'sort' => $this->sort,
|
||||
'order' => $this->order,
|
||||
'filter' => $this->filter,
|
||||
'cat_id' => $this->cat_id
|
||||
'cat_id' => $this->cat_id,
|
||||
'cquery' => $this->cquery
|
||||
);
|
||||
echo '<br>BO:';
|
||||
_debug_array($data);
|
||||
@ -189,6 +192,7 @@
|
||||
|
||||
$this->start = $data['start'];
|
||||
$this->query = $data['query'];
|
||||
$this->cquery = $data['cquery'];
|
||||
$this->sort = $data['sort'];
|
||||
$this->order = $data['order'];
|
||||
$this->filter = $data['filter'];
|
||||
|
@ -65,7 +65,8 @@
|
||||
$data['query'],
|
||||
$data['filter'],
|
||||
$data['sort'],
|
||||
$data['order']
|
||||
$data['order'],
|
||||
$data['cquery']
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@
|
||||
{
|
||||
$this->start = $this->bo->start;
|
||||
$this->query = $this->bo->query;
|
||||
$this->cquery = $this->bo->cquery;
|
||||
$this->sort = $this->bo->sort;
|
||||
$this->order = $this->bo->order;
|
||||
$this->filter = $this->bo->filter;
|
||||
@ -87,6 +88,7 @@
|
||||
$data = array(
|
||||
'start' => $this->start,
|
||||
'query' => $this->query,
|
||||
'cquery' => $this->cquery,
|
||||
'sort' => $this->sort,
|
||||
'order' => $this->order,
|
||||
'filter' => $this->filter,
|
||||
@ -102,6 +104,7 @@
|
||||
$data = array(
|
||||
'start' => $this->start,
|
||||
'query' => $this->query,
|
||||
'cquery' => $this->cquery,
|
||||
'sort' => $this->sort,
|
||||
'order' => $this->order,
|
||||
'filter' => $this->filter,
|
||||
@ -267,6 +270,38 @@
|
||||
$this->template->set_block('addressbook_list_t','row','row');
|
||||
$this->template->set_block('addressbook_list_t','remsearch','remsearch');
|
||||
$this->template->set_block('addressbook_list_t','addressbook_footer','addressbook_footer');
|
||||
$this->template->set_block('addressbook_list_t','addressbook_alpha','addressbook_alpha');
|
||||
|
||||
$aar = explode(',',lang('alphabet'));
|
||||
$aar[] = 'all';
|
||||
while(list(,$char) = @each($aar))
|
||||
{
|
||||
if($this->cquery == $char ||
|
||||
($char == 'all' && !$this->cquery))
|
||||
{
|
||||
$this->template->set_var('charbgcolor','#000000');
|
||||
$this->template->set_var('charcolor','#FFFFFF');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->set_var('charbgcolor',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$this->template->set_var('charcolor',$GLOBALS['phpgw_info']['theme']['th_text']);
|
||||
}
|
||||
if($char == 'all')
|
||||
{
|
||||
$this->template->set_var('charlink',
|
||||
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=')
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->set_var('charlink',
|
||||
$GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.index&cquery=' . $char)
|
||||
);
|
||||
}
|
||||
$this->template->set_var('char',$char != 'all' ? strtoupper($char) : lang('all'));
|
||||
$this->template->fp('alphalinks','addressbook_alpha',True);
|
||||
}
|
||||
|
||||
$custom = $this->fields->read_custom_fields();
|
||||
$customfields = array();
|
||||
@ -431,6 +466,7 @@
|
||||
'fields' => $columns_to_display,
|
||||
'filter' => $qfilter,
|
||||
'query' => $this->query,
|
||||
'cquery' => $this->cquery,
|
||||
'sort' => $this->sort,
|
||||
'order' => $this->order
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user