views_footer.inc in Chaos Tool Suite (ctools) 7
File
views_content/plugins/content_types/views_footer.inc
View source
<?php
$plugin = array(
'title' => t('View footer'),
'category' => t('View context'),
'icon' => 'icon_views_page.png',
'description' => t('Display the view footer if there are no results.'),
'required context' => new ctools_context_required(t('View'), 'view'),
);
function views_content_views_footer_content_type_render($subtype, $conf, $panel_args, $context) {
if (empty($context) || empty($context->data)) {
return;
}
$block = new stdClass();
$block->module = 'views_footer';
$block->delta = $context->argument;
$block->title = '';
$block->content = '';
$output = views_content_context_get_output($context);
$block->content = $output['footer'];
return $block;
}
function views_content_views_footer_content_type_edit_form($form, &$form_state) {
return $form;
}
function views_content_views_footer_content_type_edit_form_submit(&$form, &$form_state) {
}
function views_content_views_footer_content_type_admin_title($subtype, $conf, $context) {
return t('"@context" footer', array(
'@context' => $context->identifier,
));
}