Skip to content

Commit

Permalink
[#24839] Incorrect tooltip for Sticky column icons in Banner Manager:…
Browse files Browse the repository at this point in the history
… Banners
  • Loading branch information
chdemko committed Apr 9, 2012
1 parent b89831b commit 6eaf3f7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
41 changes: 41 additions & 0 deletions administrator/components/com_banners/helpers/html/banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,45 @@ public static function clientlist()

return $options;
}

/**
* Returns a pinned state on a grid
*
* @param integer $value The state value.
* @param integer $i The row index
* @param boolean $enabled An optional setting for access control on the action.
* @param string $checkbox An optional prefix for checkboxes.
*
* @return string The Html code
*
* @see JHtmlJGrid::state
*
* @since 2.5.5
*/
public static function pinned($value, $i, $enabled = true, $checkbox = 'cb')
{
$states = array(
1 => array(
'sticky_unpublish',
'COM_BANNERS_BANNERS_PINNED',
'COM_BANNERS_BANNERS_HTML_PIN_BANNER',
'COM_BANNERS_BANNERS_PINNED',
false,
'publish',
'publish'
),
0 => array(
'sticky_publish',
'COM_BANNERS_BANNERS_UNPINNED',
'COM_BANNERS_BANNERS_HTML_UNPIN_BANNER',
'COM_BANNERS_BANNERS_UNPINNED',
false,
'unpublish',
'unpublish'
),
);

return JHtml::_('jgrid.state', $states, $value, $i, 'banners.', $enabled, true, $checkbox);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'banners.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published', $item->sticky, $i, 'banners.sticky_', $canChange);?>
<?php echo JHtml::_('banner.pinned', $item->sticky, $i, $canChange); ?>
</td>
<td class="center">
<?php echo $item->client_name;?>
Expand Down
4 changes: 4 additions & 0 deletions administrator/language/en-GB/en-GB.com_banners.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
COM_BANNERS="Banners"
COM_BANNERS_BANNER_DETAILS="Details"
COM_BANNERS_BANNER_SAVE_SUCCESS="Banner successfully saved"
COM_BANNERS_BANNERS_HTML_PIN_BANNER="Pinned banner"
COM_BANNERS_BANNERS_HTML_UNPIN_BANNER="Unpinned banner"
COM_BANNERS_BANNERS_N_ITEMS_ARCHIVED="%d banners successfully archived"
COM_BANNERS_BANNERS_N_ITEMS_ARCHIVED_1="%d banner successfully archived"
COM_BANNERS_BANNERS_N_ITEMS_CHECKED_IN_0="No banner successfully checked in"
Expand All @@ -20,6 +22,8 @@ COM_BANNERS_BANNERS_N_ITEMS_TRASHED_1="%d banner successfully trashed"
COM_BANNERS_BANNERS_N_ITEMS_UNPUBLISHED="%d banners successfully unpublished"
COM_BANNERS_BANNERS_N_ITEMS_UNPUBLISHED_1="%d banner successfully unpublished"
COM_BANNERS_BANNERS_NO_ITEM_SELECTED="No Banners selected"
COM_BANNERS_BANNERS_PINNED="Pinned Banner"
COM_BANNERS_BANNERS_UNPINNED="Unpinned Banner"
COM_BANNERS_BATCH_CLIENT_LABEL="Set Client"
COM_BANNERS_BATCH_CLIENT_LABEL_DESC="Not making a selection will keep the original client when processing."
COM_BANNERS_BATCH_CLIENT_NOCHANGE="- Keep original Client -"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'banners.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published', $item->sticky, $i, 'banners.sticky_', $canChange);?>
<?php echo JHtml::_('banner.pinned', $item->sticky, $i, $canChange); */?>
</td>
<td class="center">
<?php echo $item->client_name;?>
Expand Down
3 changes: 3 additions & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ $ -> Language fix or change
- -> Removed
! -> Note

09-Apr-2012 Jean-Marie Simonet
# [#24839] Incorrect tooltip for Sticky column icons in Banner Manager: Banners

07-Apr-2012 Jean-Marie Simonet
# [#28345] Call to member function of non-object: setDebug(). Thanks Don.

Expand Down

0 comments on commit 6eaf3f7

Please sign in to comment.