summaryrefslogtreecommitdiff
path: root/lib/attachmentlist.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-06-18 06:02:12 -0400
committerRobin Millette <millette@controlyourself.ca>2009-06-18 06:02:12 -0400
commit65b4cfbb54f5b44820dd02bb9c3c2ca98dbbd321 (patch)
tree2f9bc8588d1e77b1e4ce6896e6b841f5c276437f /lib/attachmentlist.php
parent85b4c24188502ce3f8cef32cfba37ab91c8a648f (diff)
Display more oembed info in attachment popup.
Diffstat (limited to 'lib/attachmentlist.php')
-rw-r--r--lib/attachmentlist.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php
index 45e4fa319..a781c3092 100644
--- a/lib/attachmentlist.php
+++ b/lib/attachmentlist.php
@@ -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();
}