function imagepicker_groups in Image Picker 7
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_groups()
- 5 imagepicker.module \imagepicker_groups()
- 6.2 imagepicker.group.inc \imagepicker_groups()
@file @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
contains the functions for group management
1 call to imagepicker_groups()
File
- ./
imagepicker.group.inc, line 11 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function imagepicker_groups() {
$imagepicker_jspaths = imagepicker_jspaths_get();
drupal_add_js($imagepicker_jspaths['imagepicker_jspath']);
$content = '';
// from iframe
if (!arg(2)) {
$content .= imagepicker_groups_list();
$form = drupal_get_form('imagepicker_groups_form');
$content .= render($form);
}
elseif (arg(2) == 'edit') {
$record = imagepicker_get_user_group(arg(3));
$form = drupal_get_form('imagepicker_groups_form', $record);
$content .= render($form);
}
elseif (arg(2) == 'delete') {
$form = drupal_get_form('imagepicker_group_delete_form', arg(3));
$content .= render($form);
}
elseif (is_numeric(arg(2)) && arg(2) > 0) {
imagepicker_set_user_group_state(1, arg(2));
drupal_goto('imagepicker/browse');
}
return theme('imagepicker_iframe', array(
'content' => $content,
));
}