Open sujithtomy opened 10 years ago
Writing this way if I
echo $this->Paginator->sort(
'name',
array(
'asc' => __('Name') . ' <i class="icon-chevron-up text-info pull-right"></i>',
'desc' => __('Name') . ' <i class="icon-chevron-down text-info pull-right"></i>'
),
array(
'escape' => false
)
);
Wow!! great, I wasn't aware its can be done in params.
On Thu, Nov 14, 2013 at 3:13 PM, Yasuo Harada notifications@github.comwrote:
Writing this way if I
echo $this->Paginator->sort( 'name', array( 'asc' => ('Name') . ' ', 'desc' => ('Name') . ' ' ), array( 'escape' => false ));
— Reply to this email directly or view it on GitHubhttps://github.com/slywalker/cakephp-plugin-boost_cake/issues/39#issuecomment-28463852 .
Is there a way to do this with multiple pagination headings (such as in a table, using column headings), whereby only the Paginator->sort that is active has an icon?
Also, for anyone using standard bootstrap 3 glyphicons:
<i class="glyphicon glyphicon-chevron-down text-info pull-right">
Maybe like this:
$sKey = 'vsnr'; $sName = 'Vers. Nr.';
if(isset($this->request->params['paging']['Order']['options']['sort']) && $this->request->params['paging']['Order']['options']['sort'] == $sKey){
echo $this->Paginator->sort(
$sKey,
array(
'asc' => $sName . ' <i class="fa fa-chevron-up text-info"></i>',
'desc' => $sName . ' <i class="fa fa-chevron-down text-info"></i>'
),
array(
'escape' => false,
)
);
}else{
echo $this->Paginator->sort('vsnr', 'Vers. Nr.');
}
unset($sKey); unset($sName);
Order = Modelname
Sorry for the bad format and english... Greetz
Added sort function to show sort icons in pagination header links Please review my code, if use full and according to standards please add this to BoostCake :)