You are here

function theme_scs_node_selection in Simplenews Content Selection 6

Same name and namespace in other branches
  1. 6.2 scs.theme.inc \theme_scs_node_selection()

File

./scs.theme.inc, line 11

Code

function theme_scs_node_selection($form) {
  $nodes = _scs_get_nodes();
  $data = array();
  $explain = '';
  if (user_access('administer scs')) {
    $explain = '<div class="form-item">' . t('Want to select more nodes? Add more content types ') . l('here', 'admin/settings/simplenews/scs') . '.' . '</div>';
  }
  foreach ($nodes as $node) {
    $nodearray = array();
    $nodearray[] = drupal_render($form['nid_' . $node->nid]);
    $nodearray[] = $node->nid;
    $nodearray[] = $node->title;
    $nodearray[] = $node->created;
    $data[] = $nodearray;
  }
  $headers = array(
    '',
    t('Nid'),
    t('Title'),
    t('Created'),
  );
  return drupal_render($form['newsletter_title']) . $explain . theme('table', $headers, $data) . drupal_render($form);
}