8ac59801be
Update commons modules to release 7.12, and move the codebase under modules/commons instead of constant fetching from remote repository. The commons.make file removed so it is not required to rebuild groups distribution. Change-Id: I3be393ba1af34427e2915b18ab1ad718fd4e54db
136 lines
7.2 KiB
PHP
136 lines
7.2 KiB
PHP
<?php
|
||
/**
|
||
* @file
|
||
* commons_documents.views_default.inc
|
||
*/
|
||
|
||
/**
|
||
* Implements hook_views_default_views().
|
||
*/
|
||
function commons_documents_views_default_views() {
|
||
$export = array();
|
||
|
||
$view = new view();
|
||
$view->name = 'commons_bw_documents';
|
||
$view->description = 'Commons Documents listing for the group browsing widget.';
|
||
$view->tag = 'Commons Documents, Commons Browsing Widget';
|
||
$view->base_table = 'node';
|
||
$view->human_name = 'Commons Browsing Widget - Documents';
|
||
$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['use_ajax'] = TRUE;
|
||
$handler->display->display_options['use_more_always'] = FALSE;
|
||
$handler->display->display_options['access']['type'] = 'perm';
|
||
$handler->display->display_options['cache']['type'] = 'none';
|
||
$handler->display->display_options['query']['type'] = 'views_query';
|
||
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
|
||
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
||
$handler->display->display_options['pager']['type'] = 'lite';
|
||
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
|
||
$handler->display->display_options['pager']['options']['offset'] = '0';
|
||
$handler->display->display_options['pager']['options']['id'] = '5';
|
||
$handler->display->display_options['pager']['options']['quantity'] = '9';
|
||
$handler->display->display_options['style_plugin'] = 'default';
|
||
$handler->display->display_options['row_plugin'] = 'node';
|
||
/* Header: Global: Node partial form */
|
||
$handler->display->display_options['header']['commons_bw_node_partial_form']['id'] = 'commons_bw_node_partial_form';
|
||
$handler->display->display_options['header']['commons_bw_node_partial_form']['table'] = 'views';
|
||
$handler->display->display_options['header']['commons_bw_node_partial_form']['field'] = 'commons_bw_node_partial_form';
|
||
$handler->display->display_options['header']['commons_bw_node_partial_form']['bundle'] = 'document';
|
||
/* No results behavior: Global: Text area */
|
||
$handler->display->display_options['empty']['area']['id'] = 'area';
|
||
$handler->display->display_options['empty']['area']['table'] = 'views';
|
||
$handler->display->display_options['empty']['area']['field'] = 'area';
|
||
$handler->display->display_options['empty']['area']['empty'] = TRUE;
|
||
$handler->display->display_options['empty']['area']['content'] = 'No documents have been added to this group.';
|
||
$handler->display->display_options['empty']['area']['format'] = 'filtered_html';
|
||
/* Relationship: OG membership: OG membership from Node */
|
||
$handler->display->display_options['relationships']['og_membership_rel']['id'] = 'og_membership_rel';
|
||
$handler->display->display_options['relationships']['og_membership_rel']['table'] = 'node';
|
||
$handler->display->display_options['relationships']['og_membership_rel']['field'] = 'og_membership_rel';
|
||
$handler->display->display_options['relationships']['og_membership_rel']['required'] = TRUE;
|
||
/* Field: Content: Title */
|
||
$handler->display->display_options['fields']['title']['id'] = 'title';
|
||
$handler->display->display_options['fields']['title']['table'] = 'node';
|
||
$handler->display->display_options['fields']['title']['field'] = 'title';
|
||
$handler->display->display_options['fields']['title']['label'] = '';
|
||
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
|
||
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
|
||
/* Sort criterion: Content: Sticky */
|
||
$handler->display->display_options['sorts']['sticky']['id'] = 'sticky';
|
||
$handler->display->display_options['sorts']['sticky']['table'] = 'node';
|
||
$handler->display->display_options['sorts']['sticky']['field'] = 'sticky';
|
||
$handler->display->display_options['sorts']['sticky']['order'] = 'DESC';
|
||
/* Sort criterion: Content: Post date */
|
||
$handler->display->display_options['sorts']['created']['id'] = 'created';
|
||
$handler->display->display_options['sorts']['created']['table'] = 'node';
|
||
$handler->display->display_options['sorts']['created']['field'] = 'created';
|
||
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
|
||
$handler->display->display_options['sorts']['created']['exposed'] = TRUE;
|
||
$handler->display->display_options['sorts']['created']['expose']['label'] = 'Post date';
|
||
/* Contextual filter: OG membership: Group ID */
|
||
$handler->display->display_options['arguments']['gid']['id'] = 'gid';
|
||
$handler->display->display_options['arguments']['gid']['table'] = 'og_membership';
|
||
$handler->display->display_options['arguments']['gid']['field'] = 'gid';
|
||
$handler->display->display_options['arguments']['gid']['relationship'] = 'og_membership_rel';
|
||
$handler->display->display_options['arguments']['gid']['default_argument_type'] = 'fixed';
|
||
$handler->display->display_options['arguments']['gid']['summary']['number_of_records'] = '0';
|
||
$handler->display->display_options['arguments']['gid']['summary']['format'] = 'default_summary';
|
||
$handler->display->display_options['arguments']['gid']['summary_options']['items_per_page'] = '25';
|
||
/* Filter criterion: Content: Published */
|
||
$handler->display->display_options['filters']['status']['id'] = 'status';
|
||
$handler->display->display_options['filters']['status']['table'] = 'node';
|
||
$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: Content: Type */
|
||
$handler->display->display_options['filters']['type']['id'] = 'type';
|
||
$handler->display->display_options['filters']['type']['table'] = 'node';
|
||
$handler->display->display_options['filters']['type']['field'] = 'type';
|
||
$handler->display->display_options['filters']['type']['value'] = array(
|
||
'document' => 'document',
|
||
);
|
||
$handler->display->display_options['filters']['type']['group'] = 1;
|
||
/* Filter criterion: OG membership: Group_type */
|
||
$handler->display->display_options['filters']['group_type']['id'] = 'group_type';
|
||
$handler->display->display_options['filters']['group_type']['table'] = 'og_membership';
|
||
$handler->display->display_options['filters']['group_type']['field'] = 'group_type';
|
||
$handler->display->display_options['filters']['group_type']['relationship'] = 'og_membership_rel';
|
||
$handler->display->display_options['filters']['group_type']['value'] = array(
|
||
'node' => 'node',
|
||
);
|
||
$handler->display->display_options['filters']['group_type']['group'] = 1;
|
||
$translatables['commons_bw_documents'] = array(
|
||
t('Master'),
|
||
t('more'),
|
||
t('Apply'),
|
||
t('Reset'),
|
||
t('Sort by'),
|
||
t('Asc'),
|
||
t('Desc'),
|
||
t('Items per page'),
|
||
t('- All -'),
|
||
t('Offset'),
|
||
t('« first'),
|
||
t('‹ previous'),
|
||
t('next ›'),
|
||
t('last »'),
|
||
t('No documents have been added to this group.'),
|
||
t('OG membership from node'),
|
||
t('following'),
|
||
t('Post date'),
|
||
t('most active'),
|
||
t('All'),
|
||
t('Following'),
|
||
);
|
||
|
||
$export['commons_bw_documents'] = $view;
|
||
|
||
return $export;
|
||
}
|