Returns HTML for the page containing the list of image styles.
$variables: An associative array containing:
image_get_styles()
function theme_image_style_list($variables) {
$styles = $variables['styles'];
$header = array(
t('Style name'),
t('Operations'),
);
$rows = array();
foreach ($styles as $style) {
$row = array();
$row[] = l($style
->label(), 'admin/config/media/image-styles/manage/' . $style
->id());
$links = array();
$links['edit'] = array(
'title' => t('edit'),
'href' => 'admin/config/media/image-styles/manage/' . $style
->id(),
'class' => array(
'image-style-link',
),
);
$links['delete'] = array(
'title' => t('delete'),
'href' => 'admin/config/media/image-styles/manage/' . $style
->id() . '/delete',
'class' => array(
'image-style-link',
),
);
$row[] = array(
'data' => array(
'#type' => 'operations',
'#links' => $links,
),
);
$rows[] = $row;
}
if (empty($rows)) {
$rows[] = array(
array(
'colspan' => 4,
'data' => t('There are currently no styles. <a href="!url">Add a new one</a>.', array(
'!url' => url('admin/config/media/image-styles/add'),
)),
),
);
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
));
}