You are here

function picture_admin_breakpoints_overview_page in Picture 7

Admin form overview page.

1 call to picture_admin_breakpoints_overview_page()
picture_admin_breakpoints in ./picture.admin.inc
Admin form.

File

./picture.admin.inc, line 96
Picture - map breakpoints and image styles

Code

function picture_admin_breakpoints_overview_page() {
  $links = array();
  $breakpoint_groups = breakpoints_breakpoint_group_load_all();
  foreach ($breakpoint_groups as $breakpoint_group) {
    $links[] = l($breakpoint_group->name, 'admin/config/media/picture/groups/' . $breakpoint_group->machine_name);
  }
  if (!empty($links)) {
    return array(
      '#type' => 'container',
      '#theme' => 'item_list',
      '#items' => $links,
    );
  }
  else {
    $item['info'] = array(
      '#type' => 'markup',
      '#title' => t('No breakpoint groups found.'),
      '#markup' => t('There\'re no breakpoint groups defined, you\'ll have to !create them first.', array(
        '!create' => l(t('create'), 'admin/config/media/breakpoints/groups/add'),
      )),
    );
    return $item;
  }
}