summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-18 19:21:05 +0000
committerZach Copley <zach@controlyourself.ca>2009-06-18 19:21:05 +0000
commitd3fa832f76c90c194e0a60448ad8c53a043f5438 (patch)
tree2abd3fa2286f3cb13cc8c442f571cf4deeb60095 /lib
parente0fb15c185f4ca81743937c27557c9402ba59071 (diff)
parent23d6d19e75f273bf6e72fbcbbf8e6789f77d07ff (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r--lib/attachmentlist.php62
1 files changed, 35 insertions, 27 deletions
diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php
index c80c0c418..a2446a886 100644
--- a/lib/attachmentlist.php
+++ b/lib/attachmentlist.php
@@ -210,7 +210,7 @@ class AttachmentListItem extends Widget
function showRepresentation() {
$thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
if (!empty($thumbnail)) {
- $this->out->element('img', array('alt' => 'nothing to say', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
+ $this->out->element('img', array('alt' => '', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
}
}
@@ -244,39 +244,47 @@ class AttachmentListItem extends Widget
class Attachment extends AttachmentListItem
{
function showLink() {
+ $this->out->elementStart('div', array('id' => 'attachment_view',
+ 'class' => 'hentry'));
+ $this->out->elementStart('div', 'entry-title');
$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('div');
+
+ if (!empty($this->oembed->author_name) || !empty($this->oembed->provider)) {
+ $this->out->elementStart('div', array('id' => 'oembed_info',
+ 'class' => 'entry-content'));
+ if (!empty($this->oembed->author_name)) {
+ $this->out->elementStart('dl', 'vcard author');
+ $this->out->element('dt', null, _('Author'));
+ $this->out->elementStart('dd', 'fn');
+ if (empty($this->oembed->author_url)) {
+ $this->out->text($this->oembed->author_name);
+ } else {
+ $this->out->element('a', array('href' => $this->oembed->author_url,
+ 'class' => 'url'), $this->oembed->author_name);
+ }
+ $this->out->elementEnd('dd');
+ $this->out->elementEnd('dl');
}
- $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);
+ if (!empty($this->oembed->provider)) {
+ $this->out->elementStart('dl', 'vcard');
+ $this->out->element('dt', null, _('Provider'));
+ $this->out->elementStart('dd', 'fn');
+ if (empty($this->oembed->provider_url)) {
+ $this->out->text($this->oembed->provider);
+ } else {
+ $this->out->element('a', array('href' => $this->oembed->provider_url,
+ 'class' => 'url'), $this->oembed->provider);
+ }
+ $this->out->elementEnd('dd');
+ $this->out->elementEnd('dl');
}
- $this->out->elementEnd('dd');
+ $this->out->elementEnd('div');
}
- $this->out->elementEnd('dl');
+ $this->out->elementEnd('div');
}
function show() {