You are here

function _breakpoints_admin_breakpoints_table_row in Breakpoints 7

Helper callback for theme_breakpoints_admin_breakpoints_table().

1 call to _breakpoints_admin_breakpoints_table_row()
theme_breakpoints_admin_breakpoints_table in ./breakpoints.admin.inc
Theme form as table.

File

./breakpoints.admin.inc, line 377
Breakpoints - admin settings

Code

function _breakpoints_admin_breakpoints_table_row(&$element, $key, $global) {
  $row = array();
  $link_attributes = array(
    'attributes' => array(
      'class' => array(
        'image-style-link',
      ),
    ),
  );
  $breakpoint = $element['#breakpoint_data'];
  $element['weight']['#attributes']['class'] = array(
    'breakpoints-weight',
  );
  $row[] = drupal_render($element['name']);
  $row[] = '';
  $row[] = drupal_render($element['breakpoint']);
  $row[] = drupal_render($element['multipliers']);
  $row[] = $breakpoint->source . ' (' . $breakpoint->source_type . ')';
  $row[] = $breakpoint->status ? t('Enabled') : t('Disabled');
  if ($global) {
    $row[] = l($breakpoint->status ? t('Disable') : t('Enable'), 'admin/config/media/breakpoints/' . ($breakpoint->status ? 'disable' : 'enable') . '/' . $key, $link_attributes);
    $row[] = $breakpoint->source_type == BREAKPOINTS_SOURCE_TYPE_CUSTOM ? l(t('Delete'), 'admin/config/media/breakpoints/delete/' . $key, $link_attributes) : '';
    $row[] = l(t('Export'), 'admin/config/media/breakpoints/export/' . $key, $link_attributes);
  }
  $row[] = drupal_render($element['weight']);
  return $row;
}