You are here

function gallery_assist_form_help_links in Gallery Assist 6

4 calls to gallery_assist_form_help_links()
gallery_assist_ui_gallery_settings in modules/gallery_assist_ui/gallery_assist_ui.module
gallery_assist_ui_ga_items_form in modules/gallery_assist_ui/gallery_assist_ui.module
gallery_assist_ui_sorting_items in modules/gallery_assist_ui/gallery_assist_ui.module
Prepare the images for sorting through jquery.ui sorteable functionality.
_get_ga_form in ./gallery_assist.module

File

./gallery_assist.module, line 5876
Drupal content type with gallery functionality.

Code

function gallery_assist_form_help_links($node) {
  $form = array();
  $iu = $node->uid > 0 && $user->uid > 0 ? 1 : '';
  if ($iu > 0 && $node->uid == 1 || user_access('administer gallery_assist') || user_access('administer_gallery assist_' . $node->type)) {
    if ($node->type == 'gallery_assist') {
      $myPath = 'gallery_assist/assignments';
    }
    elseif (variable_get('gallery_assist_' . $node->type, 0) == 1) {
      $myPath = 'gallery_assist/assignments/' . $node->type;
    }
  }
  $node_type_name = node_get_types('type', $node->type);
  $markup_value = t('Edit the settings from Gallery Assist for this content type -> <a href="@myPath">%contenType</a>', array(
    '@myPath' => url('admin/settings/' . $myPath),
    '%contenType' => $node_type_name->name,
  ));
  $form['assignment_settings_link'] = array(
    '#type' => 'markup',
    '#value' => '<div id="ga-devel-by">' . $markup_value . '</div>',
    '#weight' => -100,
    '#access' => user_access('administer gallery_assist', $user) || user_access('administer gallery_assist_' . $node->type, $user) ? TRUE : FALSE,
  );
  return $form;
}