What I'm trying to do is this:
But failing at it. The codes I've tried using are:
<td class="nowrap center">
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $row->state, $i, 'records.', true, 'cb'); ?>
<?php echo JHtml::_('jgrid.published', ((int) $row->state === 2 ? 1 : 2), $i, 'records.', true, true, 'cb'); ?>
<?php echo JHtml::_('jgrid.published', ((int) $row->state === -2 ? 1 : -2), $i, 'records.', true, true, 'cb'); ?>
</div>
</td>
and also an attempt at:
<td class="nowrap center">
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $row->state, $i, 'records.', true, 'cb'); ?>
<?php echo JHtml::_('jgrid.state', JHtml::_('grid.publishedOptions'), ((int) $row->state === 2 ? 1 : 2), $i, 'records.', true, true, 'cb'); ?>
<?php echo JHtml::_('jgrid.state', JHtml::_('grid.publishedOptions'), ((int) $row->state === -2 ? 1 : -2), $i, 'records.', true, true, 'cb'); ?>
</div>
</td>