function theme_pardot_admin_campaign in Pardot Integration 7
Same name and namespace in other branches
- 6 pardot.admin-campaign.inc \theme_pardot_admin_campaign()
- 7.2 pardot.admin-campaign.inc \theme_pardot_admin_campaign()
Theme callback for pardot_admin_campaign.
See also
File
- ./
pardot.admin-campaign.inc, line 95 - Admin campaign form.
Code
function theme_pardot_admin_campaign($variables) {
$form = $variables['form'];
if (isset($form['campaigns'])) {
foreach (element_children($form['campaigns']) as $id) {
$row = array();
$row[] = drupal_render($form['campaigns'][$id]['campaign_id']);
$row[] = drupal_render($form['campaigns'][$id]['name']);
$row[] = drupal_render($form['campaigns'][$id]['paths']);
$ops = array();
$ops[] = l(t('Edit'), 'admin/config/services/pardot/campaign/' . $form['campaigns'][$id]['#campaign']->campaign_id . '/edit');
$ops[] = l(t('Delete'), 'admin/config/services/pardot/campaign/' . $form['campaigns'][$id]['#campaign']->campaign_id . '/delete');
$row[] = implode(' | ', $ops);
$rows[] = $row;
}
}
$rows[] = array(
drupal_render($form['new']['campaign_id']),
//theme(pardot_admin_campaign_textfield, $form['new']['campaign_id']),
//_pardot_render_td_description($form['new']['campaign_id']),
drupal_render($form['new']['name']),
drupal_render($form['new']['paths']),
drupal_render($form['add']),
);
$headers = array(
t('Campaign ID'),
t('Name'),
t('Path'),
t('Operations'),
);
$output = theme('table', array(
'header' => $headers,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}