1 layout.theme.inc theme_layout_info($variables)

Outputs information about a layout. Used in the layout listing page.

Parameters

$variables: An array with a single value: "layout", which contains the layout object.

Return value

string:

File

core/modules/layout/layout.theme.inc, line 48
Theme functions for the Layout module.

Code

function theme_layout_info($variables) {
  $layout = $variables['layout'];
  $info = layout_get_layout_template_info($layout->layout_template);

  // Build template thumbnail preview
  $preview_path = $info['path'] . '/' . $info['preview'];
  $preview_img = theme('image', array('path' => $preview_path));
  $preview = l($preview_img, 'admin/structure/layouts/manage/' . $layout->name, array('html' => TRUE));

  // Create a link to the settings page
  $template = l($info['title'], 'admin/structure/layouts/manage/' . $layout->name . '/configure');

  $output = '';
  $output .= '<div class="layout-info">';
  $output .= $preview;
  $output .= '<div class="layout-detail">';
  $output .= '  <div class="layout-title">' . check_plain($layout->title) . '</div>';
  $output .= '  <div class="layout-template description">' . t('<span class="priority-low">Template: </span>!title', array('!title' => $template)) . '</div>';
  $output .= '</div></div>';

  return $output;
}