4 * Plugins are described by creating a $plugin array which will be used
5 * by the system that includes this file.
9 'title' => t('Attached files'),
10 'icon' => 'icon_node.png',
11 'description' => t('A list of files attached to the node.'),
12 'required context' => new
ctools_context_required(t('Node'), 'node'),
13 'category' => t('Node'),
16 function ctools_node_attachments_content_type_render($subtype, $conf, $panel_args, $context) {
17 $node = isset($context->data
) ?
clone($context->data
) : NULL
;
18 $block = new
stdClass();
19 $block->module
= 'attachments';
21 $block->title
= t('Attached files');
23 if (!empty($node->files
)) {
24 $block->content
= theme('upload_attachments', $node->files
);
26 $block->delta
= $node->nid
;
29 $block->content
= t('Attached files go here.');
30 $block->delta
= 'unknown';
36 function ctools_node_attachments_content_type_admin_title($subtype, $conf, $context) {
37 return t('"@s" attachments', array('@s' => $context->identifier
));
40 function ctools_node_attachments_content_type_edit_form($form, &$form_state) {
41 // provide a blank form so we have a place to have context setting.