/** * Returns a table with some info and a thumbnail from a record * * @param array $row Record array * @param string $extraContentLeft Extra HTML content for left column * @param string $extraContentMiddle Extra HTML content for middle column * @param string $extraContentRight Extra HTML content for right column * @return string HTML content */ function getRecordInfoHeader($row, $extraContentLeft = '', $extraContentMiddle = '', $extraContentRight = '') { global $LANG; $content = ''; $icon = tx_dam_guiFunc::getMediaTypeIconBox($row); $content .= ' <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="1%" align="center">' . $icon . '<br />' . $extraContentLeft . '</td> <td valign="top" align="left" style="padding-left:20px;">'; if (isset($row['title'])) { $content .= '<div class="tableRow"><strong>' . $LANG->sL('LLL:EXT:lang/locallang_general.xml:LGL.title', 1) . '</strong><br />' . tx_dam_guiFunc::tools_insertWordBreak(htmlspecialchars($row['title']), 35) . '</div>'; } $content .= '<div class="tableRow"><strong>' . $LANG->sL('LLL:EXT:dam/locallang_db.xml:tx_dam_item.file_name', 1) . '</strong><br />' . tx_dam_guiFunc::tools_insertWordBreak(htmlspecialchars($row['file_name']), 35) . '</div>'; $content .= '<div class="tableRow"><strong>' . $LANG->sL('LLL:EXT:dam/locallang_db.xml:tx_dam_item.file_path', 1) . '</strong><br />' . str_replace('/', '/<wbr>', htmlspecialchars($row['file_path'])) . '</div>'; if ($row['media_type'] == TXDAM_mtype_image) { $out = ''; $out .= $row['hpixels'] ? $row['hpixels'] . 'x' . $row['vpixels'] . ' px, ' : ''; $out .= t3lib_div::formatSize($row['file_size']); $out .= $row['color_space'] ? ', ' . $LANG->sL(tx_dam_guifunc::getLabelFromItemlist('tx_dam', 'color_space', $row['color_space'])) : ''; $content .= '<div class="tableRow"><nobr>' . htmlspecialchars($out) . '</nobr></div>'; } $content .= $extraContentMiddle . ' </td>'; $thumb = tx_dam_guiFunc::getDia($row, 115, 5, $showElements = '', $onClick = NULL, $makeIcon = FALSE); $content .= ' <td valign="top" width="1%" class="extraContentRight">' . $thumb . $extraContentRight . '</td>'; $content .= ' </tr> </table>'; return '<div class="recordInfoHeader">' . $content . '</div>'; }