Révision 3753f249
Ajouté par Assos Assos il y a plus de 10 ans
htmltest/sites/all/modules/webform/includes/webform.admin.inc | ||
---|---|---|
220 | 220 |
* Menu callback for admin/content/webform. Displays all webforms on the site. |
221 | 221 |
*/ |
222 | 222 |
function webform_admin_content() { |
223 |
$webform_types = webform_variable_get('webform_node_types'); |
|
224 |
|
|
225 |
$nodes = array(); |
|
226 |
if ($webform_types) { |
|
227 |
$nodes = db_select('node', 'n') |
|
228 |
->fields('n') |
|
229 |
->condition('n.type', $webform_types, 'IN') |
|
230 |
->execute() |
|
231 |
->fetchAllAssoc('nid'); |
|
232 |
} |
|
233 |
|
|
223 |
$query = db_select('webform', 'w'); |
|
224 |
$query->join('node', 'n', 'w.nid = n.nid'); |
|
225 |
$query->fields('n'); |
|
226 |
$nodes = $query->execute()->fetchAllAssoc('nid'); |
|
234 | 227 |
return theme('webform_admin_content', array('nodes' => $nodes)); |
235 | 228 |
} |
236 | 229 |
|
... | ... | |
262 | 255 |
$header = array( |
263 | 256 |
t('Title'), |
264 | 257 |
array('data' => t('View'), 'colspan' => '4'), |
265 |
array('data' => t('Operations'), 'colspan' => '2')
|
|
258 |
array('data' => t('Operations'), 'colspan' => '3')
|
|
266 | 259 |
); |
267 | 260 |
|
268 | 261 |
$rows = array(); |
... | ... | |
274 | 267 |
l(t('Table'), 'node/' . $node->nid . '/webform-results/table'), |
275 | 268 |
l(t('Download'), 'node/' . $node->nid . '/webform-results/download'), |
276 | 269 |
node_access('update', $node) ? l(t('Edit'), 'node/' . $node->nid . '/edit') : '', |
270 |
node_access('update', $node) ? l(t('Components'), 'node/' . $node->nid . '/webform') : '', |
|
277 | 271 |
user_access('delete all webform submissions') ? l(t('Clear'), 'node/' . $node->nid . '/webform-results/clear') : '', |
278 | 272 |
); |
279 | 273 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules