mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02:00
formatting
This commit is contained in:
parent
dda262cfea
commit
e5e315711c
@ -49,8 +49,8 @@
|
|||||||
$this->template->set_block('_nextmatchs','search_filter');
|
$this->template->set_block('_nextmatchs','search_filter');
|
||||||
$this->template->set_block('_nextmatchs','cats_search_filter');
|
$this->template->set_block('_nextmatchs','cats_search_filter');
|
||||||
|
|
||||||
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
|
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) &&
|
||||||
&& intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) > 0)
|
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) > 0)
|
||||||
{
|
{
|
||||||
$this->maxmatches = intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']);
|
$this->maxmatches = intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']);
|
||||||
}
|
}
|
||||||
@ -94,7 +94,6 @@
|
|||||||
return $this->template->fp('out','link');
|
return $this->template->fp('out','link');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function page
|
@function page
|
||||||
@abstract ?
|
@abstract ?
|
||||||
@ -285,11 +284,10 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
$extravars = $this->split_extras($extravars,$extradata);
|
$extravars = $this->split_extras($extravars,$extradata);
|
||||||
|
|
||||||
$ret_str = '';
|
$ret_str = '';
|
||||||
|
|
||||||
if (($start != 0)
|
if (($start != 0) &&
|
||||||
&& ($start > $this->maxmatches))
|
($start > $this->maxmatches))
|
||||||
{
|
{
|
||||||
$extravars['start'] = 0;
|
$extravars['start'] = 0;
|
||||||
$ret_str .= $this->set_link('left','first.gif',$scriptname,lang('First page'),$extravars);
|
$ret_str .= $this->set_link('left','first.gif',$scriptname,lang('First page'),$extravars);
|
||||||
@ -343,8 +341,8 @@
|
|||||||
|
|
||||||
$ret_str = '';
|
$ret_str = '';
|
||||||
|
|
||||||
if (($total > $this->maxmatches)
|
if (($total > $this->maxmatches) &&
|
||||||
&& ($total > $start + $this->maxmatches))
|
($total > $start + $this->maxmatches))
|
||||||
{
|
{
|
||||||
$extravars['start'] = ($start + $this->maxmatches);
|
$extravars['start'] = ($start + $this->maxmatches);
|
||||||
$ret_str .= $this->set_link('right','right.gif',$scriptname,lang('Next page'),$extravars);
|
$ret_str .= $this->set_link('right','right.gif',$scriptname,lang('Next page'),$extravars);
|
||||||
@ -354,8 +352,8 @@
|
|||||||
$ret_str .= $this->set_icon('right','right-grey.gif',lang('Next page'));
|
$ret_str .= $this->set_icon('right','right-grey.gif',lang('Next page'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($start != $total - $this->maxmatches)
|
if (($start != $total - $this->maxmatches) &&
|
||||||
&& (($total - $this->maxmatches) > ($start + $this->maxmatches)))
|
(($total - $this->maxmatches) > ($start + $this->maxmatches)))
|
||||||
{
|
{
|
||||||
$extravars['start'] = ($total - $this->maxmatches);
|
$extravars['start'] = ($total - $this->maxmatches);
|
||||||
$ret_str .= $this->set_link('right','last.gif',$scriptname,lang('Last page'),$extravars);
|
$ret_str .= $this->set_link('right','last.gif',$scriptname,lang('Last page'),$extravars);
|
||||||
@ -461,7 +459,7 @@
|
|||||||
$filter_obj = array(array('none','show all'));
|
$filter_obj = array(array('none','show all'));
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
||||||
$GLOBALS['phpgw']->db->query("SELECT $idxfieldname, $strfieldname from $filtertable",__LINE__,__FILE__);
|
$GLOBALS['phpgw']->db->query("SELECT $idxfieldname, $strfieldname FROM $filtertable",__LINE__,__FILE__);
|
||||||
while($GLOBALS['phpgw']->db->next_record())
|
while($GLOBALS['phpgw']->db->next_record())
|
||||||
{
|
{
|
||||||
$index++;
|
$index++;
|
||||||
@ -540,7 +538,6 @@
|
|||||||
if (is_array($filter_obj))
|
if (is_array($filter_obj))
|
||||||
{
|
{
|
||||||
$str = '';
|
$str = '';
|
||||||
|
|
||||||
$indexlimit = count($filter_obj);
|
$indexlimit = count($filter_obj);
|
||||||
|
|
||||||
for ($index=0; $index<$indexlimit; $index++)
|
for ($index=0; $index<$indexlimit; $index++)
|
||||||
@ -609,7 +606,7 @@
|
|||||||
*/
|
*/
|
||||||
function show_sort_order($sort,$var,$order,$program,$text,$extra='',$build_a_href=True)
|
function show_sort_order($sort,$var,$order,$program,$text,$extra='',$build_a_href=True)
|
||||||
{
|
{
|
||||||
global $phpgw, $filter, $qfield, $start;
|
global $filter, $qfield, $start;
|
||||||
|
|
||||||
if (($order == $var) && ($sort == 'ASC'))
|
if (($order == $var) && ($sort == 'ASC'))
|
||||||
{
|
{
|
||||||
@ -663,7 +660,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function show_sort_order_imap
|
@function show_sort_order_imap
|
||||||
@abstract ?
|
@abstract ?
|
||||||
@ -710,7 +706,6 @@
|
|||||||
return '<a href="' .$link .'">' .$text .'</a>';
|
return '<a href="' .$link .'">' .$text .'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function nav_left_right_imap
|
@function nav_left_right_imap
|
||||||
@abstract same code as left and right (as of Dec 07, 2001) except all combined into one function
|
@abstract same code as left and right (as of Dec 07, 2001) except all combined into one function
|
||||||
@ -743,8 +738,8 @@
|
|||||||
$out_vars['cmd_suffix'] = $feed_vars['cmd_suffix'];
|
$out_vars['cmd_suffix'] = $feed_vars['cmd_suffix'];
|
||||||
|
|
||||||
// first page
|
// first page
|
||||||
if (($feed_vars['start'] != 0)
|
if (($feed_vars['start'] != 0) &&
|
||||||
&& ($feed_vars['start'] > $this->maxmatches))
|
($feed_vars['start'] > $this->maxmatches))
|
||||||
{
|
{
|
||||||
$out_vars['start'] = 0;
|
$out_vars['start'] = 0;
|
||||||
$return_array['first_page'] = $this->set_link_imap('left','first.gif',lang('First page'),$out_vars);
|
$return_array['first_page'] = $this->set_link_imap('left','first.gif',lang('First page'),$out_vars);
|
||||||
@ -776,8 +771,8 @@
|
|||||||
// things that might change
|
// things that might change
|
||||||
$out_vars['start'] = $feed_vars['start'];
|
$out_vars['start'] = $feed_vars['start'];
|
||||||
// next page
|
// next page
|
||||||
if (($feed_vars['total'] > $this->maxmatches)
|
if (($feed_vars['total'] > $this->maxmatches) &&
|
||||||
&& ($feed_vars['total'] > $feed_vars['start'] + $this->maxmatches))
|
($feed_vars['total'] > $feed_vars['start'] + $this->maxmatches))
|
||||||
{
|
{
|
||||||
$out_vars['start'] = ($feed_vars['start'] + $this->maxmatches);
|
$out_vars['start'] = ($feed_vars['start'] + $this->maxmatches);
|
||||||
$return_array['next_page'] = $this->set_link_imap('right','right.gif',lang('Next page'),$out_vars);
|
$return_array['next_page'] = $this->set_link_imap('right','right.gif',lang('Next page'),$out_vars);
|
||||||
@ -787,8 +782,8 @@
|
|||||||
$return_array['next_page'] = $this->set_icon_imap('right','right-grey.gif',lang('Next page'));
|
$return_array['next_page'] = $this->set_icon_imap('right','right-grey.gif',lang('Next page'));
|
||||||
}
|
}
|
||||||
// last page
|
// last page
|
||||||
if (($feed_vars['start'] != $feed_vars['total'] - $this->maxmatches)
|
if (($feed_vars['start'] != $feed_vars['total'] - $this->maxmatches) &&
|
||||||
&& (($feed_vars['total'] - $this->maxmatches) > ($feed_vars['start'] + $this->maxmatches)))
|
(($feed_vars['total'] - $this->maxmatches) > ($feed_vars['start'] + $this->maxmatches)))
|
||||||
{
|
{
|
||||||
$out_vars['start'] = ($feed_vars['total'] - $this->maxmatches);
|
$out_vars['start'] = ($feed_vars['total'] - $this->maxmatches);
|
||||||
$return_array['last_page'] = $this->set_link_imap('right','last.gif',lang('Last page'),$out_vars);
|
$return_array['last_page'] = $this->set_link_imap('right','last.gif',lang('Last page'),$out_vars);
|
||||||
@ -820,6 +815,5 @@
|
|||||||
$img_full = $GLOBALS['phpgw']->common->image('phpgwapi',$img);
|
$img_full = $GLOBALS['phpgw']->common->image('phpgwapi',$img);
|
||||||
return '<img src="'.$img_full.'" border="0" width="12" height="12" alt="'.$alt_text.'">'."\r\n";
|
return '<img src="'.$img_full.'" border="0" width="12" height="12" alt="'.$alt_text.'">'."\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of nextmatchs class
|
} // End of nextmatchs class
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user