protected function HeartbeatActivity::add_buttons in Heartbeat 7
Add buttons to the activity message.
1 call to HeartbeatActivity::add_buttons()
- HeartbeatActivity::__construct in includes/
heartbeatactivity.inc - constructor
File
- includes/
heartbeatactivity.inc, line 421 - HeartbeatActivity object Defines one heartbeat activity object.
Class
- HeartbeatActivity
- Class defines an activity message object
Code
protected function add_buttons() {
// Internal button.
if ($this->delete_access || $this->actor_access) {
heartbeat_ctools_modal_prepare();
drupal_add_library('system', 'drupal.ajax');
$link = l(t('Delete'), 'heartbeat/nojs/activity/delete/' . $this->uaid, array(
'query' => array(
'destination' => $_GET['q'],
),
'html' => TRUE,
'attributes' => array(
'class' => array(
'use-ajax',
'ctools-modal-ctools-heartbeat-style',
),
'title' => t('Delete'),
),
));
$button = '<span class="hover-delete">' . $link . '</span>';
//$button = '<span class="hover-delete">' . ctools_modal_text_button(t('Delete'), 'heartbeat/nojs/activity/delete/' . $this->uaid, t('Delete'), 'ctools-modal-ctools-heartbeat-style') . '</span>';
$this
->add_button($button);
}
}