webform-results-submissions.tpl.php in Webform CiviCRM Integration 7
File
webform-results-submissions.tpl.php
View source
<?php
if (count($table['#rows']) && !empty($node->webform_civicrm)) {
$access = user_access('access CiviCRM');
foreach ($table['#rows'] as &$row) {
if (!empty($submissions[$row[0]]->civicrm['contact_id']) && !empty($submissions[$row[0]]->civicrm['display_name'])) {
if ($access) {
$row[2] = l($submissions[$row[0]]->civicrm['display_name'], 'civicrm/contact/view', array(
'query' => array(
'cid' => $submissions[$row[0]]->civicrm['contact_id'],
'reset' => 1,
),
));
}
else {
$row[2] = $submissions[$row[0]]->civicrm['display_name'];
}
}
}
}
if (count($table['#rows'])) {
?>
<?php
print theme('webform_results_per_page', array(
'total_count' => $total_count,
'pager_count' => $pager_count,
));
?>
<?php
print render($table);
}
else {
?>
<?php
print t('There are no submissions for this form. <a href="!url">View this form</a>.', array(
'!url' => url('node/' . $node->nid),
));
}
?>
<?php
if ($is_submissions) {
?>
<?php
print theme('links', array(
'links' => array(
'webform' => array(
'title' => t('Go back to the form'),
'href' => 'node/' . $node->nid,
),
),
));
}
?>
<?php
if ($pager_count) {
?>
<?php
print theme('pager', array(
'limit' => $pager_count,
));
}