Storm, the main SuiteDesk module
This commit is contained in:
parent
82d3282b44
commit
bcf9ace539
422 changed files with 62462 additions and 0 deletions
58
sites/all/modules/storm/stormidea/stormidea.theme.inc
Normal file
58
sites/all/modules/storm/stormidea/stormidea.theme.inc
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
|
||||
function theme_stormidea_list($header, $ideas) {
|
||||
$rows = array();
|
||||
|
||||
foreach ($ideas as $idea) {
|
||||
$rows[] = array(
|
||||
'<span class="idea-title">' . l($idea->title, 'node/'. $idea->nid) . theme('mark', node_mark($idea->nid, $idea->changed)) . '</span>',
|
||||
format_date($idea->changed, 'small'),
|
||||
array(
|
||||
'data' => storm_icon_edit_node($idea, $_GET) . storm_icon_delete_node($idea, $_GET),
|
||||
'class' => 'storm_list_operations',
|
||||
),
|
||||
);
|
||||
}
|
||||
$o = theme('table', $header, $rows, array('id' => 'stormideas'));
|
||||
return $o;
|
||||
}
|
||||
|
||||
function theme_stormidea_view($node, $teaser = FALSE, $page = FALSE) {
|
||||
drupal_add_css(drupal_get_path('module', 'storm') . '/storm-node.css', 'module');
|
||||
|
||||
$node = node_prepare($node, $teaser);
|
||||
$l_pos = 1; // Used to increase the link position number (see issue 814820)
|
||||
|
||||
$node->content['links'] = array(
|
||||
'#prefix' => '<div class="stormlinks"><dl>',
|
||||
'#suffix' => '</dl></div>',
|
||||
'#weight' => $l_pos++,
|
||||
);
|
||||
$node->content['group1'] = array(
|
||||
'#prefix' => '<div class="stormfields">',
|
||||
'#suffix' => '</div>',
|
||||
'#weight' => module_exists('content') ? content_extra_field_weight($node->type, 'group1') : -20,
|
||||
);
|
||||
$node->content['group1']['created'] = array(
|
||||
'#prefix' => '<div class="created">',
|
||||
'#suffix' => '</div>',
|
||||
'#value' => theme('storm_view_item', t('Note created'), format_date($node->created, 'small')),
|
||||
'#weight' => 12,
|
||||
);
|
||||
if ($node->changed != $node->created) {
|
||||
$node->content['group1']['modified'] = array(
|
||||
'#prefix' => '<div class="created">',
|
||||
'#suffix' => '</div>',
|
||||
'#value' => theme('storm_view_item', t('Note updated'), format_date($node->changed, 'small')),
|
||||
'#weight' => 13,
|
||||
);
|
||||
}
|
||||
|
||||
unset($node->content['body']);
|
||||
|
||||
return $node;
|
||||
}
|
Reference in a new issue