Skip to content
Snippets Groups Projects
Commit a723d2a6 authored by Chris Gross's avatar Chris Gross
Browse files

daily build

parent 5ad50c93
No related branches found
No related tags found
No related merge requests found
Showing
with 260 additions and 188 deletions
WCM Base 7.x-1.x, 2015-08-17
----------------------------
- All OCIO Omega Themes: Fixed l-constrained abuses and cleaned up templates.
- OCIO Omega Base: Removed extlink icons on links using button classes.
- OCIO Omega Theme 2: Updated tile pane and Media Magnet widget styles.
- Views Bulk Operations: Security release, updated to 3.3
WCM Base 7.x-1.x, 2015-08-12
----------------------------
- WCM Base Profile: Added Conditional Fields module.
......
File mode changed from 100755 to 100644
......@@ -18,6 +18,7 @@ function views_bulk_operations_archive_action_info() {
// "Create an advanced action" dropdown on admin/config/system/actions.
'configurable' => FALSE,
'vbo_configurable' => TRUE,
'behavior' => array('views_property'),
'triggers' => array('any'),
);
}
......
......@@ -13,11 +13,13 @@ function views_bulk_operations_book_action_info() {
'label' => t('Move to book'),
'configurable' => TRUE,
'behavior' => array('changes_property'),
'triggers' => array('any'),
);
$actions['views_bulk_operations_remove_from_book_action'] = array(
'type' => 'node',
'label' => t('Remove from book'),
'configurable' => FALSE,
'triggers' => array('any'),
);
}
......
......@@ -19,6 +19,7 @@ function views_bulk_operations_delete_action_info() {
'label' => t('Delete revision'),
'configurable' => FALSE,
'behavior' => array('deletes_property'),
'triggers' => array('any'),
),
);
}
......
......@@ -82,6 +82,11 @@ function views_bulk_operations_modify_action($entity, $context) {
// The wrapper will automatically modify $entity itself.
$wrapper = entity_metadata_wrapper($context['entity_type'], $entity);
foreach ($context['selected']['properties'] as $key) {
if (!$wrapper->$key->access('update')) {
// No access.
continue;
}
if (in_array($key, $context['append']['properties'])) {
$old_values = $wrapper->$key->value();
$wrapper->$key->set($context['properties'][$key]);
......@@ -134,7 +139,7 @@ function views_bulk_operations_modify_action_form($context, &$form_state) {
if (!empty($properties)) {
$form['properties'] = array(
'#type' => 'fieldset',
'#title' => 'Properties',
'#title' => t('Properties'),
);
$form['properties']['show_value'] = array(
'#suffix' => '<div class="clearfix"></div>',
......@@ -298,7 +303,7 @@ function views_bulk_operations_modify_action_form($context, &$form_state) {
$token_type = str_replace('_', '-', $entity_type);
$form['tokens'] = array(
'#type' => 'fieldset',
'#title' => 'Available tokens',
'#title' => t('Available tokens'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => 998,
......
......@@ -10,6 +10,7 @@ function views_bulk_operations_user_cancel_action_info() {
'label' => t('Cancel user account'),
'configurable' => TRUE,
'behavior' => array('deletes_property'),
'triggers' => array('any'),
));
}
......
......@@ -45,24 +45,19 @@ function views_bulk_operations_user_roles_action_submit($form, $form_state) {
);
}
function views_bulk_operations_user_roles_action(&$user, $context) {
$roles = $user->roles;
$selected = (is_array($context['add_roles']) ? $context['add_roles'] : array()) +
(is_array($context['remove_roles']) ? $context['remove_roles'] : array());
$result = db_query("SELECT rid, name FROM {role} WHERE rid IN (:selected)", array(':selected' => array_keys($selected)));
foreach ($result as $role) {
if (isset($context['add_roles'][$role->rid])) {
$add_roles[$role->rid] = $role->name;
}
if (isset($context['remove_roles'][$role->rid])) {
$remove_roles[$role->rid] = $role->name;
}
function views_bulk_operations_user_roles_action($user, $context) {
$wrapper = entity_metadata_wrapper('user', $user);
if (!$wrapper->roles->access("update")) {
// No access.
return;
}
if (!empty($add_roles)) {
$roles += $add_roles;
$roles = $wrapper->roles->value();
if (is_array($context['add_roles'])) {
$roles = array_merge($roles, $context['add_roles']);
}
if (!empty($remove_roles)) {
$roles = array_diff($roles, $remove_roles);
if (is_array($context['remove_roles'])) {
$roles = array_diff($roles, $context['remove_roles']);
}
user_save($user, array('roles' => $roles));
$wrapper->roles->set($roles);
$wrapper->save();
}
......@@ -3,9 +3,9 @@ description = Provides permission-based access control for actions. Used by View
package = Administration
core = 7.x
; Information added by Drupal.org packaging script on 2013-12-23
version = "7.x-3.2"
; Information added by Drupal.org packaging script on 2015-07-01
version = "7.x-3.3"
core = "7.x"
project = "views_bulk_operations"
datestamp = "1387798183"
datestamp = "1435764542"
......@@ -46,21 +46,23 @@
});
// Set up the ability to click anywhere on the row to select it.
$('.views-table tbody tr', form).click(function(event) {
if (event.target.tagName.toLowerCase() != 'input' && event.target.tagName.toLowerCase() != 'a') {
$('input[id^="edit-views-bulk-operations"]:not(:disabled)', this).each(function() {
var checked = this.checked;
// trigger() toggles the checkmark *after* the event is set,
// whereas manually clicking the checkbox toggles it *beforehand*.
// that's why we manually set the checkmark first, then trigger the
// event (so that listeners get notified), then re-set the checkmark
// which the trigger will have toggled. yuck!
this.checked = !checked;
$(this).trigger('click');
this.checked = !checked;
});
}
});
if (Drupal.settings.vbo.row_clickable) {
$('.views-table tbody tr', form).click(function(event) {
if (event.target.tagName.toLowerCase() != 'input' && event.target.tagName.toLowerCase() != 'a') {
$('input[id^="edit-views-bulk-operations"]:not(:disabled)', this).each(function() {
var checked = this.checked;
// trigger() toggles the checkmark *after* the event is set,
// whereas manually clicking the checkbox toggles it *beforehand*.
// that's why we manually set the checkmark first, then trigger the
// event (so that listeners get notified), then re-set the checkmark
// which the trigger will have toggled. yuck!
this.checked = !checked;
$(this).trigger('click');
this.checked = !checked;
});
}
});
}
}
Drupal.vbo.tableSelectAllPages = function(form) {
......
......@@ -20,7 +20,7 @@ class ViewsBulkOperationsAction extends ViewsBulkOperationsBaseOperation {
*/
public function getAccessMask() {
// Assume edit by default.
if (!isset($this->operationInfo['behavior'])) {
if (empty($this->operationInfo['behavior'])) {
$this->operationInfo['behavior'] = array('changes_property');
}
......
......@@ -124,6 +124,8 @@ class ViewsBulkOperationsRulesComponent extends ViewsBulkOperationsBaseOperation
else {
$element = rules_action('component_' . $this->operationInfo['parameters']['component_key']);
}
$element->execute($data);
$wrapper_type = is_array($data) ? "list<{$this->entityType}>" : $this->entityType;
$wrapper = entity_metadata_wrapper($wrapper_type, $data);
$element->execute($wrapper);
}
}
......@@ -55,6 +55,7 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
'contains' => array(
'display_type' => array('default' => 0),
'enable_select_all_pages' => array('default' => TRUE),
'row_clickable' => array('default' => TRUE),
'force_single' => array('default' => FALSE),
'entity_load_capacity' => array('default' => 10),
'skip_batching' => array('default' => 0),
......@@ -63,11 +64,26 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
$options['vbo_operations'] = array(
'default' => array(),
'unpack_translatable' => 'unpack_operations',
'export' => 'export_vbo_operations',
);
return $options;
}
function export_vbo_operations($indent, $prefix, $storage, $option, $definition, $parents) {
// Anti-recursion, since we use the parent export helper.
unset($definition['export']);
// Find and remove all unselected/disabled operations.
foreach ($storage['vbo_operations'] as $operation_id => $operation) {
if (empty($operation['selected'])) {
unset($storage['vbo_operations'][$operation_id]);
}
}
return parent::export_option($indent, $prefix, $storage, $option, $definition, $parents);
}
function unpack_operations(&$translatable, $storage, $option, $definition, $parents, $keys) {
$translatable[] = array(
'value' => t('- Choose an operation -'),
......@@ -107,6 +123,12 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
'#default_value' => $this->options['vbo_settings']['enable_select_all_pages'],
'#description' => t('Check this box to enable the ability to select all items on all pages.'),
);
$form['vbo_settings']['row_clickable'] = array(
'#type' => 'checkbox',
'#title' => t('Make the whole row clickable'),
'#default_value' => $this->options['vbo_settings']['row_clickable'],
'#description' => t('Check this box to select an item when its row has been clicked. Requires JavaScript.'),
);
$form['vbo_settings']['force_single'] = array(
'#type' => 'checkbox',
'#title' => t('Force single'),
......
......@@ -9,9 +9,9 @@ php = 5.2.9
files[] = plugins/operation_types/base.class.php
files[] = views/views_bulk_operations_handler_field_operations.inc
; Information added by Drupal.org packaging script on 2013-12-23
version = "7.x-3.2"
; Information added by Drupal.org packaging script on 2015-07-01
version = "7.x-3.3"
core = "7.x"
project = "views_bulk_operations"
datestamp = "1387798183"
datestamp = "1435764542"
......@@ -41,21 +41,20 @@ function views_bulk_operations_load_action_includes() {
// The list of VBO actions is fairly static, so it's hardcoded for better
// performance (hitting the filesystem with file_scan_directory(), and then
// caching the result has its cost).
$path = drupal_get_path('module', 'views_bulk_operations') . '/actions/';
$files = array(
'archive.action.inc',
'argument_selector.action.inc',
'book.action.inc',
'delete.action.inc',
'modify.action.inc',
'script.action.inc',
'user_roles.action.inc',
'user_cancel.action.inc',
'archive.action',
'argument_selector.action',
'book.action',
'delete.action',
'modify.action',
'script.action',
'user_roles.action',
'user_cancel.action',
);
if (!$loaded) {
foreach ($files as $file) {
include_once $path . $file;
module_load_include('inc', 'views_bulk_operations', 'actions/' . $file);
}
$loaded = TRUE;
}
......@@ -77,7 +76,7 @@ function views_bulk_operations_load_action_includes() {
function views_bulk_operations_cron() {
db_delete('queue')
->condition('name', db_like('views_bulk_operations_active_queue_'), 'LIKE')
->condition('created', REQUEST_TIME - 864000, '<')
->condition('created', REQUEST_TIME - 86400, '<')
->execute();
}
......@@ -358,7 +357,7 @@ function views_bulk_operations_form_alter(&$form, &$form_state, $form_id) {
*/
function views_bulk_operations_views_post_build(&$view) {
$vbo = _views_bulk_operations_get_field($view);
if ($vbo && $vbo->get_selected_operations() < 1) {
if ($vbo && count($vbo->get_selected_operations()) < 1) {
$vbo->options['exclude'] = TRUE;
}
}
......@@ -420,7 +419,7 @@ function theme_views_bulk_operations_select_all($variables) {
if ($enable_select_all_pages) {
$form['select_all']['or'] = array(
'#type' => 'markup',
'#markup' => '<em>OR</em>',
'#markup' => '<em>' . t('OR') . '</em>',
);
$form['select_all']['all_pages'] = array(
'#type' => 'checkbox',
......@@ -443,6 +442,13 @@ function theme_views_bulk_operations_select_all($variables) {
*/
function views_bulk_operations_form($form, &$form_state, $vbo) {
$form['#attached']['js'][] = drupal_get_path('module', 'views_bulk_operations') . '/js/views_bulk_operations.js';
$form['#attached']['js'][] = array(
'data' => array('vbo' => array(
'row_clickable' => $vbo->get_vbo_option('row_clickable'),
)),
'type' => 'setting',
);
$form['#attached']['css'][] = drupal_get_path('module', 'views_bulk_operations') . '/css/views_bulk_operations.css';
// Wrap the form in a div with specific classes for JS targeting and theming.
$class = 'vbo-views-form';
......@@ -595,14 +601,23 @@ function views_bulk_operations_confirm_form($form, &$form_state, $view, $output)
$operation = $form_state['operation'];
$rows = $form_state['selection'];
$query = drupal_get_query_parameters($_GET, array('q'));
$title = t('Are you sure you want to perform %operation on the selected items?', array('%operation' => $operation->label()));
$form = confirm_form($form,
t('Are you sure you want to perform %operation on the selected items?', array('%operation' => $operation->label())),
$title,
array('path' => $view->get_url(), 'query' => $query),
theme('views_bulk_operations_confirmation', array('rows' => $rows, 'vbo' => $vbo, 'operation' => $operation, 'select_all_pages' => $form_state['select_all_pages']))
);
// Add VBO's submit handler to the Confirm button added by config_form().
$form['actions']['submit']['#submit'] = array('views_bulk_operations_form_submit');
// We can't set the View title here as $view is just a copy of the original,
// and our settings changes won't "stick" for the first page load of the
// confirmation form. We also can't just call drupal_set_title() directly
// because our title will be clobbered by the actual View title later. So
// let's tuck the title away in the form for use later.
// @see views_bulk_operations_preprocess_views_view()
$form['#vbo_confirm_form_title'] = $title;
return $form;
}
......@@ -618,7 +633,7 @@ function theme_views_bulk_operations_confirmation($variables) {
// Load the entities from the current page, and show their titles.
$entities = _views_bulk_operations_entity_load($entity_type, array_values($rows), $vbo->revision);
foreach ($entities as $entity) {
$items[] = check_plain(_views_bulk_operations_entity_label($entity_type, $entity));
$items[] = check_plain(entity_label($entity_type, $entity));
}
// All rows on all pages have been selected, so show a count of additional items.
if ($select_all_pages) {
......@@ -631,6 +646,29 @@ function theme_views_bulk_operations_confirmation($variables) {
return $output;
}
/**
* Implements hook_preprocess_page().
*
* Hide action links on the configure and confirm pages.
*/
function views_bulk_operations_preprocess_page(&$variables) {
if (isset($_POST['select_all'], $_POST['operation'])) {
$variables['action_links'] = array();
}
}
/**
* Implements hook_preprocess_views_view().
*/
function views_bulk_operations_preprocess_views_view($variables) {
// If we've stored a title for the confirmation form, retrieve it here and
// retitle the View.
// @see views_bulk_operations_confirm_form()
if (array_key_exists('rows', $variables) && is_array($variables['rows']) && array_key_exists('#vbo_confirm_form_title', $variables['rows'])) {
$variables['view']->set_title($variables['rows']['#vbo_confirm_form_title']);
}
}
/**
* Goes through the submitted values, and returns
* an array of selected rows, in the form of
......@@ -871,7 +909,7 @@ function views_bulk_operations_adjust_selection($queue_name, $operation, $option
'views_row' => array(),
'position' => array(
'current' => ++$context['sandbox']['progress'],
'total' => $view->total_rows,
'total' => $context['sandbox']['max'],
),
);
// Some operations require full selected rows.
......@@ -1042,7 +1080,7 @@ function views_bulk_operations_queue_item_process($queue_item_data, &$log = NULL
$arguments = array(
'%operation' => $operation->label(),
'@type' => $entity_type,
'%title' => _views_bulk_operations_entity_label($entity_type, $entity),
'%title' => entity_label($entity_type, $entity),
);
if ($log) {
......@@ -1128,7 +1166,7 @@ function views_bulk_operations_direct_process($operation, $rows, $options) {
$context['results']['log'][] = t('Skipped %operation on @type %title due to insufficient permissions.', array(
'%operation' => $operation->label(),
'@type' => $entity_type,
'%title' => _views_bulk_operations_entity_label($entity_type, $entity),
'%title' => entity_label($entity_type, $entity),
));
unset($entities[$id]);
}
......@@ -1236,29 +1274,6 @@ function _views_bulk_operations_entity_load($entity_type, $ids, $revision = FALS
return $entities;
}
/**
* Label function for entities.
* Core entities don't declare the "label" key, so entity_label() fails,
* and a fallback is needed. This function provides that fallback.
*/
function _views_bulk_operations_entity_label($entity_type, $entity) {
$label = entity_label($entity_type, $entity);
if (!$label) {
$entity_info = entity_get_info($entity_type);
$id_key = $entity_info['entity keys']['id'];
// Many entity types (e.g. "user") have a name which fits the label perfectly.
if (isset($entity->name)) {
$label = $entity->name;
}
elseif (isset($entity->{$id_key})) {
// Fallback to the id key.
$label = $entity->{$id_key};
}
}
return $label;
}
/**
* Helper function to report an error.
*/
......
......@@ -10,6 +10,21 @@
function wcm_user_directory_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'field_directory_display_order'
$field_bases['field_directory_display_order'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_directory_display_order',
'indexes' => array(),
'locked' => 0,
'module' => 'number',
'settings' => array(),
'translatable' => 0,
'type' => 'number_integer',
);
// Exported field_base: 'field_display_in_directory'
$field_bases['field_display_in_directory'] = array(
'active' => 1,
......
......@@ -10,6 +10,59 @@
function wcm_user_directory_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'user-user-field_directory_display_order'
$field_instances['user-user-field_directory_display_order'] = array(
'bundle' => 'user',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'number',
'settings' => array(
'decimal_separator' => '.',
'prefix_suffix' => TRUE,
'scale' => 0,
'thousand_separator' => ' ',
),
'type' => 'number_integer',
'weight' => 10,
),
'full' => array(
'label' => 'above',
'module' => 'number',
'settings' => array(
'decimal_separator' => '.',
'prefix_suffix' => TRUE,
'scale' => 0,
'thousand_separator' => ' ',
),
'type' => 'number_integer',
'weight' => 10,
),
),
'ds_extras_field_template' => '',
'entity_type' => 'user',
'field_name' => 'field_directory_display_order',
'label' => 'Directory Display Order',
'required' => 0,
'settings' => array(
'max' => '',
'min' => '',
'prefix' => '',
'suffix' => '',
'user_register_form' => 0,
),
'widget' => array(
'active' => 0,
'module' => 'number',
'settings' => array(),
'type' => 'number',
'weight' => 9,
),
);
// Exported field_instance: 'user-user-field_display_in_directory'
$field_instances['user-user-field_display_in_directory'] = array(
'bundle' => 'user',
......@@ -23,9 +76,10 @@ function wcm_user_directory_field_default_field_instances() {
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'hidden',
'weight' => 7,
'type' => 'list_default',
'weight' => 9,
),
'directory' => array(
'label' => 'above',
......@@ -41,9 +95,10 @@ function wcm_user_directory_field_default_field_instances() {
),
'full' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'hidden',
'weight' => 12,
'type' => 'list_default',
'weight' => 9,
),
'leadership_listing' => array(
'label' => 'above',
......@@ -80,6 +135,7 @@ function wcm_user_directory_field_default_field_instances() {
// Translatables
// Included for use with string extractors like potx.
t('Check this box if this person should be included in the departmental "people" directory. ');
t('Directory Display Order');
t('Display in Directory');
return $field_instances;
......
......@@ -5,14 +5,16 @@ package = WCM Features
version = 7.x-1.0
project = wcm_user_directory
dependencies[] = features
dependencies[] = number
dependencies[] = options
dependencies[] = views
features[ctools][] = ds:ds:1
features[ctools][] = views:views_default:3.0
features[features_api][] = api:2
features[field_base][] = field_directory_display_order
features[field_base][] = field_display_in_directory
features[field_instance][] = user-user-field_directory_display_order
features[field_instance][] = user-user-field_display_in_directory
features[views_view][] = user_directory
features_exclude[dependencies][ctools] = ctools
features_exclude[dependencies][ds] = ds
features_exclude[dependencies][list] = list
<?php
/**
* @file
* wcm_user_directory.views_default.inc
*/
/**
* Implements hook_views_default_views().
*/
function wcm_user_directory_views_default_views() {
$export = array();
$view = new view();
$view->name = 'user_directory';
$view->description = '';
$view->tag = 'OCIO User Directory';
$view->base_table = 'users';
$view->human_name = 'User Directory';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Directory';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'name' => 'name',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
'name' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
);
/* Field: User: Last Name */
$handler->display->display_options['fields']['field_last_name']['id'] = 'field_last_name';
$handler->display->display_options['fields']['field_last_name']['table'] = 'field_data_field_last_name';
$handler->display->display_options['fields']['field_last_name']['field'] = 'field_last_name';
/* Field: User: First Name */
$handler->display->display_options['fields']['field_first_name']['id'] = 'field_first_name';
$handler->display->display_options['fields']['field_first_name']['table'] = 'field_data_field_first_name';
$handler->display->display_options['fields']['field_first_name']['field'] = 'field_first_name';
/* Field: User: Title */
$handler->display->display_options['fields']['field_job_title']['id'] = 'field_job_title';
$handler->display->display_options['fields']['field_job_title']['table'] = 'field_data_field_job_title';
$handler->display->display_options['fields']['field_job_title']['field'] = 'field_job_title';
/* Field: User: E-mail */
$handler->display->display_options['fields']['mail']['id'] = 'mail';
$handler->display->display_options['fields']['mail']['table'] = 'users';
$handler->display->display_options['fields']['mail']['field'] = 'mail';
/* Field: User: Phone */
$handler->display->display_options['fields']['field_phone']['id'] = 'field_phone';
$handler->display->display_options['fields']['field_phone']['table'] = 'field_data_field_phone';
$handler->display->display_options['fields']['field_phone']['field'] = 'field_phone';
/* Sort criterion: User: Last Name (field_last_name) */
$handler->display->display_options['sorts']['field_last_name_value']['id'] = 'field_last_name_value';
$handler->display->display_options['sorts']['field_last_name_value']['table'] = 'field_data_field_last_name';
$handler->display->display_options['sorts']['field_last_name_value']['field'] = 'field_last_name_value';
/* Sort criterion: User: First Name (field_first_name) */
$handler->display->display_options['sorts']['field_first_name_value']['id'] = 'field_first_name_value';
$handler->display->display_options['sorts']['field_first_name_value']['table'] = 'field_data_field_first_name';
$handler->display->display_options['sorts']['field_first_name_value']['field'] = 'field_first_name_value';
/* Filter criterion: User: Active */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'users';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: User: Display in Directory (field_display_in_directory) */
$handler->display->display_options['filters']['field_display_in_directory_value']['id'] = 'field_display_in_directory_value';
$handler->display->display_options['filters']['field_display_in_directory_value']['table'] = 'field_data_field_display_in_directory';
$handler->display->display_options['filters']['field_display_in_directory_value']['field'] = 'field_display_in_directory_value';
$handler->display->display_options['filters']['field_display_in_directory_value']['value'] = array(
1 => '1',
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'directory';
$handler->display->display_options['menu']['title'] = 'People';
$handler->display->display_options['menu']['weight'] = '20';
$handler->display->display_options['menu']['name'] = 'main-menu';
$handler->display->display_options['menu']['context'] = 0;
$handler->display->display_options['menu']['context_only_inline'] = 0;
$export['user_directory'] = $view;
return $export;
}
<?php
/**
* @file
* wcm_user_leadership.context.inc
*/
/**
* Implements hook_context_default_contexts().
*/
function wcm_user_leadership_context_default_contexts() {
$export = array();
$context = new stdClass();
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'user-leadership-page';
$context->description = '';
$context->tag = 'WCM User Leadership';
$context->conditions = array(
'path' => array(
'values' => array(
'leadership' => 'leadership',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'views-leadership_listing-block_1' => array(
'module' => 'views',
'delta' => 'leadership_listing-block_1',
'region' => 'content',
'weight' => '-10',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('WCM User Leadership');
$export['user-leadership-page'] = $context;
return $export;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment