Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[#24839] Incorrect tooltip for Sticky column icons in Banner Manager:…

… Banners
  • Loading branch information...
commit 6eaf3f755c406e4c4266f79fa839962607231424 1 parent b89831b
@chdemko chdemko authored
View
41 administrator/components/com_banners/helpers/html/banner.php
@@ -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);
+ }
+
}
View
2  administrator/components/com_banners/views/banners/tmpl/default.php
@@ -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;?>
View
4 administrator/language/en-GB/en-GB.com_banners.ini
@@ -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"
@@ -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 -"
View
2  administrator/templates/hathor/html/com_banners/banners/default.php
@@ -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;?>
View
3  installation/CHANGELOG
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.