As mentioned, patch to follow containing some new views handlers for heartbeat.

There are 3...

views_handler_field_heartbeat_attachments.inc works but the jquery that is present on the default stream pages doesn't work yet (May need tweaking due to different view classes).

views_handler_field_heartbeat_buttons.inc works OK but not with the ctools modal popup. The way the ajax has to be rendered needs to be changed I think - haven't sussed that out yet!

views_handler_filter_heartbeat_message_id.inc - adds a filter handler for message_id (types) so these can be selected from a list (I am using fine with VBO too).

I have added the files to the .info file and added what is needed to heartbeat.views.inc (as in other patch in [#301176]).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

And here is the patch....

damiankloip’s picture

Here is another patch to add a field handler for message_id. Works much the same as the node type handler, where the machine name can be displayed, although the default is to use the message_id description.

Stalski’s picture

The patches are pushed after some modifications. I am currently testing everything.

damiankloip’s picture

Cool :), I will have a look later on too. See what I was missing...

Stalski’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

DrupalDesigner-1’s picture

This patch fails for me. Is it applied from the root heartbeat directory as per normal? Getting the following error:

$ git apply -v 1305856_heartbeat_views_handlers.patch
1305856_heartbeat_views_handlers.patch:140: space before tab in indent.
        $view = heartbeat_activity_view($heartbeatActivity);
1305856_heartbeat_views_handlers.patch:141: space before tab in indent.
        return $this->render_attachments($view['attachments']);
1305856_heartbeat_views_handlers.patch:176: space before tab in indent.
        //ctools_include('modal');
1305856_heartbeat_views_handlers.patch:182: trailing whitespace.
    return theme('heartbeat_buttons',
1305856_heartbeat_views_handlers.patch:183: space before tab in indent.
        array('message' => $heartbeatActivity));
Checking patch heartbeat.info...
warning: heartbeat.info has type 100644, expected 100755
error: while searching for:
files[] = streams/singleactivity.inc
files[] = streams/viewsactivity.inc
files[] = views/views_handler_field_heartbeat_message.inc
files[] = views/views_plugin_row_heartbeat_view.inc
files[] = views/views_plugin_row_heartbeat_rss.inc
files[] = tests/heartbeat.entity.test
files[] = tests/heartbeat.api.test
error: patch failed: heartbeat.info:15
error: heartbeat.info: patch does not apply
Checking patch heartbeat.views.inc...
error: while searching for:
}

/**
 * Implementation of hook_views_handlers().
 */
function heartbeat_views_handlers() {
  return array(
    'info' => array(
      'path' => drupal_get_path('module', 'heartbeat') . '/views',
    ),
    'handlers' => array(
      'views_handler_field_heartbeat_message' => array(
        'parent' => 'views_handler_field',
        'file' => 'views_handler_field_heartbeat_message.inc',
      ),
      'views_plugin_row_heartbeat_view' => array(
        'parent' => 'views_plugin_row',
        'file' => 'views_plugin_row_heartbeat_view.inc',
      ),
      'views_plugin_row_heartbeat_rss' => array(
        'parent' => 'views_plugin_row',
        'file' => 'views_plugin_row_heartbeat_rss.inc',
      ),
    ),
  );
}

/**
 * Implements hook_views_plugins().
 */
function heartbeat_views_plugins() {

error: patch failed: heartbeat.views.inc:154
error: heartbeat.views.inc: patch does not apply
Checking patch views/views_handler_field_heartbeat_attachments.inc...
Checking patch views/views_handler_field_heartbeat_buttons.inc...
Checking patch views/views_handler_filter_heartbeat_message_id.inc...