Display more oembed info in attachment popup.

This commit is contained in:
Robin Millette 2009-06-18 06:02:12 -04:00
parent 85b4c24188
commit 65b4cfbb54
2 changed files with 42 additions and 0 deletions

View File

@ -244,6 +244,42 @@ class AttachmentListItem extends Widget
class Attachment extends AttachmentListItem
{
function showLink() {
$this->out->elementStart('a', $this->linkAttr());
$this->out->element('span', null, $this->linkTitle());
$this->showRepresentation();
$this->out->elementEnd('a');
if (empty($this->oembed->author_name) && empty($this->oembed->provider)) {
return;
}
$this->out->elementStart('dl', 'oembed_info');
if (!empty($this->oembed->author_name)) {
$this->out->element('dt', null, _('Author:'));
$this->out->elementStart('dd');
if (empty($this->oembed->author_url)) {
$this->out->text($this->oembed->author_name);
} else {
$this->out->element('a', array('href' => $this->oembed->author_url), $this->oembed->author_name);
}
$this->out->elementEnd('dd');
}
if (!empty($this->oembed->provider)) {
$this->out->element('dt', null, _('Provider:'));
$this->out->elementStart('dd');
if (empty($this->oembed->provider_url)) {
$this->out->text($this->oembed->provider);
} else {
$this->out->element('a', array('href' => $this->oembed->provider_url), $this->oembed->provider);
}
$this->out->elementEnd('dd');
}
$this->out->elementEnd('dl');
}
function show() {
$this->showNoticeAttachment();
}

View File

@ -1276,3 +1276,9 @@ display:none;
.guide {
clear:both;
}
dl.oembed_info dt,
dl.oembed_info dd {
display: inline;
}