-
Notifications
You must be signed in to change notification settings - Fork 21
/
oa_river.module
46 lines (42 loc) · 1.31 KB
/
oa_river.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @file
* Code for the Open Atrium Recent Activity feature.
*/
include_once 'oa_river.features.inc';
/**
* Implements hook_theme()
*/
function oa_river_theme() {
return array(
'views_view_fields__oa_recent_activity__panel_pane' => array(
'template' => 'views-view-fields--oa-recent-activity--panel-pane',
'base hook' => 'views_view_fields',
'preprocess functions' => array(
'template_preprocess',
'template_preprocess_views_view_fields',
'oa_core_preprocess_views_view_fields',
),
'arguments' => array('view' => NULL, 'options' => NULL, 'row' => NULL),
'path' => drupal_get_path('module', 'oa_river') . '/templates',
),
);
}
/**
* Implements hook_entity_info_alter().
*
* Add a the river view modes to messages.
*/
function oa_river_entity_info_alter(&$entity_info) {
if (isset($entity_info['message'])) {
$view_modes = array(
'oa_river_header' => array('label' => t('Open Atrium - River Header')),
'oa_river_accordian' => array('label' => t('Open Atrium - River Accordian')),
'oa_river_body' => array('label' => t('Open Atrium - River Body')),
);
foreach ($view_modes as &$view_mode) {
$view_mode += array('custom settings' => TRUE);
}
$entity_info['message']['view modes'] += $view_modes;
}
}