summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsarven <csarven@plantard.controlezvous.ca>2009-01-21 05:27:16 +0000
committersarven <csarven@plantard.controlezvous.ca>2009-01-21 05:27:16 +0000
commit9376003871652300b5960437fd37461fdd85e63b (patch)
treed94316647c88f1a3a96709c4a16dc3d8a8ce5ef0 /lib
parentf76b565c16151bc766343c054a4e958cb1f22a61 (diff)
Mailbox markup for Inbox/Outbox direct notices
Please enter the commit message for your changes.
Diffstat (limited to 'lib')
-rw-r--r--lib/mailbox.php64
-rw-r--r--lib/noticelist.php4
2 files changed, 45 insertions, 23 deletions
diff --git a/lib/mailbox.php b/lib/mailbox.php
index 9af0dbd2f..8d5d44e49 100644
--- a/lib/mailbox.php
+++ b/lib/mailbox.php
@@ -111,9 +111,10 @@ class MailboxAction extends PersonalAction
$message = $this->getMessages();
if ($message) {
-
$cnt = 0;
- $this->elementStart('ul', array('id' => 'messages'));
+ $this->elementStart('div', array('id' =>'notices_primary'));
+ $this->element('h2', null, _('Notices'));
+ $this->elementStart('ul', 'notices');
while ($message->fetch() && $cnt <= MESSAGES_PER_PAGE) {
$cnt++;
@@ -130,7 +131,7 @@ class MailboxAction extends PersonalAction
$this->pagination($this->page > 1, $cnt > MESSAGES_PER_PAGE,
$this->page, $this->trimmed('action'),
array('nickname' => $this->user->nickname));
-
+ $this->elementEnd('div');
$message->free();
unset($message);
}
@@ -169,30 +170,35 @@ class MailboxAction extends PersonalAction
function showMessage($message)
{
- $this->elementStart('li', array('class' => 'message_single',
+ $this->elementStart('li', array('class' => 'hentry notice',
'id' => 'message-' . $message->id));
$profile = $this->getMessageProfile($message);
+ $this->elementStart('div', 'entry-title');
+ $this->elementStart('span', 'vcard author');
+ $this->elementStart('a', array('href' => $profile->profileurl,
+ 'class' => 'url'));
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
- $this->elementStart('a', array('href' => $profile->profileurl));
$this->element('img', array('src' => ($avatar) ?
common_avatar_display_url($avatar) :
common_default_avatar(AVATAR_STREAM_SIZE),
- 'class' => 'avatar stream',
+ 'class' => 'photo avatar',
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'alt' =>
($profile->fullname) ? $profile->fullname :
$profile->nickname));
+ $this->element('span', array('class' => 'nickname fn'),
+ $profile->nickname);
$this->elementEnd('a');
- $this->element('a', array('href' => $profile->profileurl,
- 'class' => 'nickname'),
- $profile->nickname);
+ $this->elementEnd('span');
+
// FIXME: URL, image, video, audio
- $this->elementStart('p', array('class' => 'content'));
+ $this->elementStart('p', array('class' => 'entry-content'));
$this->raw($message->rendered);
$this->elementEnd('p');
+ $this->elementEnd('div');
$messageurl = common_local_url('showmessage',
array('message' => $message->id));
@@ -202,17 +208,30 @@ class MailboxAction extends PersonalAction
preg_match('/^http/', $message->uri)) {
$messageurl = $message->uri;
}
- $this->elementStart('p', 'time');
- $this->element('a', array('class' => 'permalink',
- 'href' => $messageurl,
- 'title' => common_exact_date($message->created)),
- common_date_string($message->created));
+
+ $this->elementStart('div', 'entry-content');
+ $this->elementStart('dl', 'timestamp');
+ $this->element('dt', null, _('Published'));
+ $this->elementStart('dd', null);
+ $dt = common_date_iso8601($message->created);
+ $this->elementStart('a', array('rel' => 'bookmark',
+ 'href' => $messageurl));
+ $this->element('abbr', array('class' => 'published',
+ 'title' => $dt),
+ common_date_string($message->created));
+ $this->elementEnd('a');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+
if ($message->source) {
- $this->text(_(' from '));
+ $this->elementStart('dl', 'device');
+ $this->elementStart('dt');
+ $this->text(_('From'));
+ $this->elementEnd('dt');
$this->showSource($message->source);
+ $this->elementEnd('dl');
}
-
- $this->elementEnd('p');
+ $this->elementEnd('div');
$this->elementEnd('li');
}
@@ -255,15 +274,18 @@ class MailboxAction extends PersonalAction
case 'mail':
case 'omb':
case 'api':
- $this->element('span', 'noticesource', $source_name);
+ $this->element('dd', null, $source_name);
break;
default:
$ns = Notice_source::staticGet($source);
if ($ns) {
- $this->element('a', array('href' => $ns->url),
+ $this->elementStart('dd', null);
+ $this->element('a', array('href' => $ns->url,
+ 'rel' => 'external'),
$ns->name);
+ $this->elementEnd('dd');
} else {
- $this->element('span', 'noticesource', $source_name);
+ $this->element('dd', null, $source_name);
}
break;
}
diff --git a/lib/noticelist.php b/lib/noticelist.php
index c57d6ce19..07912c552 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -379,7 +379,7 @@ class NoticeListItem extends Widget
case 'mail':
case 'omb':
case 'api':
- $this->out->element('dd', 'noticesource', $source_name);
+ $this->out->element('dd', null, $source_name);
break;
default:
$ns = Notice_source::staticGet($this->notice->source);
@@ -390,7 +390,7 @@ class NoticeListItem extends Widget
$ns->name);
$this->out->elementEnd('dd');
} else {
- $this->out->element('dd', 'noticesource', $source_name);
+ $this->out->element('dd', null, $source_name);
}
break;
}