| 1 |
<?php |
<?php |
| 2 |
// $Id: signit.module,v 1.5.2.22 2007/11/28 01:45:46 arthuregg Exp $ |
// $Id: signit.module,v 1.5.2.23 2007/11/28 18:08:29 arthuregg Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 94 |
'access' => user_access('view signit comments'), |
'access' => user_access('view signit comments'), |
| 95 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 96 |
); |
); |
| 97 |
|
|
| 98 |
|
// put signatures in a tab on the node |
| 99 |
|
$items[] = array( |
| 100 |
|
'path' => 'node/'. arg(1) .'/signatures', |
| 101 |
|
'callback' => 'signit_view_signit_comments', |
| 102 |
|
'title' => t('Signatures'), |
| 103 |
|
'callback arguments' => arg(1), |
| 104 |
|
'access' => user_access('view signit comments'), |
| 105 |
|
'weight' => 1, |
| 106 |
|
'type' => MENU_LOCAL_TASK |
| 107 |
|
); |
| 108 |
|
|
| 109 |
// admin individual signit |
// admin individual signit |
| 110 |
$items[] = array( |
$items[] = array( |
| 1488 |
* @ TODO integrate civicrm functionality here |
* @ TODO integrate civicrm functionality here |
| 1489 |
*/ |
*/ |
| 1490 |
function signit_results_signatures_csv($nid) { |
function signit_results_signatures_csv($nid) { |
| 1491 |
|
|
| 1492 |
// set up headers for the table |
// set up headers for the table |
| 1493 |
$headers = array( |
$headers = array( |
| 1494 |
t('First name'), |
t('First name'), |
| 1855 |
$output = t('!count people have signed this node. ', array('!count' => $count)); |
$output = t('!count people have signed this node. ', array('!count' => $count)); |
| 1856 |
$output .= t('Our goal is !goal. ', array('!goal' => $node->signit['goal']) ); |
$output .= t('Our goal is !goal. ', array('!goal' => $node->signit['goal']) ); |
| 1857 |
if (user_access('view signature comments')) { |
if (user_access('view signature comments')) { |
| 1858 |
$output .= l(t('View all signatures'), "signit/view/" . $node->nid); |
$output .= l(t('View all signatures'), 'node/' . $node->nid .'/signatures'); |
| 1859 |
} |
} |
| 1860 |
} |
} |
| 1861 |
return $output; |
return $output; |