summaryrefslogtreecommitdiff
path: root/lib/attachmentlist.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-18 10:52:40 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-18 10:52:40 -0700
commitbde571728d5471feeb1d6ae0647b5f09346e6d5c (patch)
tree048cf14b97250e645625c79578f9d1e8c997cf5a /lib/attachmentlist.php
parent65457e73bfc8fe04ad57acce7800cd7640f30e7e (diff)
parent3a0c6d6c6d33bf343c832be3bc38ec85062588c4 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
* '0.8.x' of git@gitorious.org:laconica/dev: Display more oembed info in attachment popup. order notices in a conversation
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 e1726df28..c80c0c418 100644
--- a/lib/attachmentlist.php
+++ b/lib/attachmentlist.php
@@ -243,6 +243,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();
}