summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/invite.php15
-rw-r--r--actions/noticesearch.php77
-rw-r--r--actions/showstream.php8
-rw-r--r--actions/twittersettings.php29
-rw-r--r--actions/usergroups.php4
5 files changed, 90 insertions, 43 deletions
diff --git a/actions/invite.php b/actions/invite.php
index f4ad2f7c5..df6e3b714 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -167,20 +167,27 @@ class InviteAction extends Action
function showInviteForm()
{
$this->elementStart('form', array('method' => 'post',
- 'id' => 'invite',
+ 'id' => 'form_invite',
+ 'class' => 'form_settings',
'action' => common_local_url('invite')));
+ $this->elementStart('fieldset');
+ $this->element('legend', null, 'Send an invitation');
$this->hidden('token', common_session_token());
+ $this->elementStart('ul', 'form_data');
+ $this->elementStart('li');
$this->textarea('addresses', _('Email addresses'),
$this->trimmed('addresses'),
_('Addresses of friends to invite (one per line)'));
-
+ $this->elementEnd('li');
+ $this->elementStart('li');
$this->textarea('personal', _('Personal message'),
$this->trimmed('personal'),
_('Optionally add a personal message to the invitation.'));
-
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
$this->submit('send', _('Send'));
-
+ $this->elementEnd('fieldset');
$this->elementEnd('form');
}
diff --git a/actions/noticesearch.php b/actions/noticesearch.php
index 3c3fdca9f..a0d723b12 100644
--- a/actions/noticesearch.php
+++ b/actions/noticesearch.php
@@ -8,6 +8,7 @@
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
* @author Robin Millette <millette@controlyourself.ca>
+ * @author Sarven Capadisli <csarven@controlyourself.ca>
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://laconi.ca/
*
@@ -90,7 +91,7 @@ class NoticesearchAction extends SearchAction
}
if ($cnt > 0) {
$terms = preg_split('/[\s,]+/', $q);
- $this->elementStart('ul', array('id' => 'notices'));
+ $this->elementStart('ul', array('class' => 'notices'));
for ($i = 0; $i < min($cnt, NOTICES_PER_PAGE); $i++) {
if ($notice->fetch()) {
$this->showNotice($notice, $terms);
@@ -147,23 +148,26 @@ class NoticesearchAction extends SearchAction
return;
}
// XXX: RDFa
- $this->elementStart('li', array('class' => 'notice_single',
+ $this->elementStart('li', array('class' => 'hentry notice',
'id' => 'notice-' . $notice->id));
+
+ $this->elementStart('div', 'entry-title');
+ $this->elementStart('span', 'vcard author');
$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' => 'avatar photo',
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'alt' =>
($profile->fullname) ? $profile->fullname :
$profile->nickname));
+ $this->element('span', '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'));
if ($notice->rendered) {
$this->raw($this->highlight($notice->rendered, $terms));
} else {
@@ -173,20 +177,53 @@ class NoticesearchAction extends SearchAction
$this->raw($this->highlight(common_render_content($notice->content, $notice), $terms));
}
$this->elementEnd('p');
+ $this->elementEnd('div');
+
$noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
- $this->elementStart('p', 'time');
- $this->element('a', array('class' => 'permalink',
- 'href' => $noticeurl,
- 'title' => common_exact_date($notice->created)),
- common_date_string($notice->created));
+ $this->elementStart('div', 'entry-content');
+ $this->elementStart('dl', 'timestamp');
+ $this->element('dt', null, _('Published'));
+ $this->elementStart('dd', null);
+ $this->elementStart('a', array('rel' => 'bookmark',
+ 'href' => $noticeurl));
+ $dt = common_date_iso8601($notice->created);
+ $this->element('abbr', array('class' => 'published',
+ 'title' => $dt),
+ common_date_string($notice->created));
+ $this->elementEnd('a');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+
if ($notice->reply_to) {
- $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to));
- $this->text(' (');
- $this->element('a', array('class' => 'inreplyto',
- 'href' => $replyurl),
- _('in reply to...'));
- $this->text(')');
+ $replyurl = common_local_url('shownotice',
+ array('notice' => $this->notice->reply_to));
+ $this->elementStart('dl', 'response');
+ $this->element('dt', null, _('To'));
+ $this->elementStart('dd');
+ $this->element('a', array('href' => $replyurl,
+ 'rel' => 'in-reply-to'),
+ _('in reply to'));
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
}
+ $this->elementEnd('div');
+
+ $this->elementStart('div', 'notice-options');
+
+ $reply_url = common_local_url('newnotice',
+ array('replyto' => $profile->nickname));
+
+ $this->elementStart('dl', 'notice_reply');
+ $this->element('dt', null, _('Reply to this notice'));
+ $this->elementStart('dd');
+ $this->elementStart('a', array('href' => $reply_url,
+ 'title' => _('Reply to this notice')));
+ $this->text(_('Reply'));
+ $this->element('span', 'notice_id', $notice->id);
+ $this->elementEnd('a');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+
$this->elementStart('a',
array('href' => common_local_url('newnotice',
array('replyto' => $profile->nickname)),
@@ -194,10 +231,8 @@ class NoticesearchAction extends SearchAction
'title' => _('reply'),
'class' => 'replybutton'));
$this->hidden('posttoken', common_session_token());
-
- $this->raw('&rarr;');
$this->elementEnd('a');
- $this->elementEnd('p');
+ $this->elementEnd('div');
$this->elementEnd('li');
}
diff --git a/actions/showstream.php b/actions/showstream.php
index c1ef8ba52..eab1fc0a2 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -316,7 +316,7 @@ class ShowstreamAction extends Action
$this->elementStart('div', 'entity_actions');
$this->element('h2', null, _('User actions'));
$this->elementStart('ul');
- $this->elementStart('li', array('id' => 'entity_subscribe'));
+ $this->elementStart('li', array('class' => 'entity_subscribe'));
$cur = common_current_user();
if ($cur) {
if ($cur->id != $this->profile->id) {
@@ -337,14 +337,14 @@ class ShowstreamAction extends Action
$user = User::staticGet('id', $this->profile->id);
if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) {
- $this->elementStart('li', array('id' => 'entity_send-a-message'));
+ $this->elementStart('li', array('class' => 'entity_send-a-message'));
$this->element('a', array('href' => common_local_url('newmessage', array('to' => $user->id)),
'title' => _('Send a direct message to this user')),
_('Message'));
$this->elementEnd('li');
if ($user->email && $user->emailnotifynudge) {
- $this->elementStart('li', array('id' => 'entity_nudge'));
+ $this->elementStart('li', array('class' => 'entity_nudge'));
$nf = new NudgeForm($this, $user);
$nf->show();
$this->elementEnd('li');
@@ -353,7 +353,7 @@ class ShowstreamAction extends Action
if ($cur && $cur->id != $this->profile->id) {
$blocked = $cur->hasBlocked($this->profile);
- $this->elementStart('li', array('id' => 'entity_block'));
+ $this->elementStart('li', array('class' => 'entity_block'));
if ($blocked) {
$ubf = new UnblockForm($this, $this->profile);
$ubf->show();
diff --git a/actions/twittersettings.php b/actions/twittersettings.php
index 0c109ab53..bb0bc5946 100644
--- a/actions/twittersettings.php
+++ b/actions/twittersettings.php
@@ -104,18 +104,20 @@ class TwittersettingsAction extends ConnectSettingsAction
$this->elementStart('fieldset', array('id' => 'settings_twitter_account'));
$this->element('legend', null, _('Twitter Account'));
$this->hidden('token', common_session_token());
- $this->elementStart('ul', 'form_data');
if ($fuser) {
- $this->elementStart('li');
+ $this->elementStart('ul', 'form_data');
+ $this->elementStart('li', array('id' => 'settings_twitter_remove'));
$this->element('span', 'twitter_user', $fuser->nickname);
$this->element('a', array('href' => $fuser->uri), $fuser->uri);
$this->element('p', 'form_guide',
_('Current verified Twitter account.'));
$this->hidden('flink_foreign_id', $flink->foreign_id);
- $this->submit('remove', _('Remove'));
$this->elementEnd('li');
+ $this->elementEnd('ul');
+ $this->submit('remove', _('Remove'));
} else {
- $this->elementStart('li');
+ $this->elementStart('ul', 'form_data');
+ $this->elementStart('li', array('id' => 'settings_twitter_login'));
$this->input('twitter_username', _('Twitter user name'),
($this->arg('twitter_username')) ?
$this->arg('twitter_username') :
@@ -125,8 +127,8 @@ class TwittersettingsAction extends ConnectSettingsAction
$this->elementStart('li');
$this->password('twitter_password', _('Twitter password'));
$this->elementend('li');
+ $this->elementEnd('ul');
}
- $this->elementEnd('ul');
$this->elementEnd('fieldset');
$this->elementStart('fieldset',
@@ -224,10 +226,10 @@ class TwittersettingsAction extends ConnectSettingsAction
$friends_count = count($friends);
if ($friends_count > 0) {
-
- $this->element('h3', null, _('Twitter Friends'));
- $this->elementStart('div', array('id' => 'subscriptions'));
- $this->elementStart('ul', array('id' => 'subscriptions_avatars'));
+ $this->elementStart('div', array('id' => 'entity_subscriptions',
+ 'class' => 'section'));
+ $this->element('h2', null, _('Twitter Friends'));
+ $this->elementStart('ul', 'entities users xoxo');
for ($i = 0; $i < min($friends_count, SUBSCRIPTIONS); $i++) {
@@ -238,13 +240,12 @@ class TwittersettingsAction extends ConnectSettingsAction
continue;
}
- $this->elementStart('li');
+ $this->elementStart('li', 'vcard');
$this->elementStart('a', array('title' => ($other->fullname) ?
$other->fullname :
$other->nickname,
'href' => $other->profileurl,
- 'rel' => 'contact',
- 'class' => 'subscription'));
+ 'class' => 'url'));
$avatar = $other->getAvatar(AVATAR_MINI_SIZE);
@@ -255,10 +256,12 @@ class TwittersettingsAction extends ConnectSettingsAction
$this->element('img', array('src' => $avatar_url,
'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE,
- 'class' => 'avatar mini',
+ 'class' => 'avatar photo',
'alt' => ($other->fullname) ?
$other->fullname :
$other->nickname));
+
+ $this->element('span', 'fn nickname', $other->nickname);
$this->elementEnd('a');
$this->elementEnd('li');
diff --git a/actions/usergroups.php b/actions/usergroups.php
index 748585e1d..58cf7eeb6 100644
--- a/actions/usergroups.php
+++ b/actions/usergroups.php
@@ -119,9 +119,11 @@ class UsergroupsAction extends Action
function showContent()
{
+ $this->elementStart('p', array('id' => 'new_group'));
$this->element('a', array('href' => common_local_url('newgroup'),
- 'id' => 'new_group'),
+ 'class' => 'more'),
_('Create a new group'));
+ $this->elementEnd('p');
$offset = ($this->page-1) * GROUPS_PER_PAGE;
$limit = GROUPS_PER_PAGE + 1;