You are here

function theme_amazon_item__dvd in Amazon Product Advertisement API 6

Same name and namespace in other branches
  1. 7.2 amazon_media/amazon_media.module \theme_amazon_item__dvd()
  2. 7 amazon_media/amazon_media.module \theme_amazon_item__dvd()

File

amazon_media/amazon_media.theme.inc, line 3

Code

function theme_amazon_item__dvd($item, $style = 'default') {
  $output = '';
  switch ($style) {
    case 'full':
      $output .= '<div class="' . _amazon_item_classes($item) . ' amazon-item-full">';
      $output .= theme('image', $item['imagesets']['mediumimage']['url'], t('Cover image'), check_markup($item['title']), NULL, FALSE);
      $output .= '<h3>' . l(check_plain($item['title']), $item['detailpageurl'], array(
        'attributes' => array(
          'rel' => 'nofollow',
        ),
      )) . '</h3>';
      $output .= '</div>';
      break;
    case 'thumbnail':
      $output .= '<div class="' . _amazon_item_classes($item) . ' amazon-item-thumbnail">';
      $output .= theme('image', $item['imagesets']['mediumimage']['url'], t('Cover image'), check_markup($item['title']), NULL, FALSE);
      $output .= '</div>';
      break;
    default:
      $output .= '<div class="' . _amazon_item_classes($item) . '">';
      $output .= theme('image', $item['imagesets']['smallimage']['url'], t('Cover image'), check_markup($item['title']), NULL, FALSE);
      $date = split('-', $item['theatricalreleasedate']);
      $output .= '<h3>' . l(check_markup($item['title']), $item['detailpageurl'], array(
        'attributes' => array(
          'rel' => 'nofollow',
        ),
      )) . ' (' . check_plain($date[0]) . ')</h3>';
      $output .= '<div><strong>' . t('Director') . ':</strong> ' . implode(', ', $item['director']) . '</div>';
      $output .= '<div><strong>' . t('Rating') . ':</strong> ' . $item['audiencerating'] . '</div>';
      $output .= '<div><strong>' . t('Running time') . ':</strong> ' . $item['runningtime'] . ' ' . t('minutes') . '</div>';
      $output .= '</div>';
      break;
  }
  return $output;
}