revisioning.views_default.inc in Revisioning 6.3
Same filename and directory in other branches
Canned view to display a summary of all site content.
File
views/revisioning.views_default.incView source
<?php
/**
* @file
* Canned view to display a summary of all site content.
*/
/**
* Implementation of hook_views_default_views().
*/
function revisioning_views_default_views() {
/*
* View 'revisioning_content_summary'
*/
$view = new view();
$view->name = 'revisioning_content_summary';
$view->description = 'Summary of moderated and unmoderated site content.';
$view->tag = 'default';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE;
/* Edit this to true to make a default view disabled initially */
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler
->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'none',
),
'title' => array(
'label' => 'Title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]/view',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'type' => array(
'id' => 'type',
'table' => 'node',
'field' => 'type',
),
'name' => array(
'label' => 'Author',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_user' => 1,
'overwrite_anonymous' => 0,
'anonymous_text' => '',
'exclude' => 0,
'id' => 'name',
'table' => 'users',
'field' => 'name',
'relationship' => 'none',
),
'last_editor' => array(
'label' => 'Last edited by',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'last_editor',
'table' => 'node',
'field' => 'last_editor',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'changed' => array(
'label' => 'Date',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'changed',
'table' => 'node',
'field' => 'changed',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'revision_moderation' => array(
'label' => 'Mod?',
'alter' => array(
'alter_text' => 1,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]/revisions',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => 'No',
'hide_empty' => 1,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'revision_moderation',
'table' => 'node',
'field' => 'revision_moderation',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'number_of_revisions' => array(
'label' => 'Rev.',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => 'View revision summary',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'number_of_revisions',
'table' => 'node',
'field' => 'number_of_revisions',
'relationship' => 'none',
),
'state' => array(
'id' => 'state',
'table' => 'node',
'field' => 'state',
),
'edit_node' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'text' => '',
'exclude' => 0,
'id' => 'edit_node',
'table' => 'node',
'field' => 'edit_node',
'relationship' => 'none',
),
'timestamp' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'comments' => 0,
'exclude' => 0,
'id' => 'timestamp',
'table' => 'history_user',
'field' => 'timestamp',
'relationship' => 'none',
),
));
$handler
->override_option('sorts', array(
'changed' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'changed',
'table' => 'node',
'field' => 'changed',
'relationship' => 'none',
),
));
$handler
->override_option('filters', array(
'revision_moderation' => array(
'operator' => 'in',
'value' => array(
'1' => '1',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'revision_moderation_op',
'identifier' => 'revision_moderation',
'label' => 'Node: Revision moderation',
'optional' => 1,
'single' => 1,
'remember' => 1,
'reduce' => 0,
),
'id' => 'revision_moderation',
'table' => 'node',
'field' => 'revision_moderation',
'relationship' => 'none',
),
'state' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'state_op',
'identifier' => 'state',
'label' => 'Node: State',
'optional' => 1,
'single' => 0,
'remember' => 0,
'reduce' => 0,
),
'id' => 'state',
'table' => 'node',
'field' => 'state',
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'role',
'role' => array(
'2' => 2,
),
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('header', 'Summary of site content');
$handler
->override_option('header_format', '2');
$handler
->override_option('header_empty', 0);
$handler
->override_option('empty', 'No content matches your query.');
$handler
->override_option('empty_format', '2');
$handler
->override_option('items_per_page', 20);
$handler
->override_option('use_pager', '1');
$handler
->override_option('style_plugin', 'table');
$handler
->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'title' => 'title',
'type' => 'type',
'changed' => 'changed',
'name' => 'name',
'number_of_revisions' => 'number_of_revisions',
'state' => 'state',
'view_node' => 'view_node',
'edit_node' => 'edit_node',
'timestamp' => 'timestamp',
),
'info' => array(
'title' => array(
'sortable' => 1,
'separator' => '',
),
'type' => array(
'sortable' => 1,
'separator' => '',
),
'changed' => array(
'sortable' => 1,
'separator' => '',
),
'name' => array(
'sortable' => 1,
'separator' => '',
),
'number_of_revisions' => array(
'sortable' => 0,
'separator' => '',
),
'state' => array(
'sortable' => 0,
'separator' => '',
),
'view_node' => array(
'separator' => '',
),
'edit_node' => array(
'separator' => '',
),
'timestamp' => array(
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view
->new_display('page', 'Page', 'page_1');
$handler
->override_option('path', 'content-summary');
$handler
->override_option('menu', array(
'type' => 'normal',
'title' => 'Content summary',
'description' => 'Summary of site content',
'weight' => '3',
'name' => 'navigation',
));
$handler
->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$views[$view->name] = $view;
return $views;
}
Functions
Name | Description |
---|---|
revisioning_views_default_views | Implementation of hook_views_default_views(). |