You are here

function auto_entitylabel_settings_default_page in Automatic Entity Label 7

Administration page.

1 string reference to 'auto_entitylabel_settings_default_page'
auto_entitylabel_menu in ./auto_entitylabel.module
Implements hook_menu().

File

./auto_entitylabel.admin.inc, line 11
Contains administration forms.

Code

function auto_entitylabel_settings_default_page() {
  $content_types = node_type_get_types();
  $markup = '<div>';
  $markup .= '<fieldset>';
  $markup .= '<legend>';
  $markup .= '<span class = "fieldset-legend">';
  $markup .= '<a class = "fieldset-title" href = "#">' . t('Auto Label') . '</a></span>';
  $markup .= '</legend>';
  $markup .= '<div class = "fieldset-wrapper">';
  $markup .= '<div>' . t('Configure Auto Label for Content Type.') . '</div><br>';
  $markup .= '<ul class="admin-list">';
  foreach ($content_types as $content_types_machine_name => $content_type) {
    $content_type_name = $content_type->name;
    $content_types_machine_name = $content_type->type;
    $markup .= '<li class="leaf">';
    $markup .= '<a href="' . base_path() . 'admin/structure/types/manage/' . $content_types_machine_name . '/auto_label">' . $content_type_name . '</a>';
    $markup .= '<div class="description">' . t('AUTOMATIC LABEL GENERATION FOR @content_type_name', array(
      '@content_type_name' => strtoupper($content_type_name),
    )) . '</div>';
    $markup .= '</li>';
  }
  $markup .= '</ul>';
  $markup .= '</div>';
  $markup .= '</fieldset>';
  $markup .= '</div>';
  $markup .= '<div>';
  $markup .= '<fieldset>';
  $markup .= '<legend>';
  $markup .= '<span class = "fieldset-legend">';
  $markup .= '<a class = "fieldset-title" href = "#">' . t('Comment Auto Label') . '</a></span>';
  $markup .= '</legend>';
  $markup .= '<div class = "fieldset-wrapper">';
  $markup .= '<div>' . t('Configure Auto Label for Comments in Content Type.') . '</div><br>';
  $markup .= '<ul class="admin-list">';
  foreach ($content_types as $content_types_machine_name => $content_type) {
    $content_type_name = $content_type->name;
    $content_types_machine_name = $content_type->type;
    $markup .= '<li class="leaf">';
    $markup .= '<a href="' . base_path() . 'admin/structure/types/manage/' . $content_types_machine_name . '/comment/auto_label">' . $content_type_name . '</a>';
    $markup .= '<div class="description">' . t('AUTOMATIC LABEL GENERATION FOR @content_type_name COMMENTS', array(
      '@content_type_name' => strtoupper($content_type_name),
    )) . '</div>';
    $markup .= '</li>';
  }
  $markup .= '</ul>';
  $markup .= '</div>';
  $markup .= '</fieldset>';
  $markup .= '</div>';
  return array(
    '#markup' => $markup,
  );
}