function photos_edit_page in Album Photos 7.3
Same name and namespace in other branches
- 6.2 inc/photos.edit.inc \photos_edit_page()
Image management.
1 string reference to 'photos_edit_page'
- photos_menu in ./
photos.module - Implements hook_menu().
File
- inc/
photos.edit.inc, line 275 - Handles uploading and editing images.
Code
function photos_edit_page($node) {
$output = '';
if (isset($_POST['ajax'])) {
// Reload photos editlist form after uploading new photos.
$nid = $node->nid;
$images = _photos_edit_page_album_images($nid);
$output .= _photos_prep_editlist($images);
print $output;
drupal_exit();
}
if ($node->type == 'photos') {
$edit_form = drupal_get_form('photos_upload_form', $node, array(
'submit' => TRUE,
));
$output = '<div id="photos_upload_new">' . drupal_render($edit_form) . '</div>';
$output .= _photos_edit_page_album($node);
$page_title = t('Organize Albums: @title', array(
'@title' => $node->title,
));
drupal_set_title($page_title, PASS_THROUGH);
}
else {
$edit_form = drupal_get_form('photos_upload_form', $node, array(
'submit' => TRUE,
));
$output = '<div id="photos_upload_new">' . drupal_render($edit_form) . '</div>';
$output .= _photos_edit_page_node($node);
$page_title = t('Organize Sub-Album: @title', array(
'@title' => $node->title,
));
drupal_set_title($page_title, PASS_THROUGH);
}
return $output;
}