/**
*/
protected function _content()
{
$GLOBALS['page_output']->addScriptFile('block.js');
/* Get the top level galleries */
try {
$galleries = $GLOBALS['injector']->getInstance('Ansel_Storage')->listGalleries(array('perm' => Horde_Perms::EDIT, 'attributes' => $GLOBALS['registry']->getAuth(), 'all_levels' => false, 'count' => empty($this->_params['limit']) ? 0 : $this->_params['limit'], 'sort_by' => 'last_modified', 'direction' => Ansel::SORT_DESCENDING));
} catch (Ansel_Exception $e) {
return $e->getMessage();
}
$header = array(_("Gallery Name"), _("Last Modified"), _("Photo Count"));
$html = <<<HEADER
<table class="linedRow" cellspacing="0" style="width:100%">
<thead><tr class="item nowrap">
<th class="item leftAlign">{$header['0']}</th>
<th class="item leftAlign">{$header['1']}</th>
<th class="item leftAlign">{$header['2']}</th>
</tr></thead>
<tbody>
HEADER;
foreach ($galleries as $gallery) {
$url = Ansel::getUrlFor('view', array('view' => 'Gallery', 'slug' => $gallery->get('slug'), 'gallery' => $gallery->id), true);
$html .= '<tr><td>' . $url->link(array('onmouseout' => '$("ansel_preview").hide();$("ansel_preview").update("");', 'onmouseover' => 'Ansel.previewImage(event, ' . $gallery->getKeyImage(Ansel::getStyleDefinition('ansel_default')) . ');')) . htmlspecialchars($gallery->get('name')) . '</a></td><td>' . strftime($GLOBALS['prefs']->getValue('date_format'), $gallery->get('last_modified')) . '</td><td>' . (int) $gallery->countImages(true) . '</td></tr>';
}
$html .= '</tbody></table>';
return $html;
}