diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index 57821d428e..f6f1d31625 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -142,9 +142,6 @@ class PublictagcloudAction extends Action ksort($tw); - $this->elementStart('dl'); - $this->element('dt', null, _('Tag cloud')); - $this->elementStart('dd'); $this->elementStart('ul', 'tags xoxo tag-cloud'); foreach ($tw as $tag => $weight) { if ($sum) { @@ -155,8 +152,7 @@ class PublictagcloudAction extends Action $this->showTag($tag, $weight, $weightedSum); } $this->elementEnd('ul'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } else { $this->showEmptyList(); diff --git a/actions/showapplication.php b/actions/showapplication.php index 10aaff538f..b9e3b32914 100644 --- a/actions/showapplication.php +++ b/actions/showapplication.php @@ -155,42 +155,24 @@ class ShowApplicationAction extends OwnerDesignAction $this->elementStart('div', 'entity_profile vcard'); $this->element('h2', null, _('Application profile')); - $this->elementStart('dl', 'entity_depiction'); - $this->element('dt', null, _('Icon')); - $this->elementStart('dd'); if (!empty($this->application->icon)) { $this->element('img', array('src' => $this->application->icon, - 'class' => 'photo logo')); + 'class' => 'photo logo entity_depiction')); } - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_fn'); - $this->element('dt', null, _('Name')); - $this->elementStart('dd'); $this->element('a', array('href' => $this->application->source_url, - 'class' => 'url fn'), + 'class' => 'url fn entity_fn'), $this->application->name); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_org'); - $this->element('dt', null, _('Organization')); - $this->elementStart('dd'); $this->element('a', array('href' => $this->application->homepage, - 'class' => 'url'), + 'class' => 'url entity_org'), $this->application->organization); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_note'); - $this->element('dt', null, _('Description')); - $this->element('dd', 'note', $this->application->description); - $this->elementEnd('dl'); + $this->element('div', + 'note entity_note', + $this->application->description); - $this->elementStart('dl', 'entity_statistics'); - $this->element('dt', null, _('Statistics')); - $this->elementStart('dd'); + $this->elementStart('div', 'entity_statistics'); $defaultAccess = ($this->application->access_type & Oauth_application::$writeAccess) ? 'read-write' : 'read-only'; $profile = Profile::staticGet($this->application->owner); @@ -205,8 +187,8 @@ class ShowApplicationAction extends OwnerDesignAction $defaultAccess, $userCnt )); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); + $this->elementEnd('div'); $this->elementStart('div', 'entity_actions'); @@ -259,30 +241,21 @@ class ShowApplicationAction extends OwnerDesignAction $this->elementStart('div', 'entity_data'); $this->element('h2', null, _('Application info')); - $this->elementStart('dl', 'entity_consumer_key'); - $this->element('dt', null, _('Consumer key')); - $this->element('dd', null, $consumer->consumer_key); - $this->elementEnd('dl'); + $this->element('div', + 'entity_consumer_key', + $consumer->consumer_key); - $this->elementStart('dl', 'entity_consumer_secret'); - $this->element('dt', null, _('Consumer secret')); - $this->element('dd', null, $consumer->consumer_secret); - $this->elementEnd('dl'); + $this->element('div', + 'entity_consumer_secret', + $consumer->consumer_secret); - $this->elementStart('dl', 'entity_request_token_url'); - $this->element('dt', null, _('Request token URL')); - $this->element('dd', null, common_local_url('ApiOauthRequestToken')); - $this->elementEnd('dl'); + $this->element('div', + 'entity_request_token_url', + common_local_url('ApiOauthRequestToken')); - $this->elementStart('dl', 'entity_access_token_url'); - $this->element('dt', null, _('Access token URL')); - $this->element('dd', null, common_local_url('ApiOauthAccessToken')); - $this->elementEnd('dl'); + $this->element('div', 'entity_access_token_url', common_local_url('ApiOauthAccessToken')); - $this->elementStart('dl', 'entity_authorize_url'); - $this->element('dt', null, _('Authorize URL')); - $this->element('dd', null, common_local_url('ApiOauthAuthorize')); - $this->elementEnd('dl'); + $this->element('div', 'entity_authorize_url', common_local_url('ApiOauthAuthorize')); $this->element('p', 'note', _('Note: We support HMAC-SHA1 signatures. We do not support the plaintext signature method.')); diff --git a/actions/showgroup.php b/actions/showgroup.php index f38cd420ac..a895f81b84 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -216,83 +216,47 @@ class ShowgroupAction extends GroupDesignAction $this->elementStart('div', array('id' => 'i', 'class' => 'entity_profile vcard author')); - // TRANS: Group profile header (h2). Text hidden by default. - $this->element('h2', null, _('Group profile')); - - $this->elementStart('dl', 'entity_depiction'); - // TRANS: Label for group avatar (dt). Text hidden by default. - $this->element('dt', null, _('Avatar')); - $this->elementStart('dd'); - $logo = ($this->group->homepage_logo) ? $this->group->homepage_logo : User_group::defaultLogo(AVATAR_PROFILE_SIZE); $this->element('img', array('src' => $logo, - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $this->group->nickname)); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - // TRANS: Label for group nickname (dt). Text hidden by default. - $this->element('dt', null, _('Nickname')); - $this->elementStart('dd'); - $hasFN = ($this->group->fullname) ? 'nickname url uid' : 'fn org nickname url uid'; + $hasFN = ($this->group->fullname) ? 'entity_nickname nickname url uid' : + 'entity_nickname fn org nickname url uid'; $this->element('a', array('href' => $this->group->homeUrl(), 'rel' => 'me', 'class' => $hasFN), $this->group->nickname); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if ($this->group->fullname) { - $this->elementStart('dl', 'entity_fn'); - // TRANS: Label for full group name (dt). Text hidden by default. - $this->element('dt', null, _('Full name')); - $this->elementStart('dd'); - $this->element('span', 'fn org', $this->group->fullname); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->element('div', 'entity_fn fn org', $this->group->fullname); } if ($this->group->location) { - $this->elementStart('dl', 'entity_location'); - // TRANS: Label for group location (dt). Text hidden by default. - $this->element('dt', null, _('Location')); - $this->element('dd', 'label', $this->group->location); - $this->elementEnd('dl'); + $this->element('div', 'entity_location label', $this->group->location); } if ($this->group->homepage) { - $this->elementStart('dl', 'entity_url'); - // TRANS: Label for group URL (dt). Text hidden by default. - $this->element('dt', null, _('URL')); - $this->elementStart('dd'); $this->element('a', array('href' => $this->group->homepage, - 'rel' => 'me', 'class' => 'url'), + 'rel' => 'me', + 'class' => 'url entity_url'), $this->group->homepage); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } if ($this->group->description) { - $this->elementStart('dl', 'entity_note'); - // TRANS: Label for group description or group note (dt). Text hidden by default. - $this->element('dt', null, _('Note')); - $this->element('dd', 'note', $this->group->description); - $this->elementEnd('dl'); + $this->element('div', 'note entity_note', $this->group->description); } if (common_config('group', 'maxaliases') > 0) { $aliases = $this->group->getAliases(); if (!empty($aliases)) { - $this->elementStart('dl', 'entity_aliases'); - // TRANS: Label for group aliases (dt). Text hidden by default. - $this->element('dt', null, _('Aliases')); - $this->element('dd', 'aliases', implode(' ', $aliases)); - $this->elementEnd('dl'); + $this->element('div', + 'aliases entity_aliases', + implode(' ', $aliases)); } } @@ -447,15 +411,10 @@ class ShowgroupAction extends GroupDesignAction // TRANS: Header for group statistics on a group page (h2). $this->element('h2', null, _('Statistics')); - $this->elementStart('dl', 'entity_created'); - // @todo FIXME: i18n issue. This label gets a colon added from somewhere. Should be part of the message. - // TRANS: Label for creation date in statistics on group page. - $this->element('dt', null, _m('LABEL','Created')); - $this->element('dd', null, date('j M Y', - strtotime($this->group->created))); $this->elementEnd('dl'); - - $this->elementStart('dl', 'entity_members'); + $this->element('dt', null, _m('LABEL','Created')); + $this->element('dd', 'entity_created', date('j M Y', + strtotime($this->group->created))); // @todo FIXME: i18n issue. This label gets a colon added from somewhere. Should be part of the message. // TRANS: Label for member count in statistics on group page. $this->element('dt', null, _m('LABEL','Members')); diff --git a/actions/tagother.php b/actions/tagother.php index 735d876da2..258c13bdcc 100644 --- a/actions/tagother.php +++ b/actions/tagother.php @@ -77,58 +77,37 @@ class TagotherAction extends Action $this->element('h2', null, _('User profile')); $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); - $this->elementStart('dl', 'entity_depiction'); - $this->element('dt', null, _('Photo')); - $this->elementStart('dd'); $this->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => ($this->profile->fullname) ? $this->profile->fullname : $this->profile->nickname)); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - $this->element('dt', null, _('Nickname')); - $this->elementStart('dd'); $this->element('a', array('href' => $this->profile->profileurl, - 'class' => 'nickname'), + 'class' => 'entity_nickname nickname'), $this->profile->nickname); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if ($this->profile->fullname) { - $this->elementStart('dl', 'entity_fn'); - $this->element('dt', null, _('Full name')); - $this->elementStart('dd'); - $this->element('span', 'fn', $this->profile->fullname); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->element('div', 'fn entity_fn', $this->profile->fullname); } + if ($this->profile->location) { - $this->elementStart('dl', 'entity_location'); - $this->element('dt', null, _('Location')); - $this->element('dd', 'label', $this->profile->location); - $this->elementEnd('dl'); + $this->element('div', 'label entity_location', $this->profile->location); } + if ($this->profile->homepage) { - $this->elementStart('dl', 'entity_url'); - $this->element('dt', null, _('URL')); - $this->elementStart('dd'); $this->element('a', array('href' => $this->profile->homepage, - 'rel' => 'me', 'class' => 'url'), + 'rel' => 'me', + 'class' => 'url entity_url'), $this->profile->homepage); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } + if ($this->profile->bio) { - $this->elementStart('dl', 'entity_note'); - $this->element('dt', null, _('Note')); - $this->element('dd', 'note', $this->profile->bio); - $this->elementEnd('dl'); + $this->element('div', 'note entity_note', $this->profile->bio); } + $this->elementEnd('div'); $this->elementStart('form', array('method' => 'post', diff --git a/actions/userauthorization.php b/actions/userauthorization.php index e896ff96ca..d460308c16 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -128,79 +128,56 @@ class UserauthorizationAction extends Action $avatar = $params->getAvatarURL(); $this->elementStart('div', 'entity_profile vcard'); - $this->elementStart('dl', 'entity_depiction'); - $this->element('dt', null, _('Photo')); - $this->elementStart('dd'); + if ($avatar) { $this->element('img', array('src' => $avatar, - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $nickname)); } - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - $this->element('dt', null, _('Nickname')); - $this->elementStart('dd'); + $this->element('div', 'entity_nickname', _('Nickname')); + $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname'; + + // XXX: why are these raw() instead of escaped...? + $this->elementStart('a', array('href' => $profile, 'class' => 'url '.$hasFN)); $this->raw($nickname); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if (!is_null($fullname)) { - $this->elementStart('dl', 'entity_fn'); - $this->elementStart('dd'); - $this->elementStart('span', 'fn'); + $this->elementStart('div', 'fn entity_fn'); $this->raw($fullname); - $this->elementEnd('span'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } + if (!is_null($location)) { - $this->elementStart('dl', 'entity_location'); - $this->element('dt', null, _('Location')); - $this->elementStart('dd', 'label'); + $this->elementStart('div', 'label entity_location'); $this->raw($location); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } if (!is_null($homepage)) { - $this->elementStart('dl', 'entity_url'); - $this->element('dt', null, _('URL')); - $this->elementStart('dd'); $this->elementStart('a', array('href' => $homepage, - 'class' => 'url')); + 'class' => 'url entity_url')); $this->raw($homepage); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } if (!is_null($bio)) { - $this->elementStart('dl', 'entity_note'); - $this->element('dt', null, _('Note')); - $this->elementStart('dd', 'note'); + $this->elementStart('div', 'note entity_note'); $this->raw($bio); $this->elementEnd('dd'); - $this->elementEnd('dl'); } if (!is_null($license)) { - $this->elementStart('dl', 'entity_license'); - $this->element('dt', null, _('License')); - $this->elementStart('dd', 'license'); $this->element('a', array('href' => $license, - 'class' => 'license'), + 'class' => 'license entity_license'), $license); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } + $this->elementEnd('div'); $this->elementStart('div', 'entity_actions'); diff --git a/lib/action.php b/lib/action.php index 0e5d7ae361..095c410b11 100644 --- a/lib/action.php +++ b/lib/action.php @@ -526,11 +526,7 @@ class Action extends HTMLOutputter // lawsuit function showPrimaryNav() { $user = common_current_user(); - $this->elementStart('dl', array('id' => 'site_nav_global_primary')); - // TRANS: DT element for primary navigation menu. String is hidden in default CSS. - $this->element('dt', null, _('Primary site navigation')); - $this->elementStart('dd'); - $this->elementStart('ul', array('class' => 'nav')); + $this->elementStart('ul', array('class' => 'nav site_nav_global_primary')); if (Event::handle('StartPrimaryNav', array($this))) { if ($user) { // TRANS: Tooltip for main menu option "Personal" @@ -600,8 +596,6 @@ class Action extends HTMLOutputter // lawsuit Event::handle('EndPrimaryNav', array($this)); } $this->elementEnd('ul'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } /** @@ -614,14 +608,10 @@ class Action extends HTMLOutputter // lawsuit // Revist. Should probably do an hAtom pattern here $text = common_config('site', 'notice'); if ($text) { - $this->elementStart('dl', array('id' => 'site_notice', + $this->elementStart('div', array('id' => 'site_notice', 'class' => 'system_notice')); - // TRANS: DT element for site notice. String is hidden in default CSS. - $this->element('dt', null, _('Site notice')); - $this->elementStart('dd', null); $this->raw($text); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } } @@ -682,13 +672,7 @@ class Action extends HTMLOutputter // lawsuit */ function showLocalNavBlock() { - $this->elementStart('dl', array('id' => 'site_nav_local_views')); - // TRANS: DT element for local views block. String is hidden in default CSS. - $this->element('dt', null, _('Local views')); - $this->elementStart('dd'); $this->showLocalNav(); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } /** @@ -751,17 +735,13 @@ class Action extends HTMLOutputter // lawsuit if ($dclass != 'Action' || Event::hasHandler('StartShowPageNotice')) { - $this->elementStart('dl', array('id' => 'page_notice', + $this->elementStart('div', array('id' => 'page_notice', 'class' => 'system_notice')); - // TRANS: DT element for page notice. String is hidden in default CSS. - $this->element('dt', null, _('Page notice')); - $this->elementStart('dd'); if (Event::handle('StartShowPageNotice', array($this))) { $this->showPageNotice(); Event::handle('EndShowPageNotice', array($this)); } - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } } @@ -853,11 +833,7 @@ class Action extends HTMLOutputter // lawsuit */ function showSecondaryNav() { - $this->elementStart('dl', array('id' => 'site_nav_global_secondary')); - // TRANS: DT element for secondary navigation menu. String is hidden in default CSS. - $this->element('dt', null, _('Secondary site navigation')); - $this->elementStart('dd', null); - $this->elementStart('ul', array('class' => 'nav')); + $this->elementStart('ul', array('class' => 'nav site_nav_global_secondary')); if (Event::handle('StartSecondaryNav', array($this))) { $this->menuItem(common_local_url('doc', array('title' => 'help')), // TRANS: Secondary navigation menu option leading to help on StatusNet. @@ -893,8 +869,6 @@ class Action extends HTMLOutputter // lawsuit Event::handle('EndSecondaryNav', array($this)); } $this->elementEnd('ul'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } /** @@ -904,10 +878,8 @@ class Action extends HTMLOutputter // lawsuit */ function showLicenses() { - $this->elementStart('dl', array('id' => 'licenses')); $this->showStatusNetLicense(); $this->showContentLicense(); - $this->elementEnd('dl'); } /** @@ -1335,11 +1307,7 @@ class Action extends HTMLOutputter // lawsuit { // Does a little before-after block for next/prev page if ($have_before || $have_after) { - $this->elementStart('dl', 'pagination'); - // TRANS: DT element for pagination (previous/next, etc.). - $this->element('dt', null, _('Pagination')); - $this->elementStart('dd', null); - $this->elementStart('ul', array('class' => 'nav')); + $this->elementStart('ul', array('class' => 'nav pagination')); } if ($have_before) { $pargs = array('page' => $page-1); @@ -1363,8 +1331,6 @@ class Action extends HTMLOutputter // lawsuit } if ($have_before || $have_after) { $this->elementEnd('ul'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } } diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index 7e536925bf..80f8cdb680 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -93,19 +93,12 @@ class AttachmentList extends Widget function showListStart() { - $this->out->elementStart('dl', array('id' =>'attachments', - 'class' => 'entry-content')); - // TRANS: DT element label in attachment list. - $this->out->element('dt', null, _('Attachments')); - $this->out->elementStart('dd'); - $this->out->elementStart('ol', array('class' => 'attachments')); + $this->out->elementStart('ol', array('class' => 'attachments entry-content')); } function showListEnd() { - $this->out->elementEnd('dd'); $this->out->elementEnd('ol'); - $this->out->elementEnd('dl'); } /** @@ -289,32 +282,22 @@ class Attachment extends AttachmentListItem $this->out->elementStart('div', array('id' => 'oembed_info', 'class' => 'entry-content')); if (!empty($this->oembed->author_name)) { - $this->out->elementStart('dl', 'vcard author'); - // TRANS: DT element label in attachment list item. - $this->out->element('dt', null, _('Author')); - $this->out->elementStart('dd', 'fn'); + $this->out->elementStart('div', 'fn vcard author'); 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'); } if (!empty($this->oembed->provider)) { - $this->out->elementStart('dl', 'vcard'); - // TRANS: DT element label in attachment list item. - $this->out->element('dt', null, _('Provider')); - $this->out->elementStart('dd', 'fn'); + $this->out->elementStart('div', 'fn vcard'); 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('div'); } diff --git a/lib/galleryaction.php b/lib/galleryaction.php index 31e36803a7..b8edbbb7ba 100644 --- a/lib/galleryaction.php +++ b/lib/galleryaction.php @@ -117,9 +117,6 @@ class GalleryAction extends OwnerDesignAction $content[$t] = $t; } if ($tags) { - $this->elementStart('dl', array('id'=>'filter_tags')); - $this->element('dt', null, _('Filter tags')); - $this->elementStart('dd'); $this->elementStart('ul'); $this->elementStart('li', array('id' => 'filter_tags_all', 'class' => 'child_1')); @@ -133,7 +130,7 @@ class GalleryAction extends OwnerDesignAction $this->elementStart('li', array('id'=>'filter_tags_item')); $this->elementStart('form', array('name' => 'bytag', 'id' => 'form_filter_bytag', - 'action' => common_path('?action=' . $this->trimmed('action')), + 'action' => common_path('?action=' . $this->trimmed('action')), 'method' => 'post')); $this->elementStart('fieldset'); $this->element('legend', null, _('Select tag to filter')); @@ -145,8 +142,6 @@ class GalleryAction extends OwnerDesignAction $this->elementEnd('form'); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } } diff --git a/lib/messageform.php b/lib/messageform.php index 9d3f955a81..7f21f7ecd0 100644 --- a/lib/messageform.php +++ b/lib/messageform.php @@ -162,11 +162,10 @@ class MessageForm extends Form $contentLimit = Message::maxContent(); if ($contentLimit > 0) { - $this->out->elementStart('dl', 'form_note'); - $this->out->element('dt', null, _('Available characters')); - $this->out->element('dd', array('id' => 'notice_text-count'), + $this->out->element('span', + array('id' => 'notice_text-count', + 'class' => 'form_note'), $contentLimit); - $this->out->elementEnd('dl'); } } diff --git a/lib/noticeform.php b/lib/noticeform.php index 5140663569..432316adc9 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -182,11 +182,10 @@ class NoticeForm extends Form $contentLimit = Notice::maxContent(); if ($contentLimit > 0) { - $this->out->elementStart('dl', 'form_note'); - $this->out->element('dt', null, _('Available characters')); - $this->out->element('dd', array('id' => 'notice_text-count'), + $this->out->element('span', + array('id' => 'notice_text-count', + 'class' => 'form_note'), $contentLimit); - $this->out->elementEnd('dl'); } if (common_config('attachments', 'uploads')) { diff --git a/lib/profileaction.php b/lib/profileaction.php index 4bfc4d48d9..9ba8261229 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -187,53 +187,42 @@ class ProfileAction extends OwnerDesignAction $this->element('h2', null, _('Statistics')); // Other stats...? - $this->elementStart('dl', 'entity_user-id'); + $this->elementStart('dl'); $this->element('dt', null, _('User ID')); - $this->element('dd', null, $this->profile->id); - $this->elementEnd('dl'); + $this->element('dd', 'entity_user-id', $this->profile->id); - $this->elementStart('dl', 'entity_member-since'); $this->element('dt', null, _('Member since')); - $this->element('dd', null, date('j M Y', + $this->element('dd', 'entity_member-since', date('j M Y', strtotime($this->profile->created))); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_subscriptions'); $this->elementStart('dt'); $this->element('a', array('href' => common_local_url('subscriptions', array('nickname' => $this->profile->nickname))), _('Subscriptions')); $this->elementEnd('dt'); - $this->element('dd', null, $subs_count); - $this->elementEnd('dl'); + $this->element('dd', 'entity_subscriptions', $subs_count); - $this->elementStart('dl', 'entity_subscribers'); $this->elementStart('dt'); $this->element('a', array('href' => common_local_url('subscribers', array('nickname' => $this->profile->nickname))), _('Subscribers')); $this->elementEnd('dt'); - $this->element('dd', 'subscribers', $subbed_count); - $this->elementEnd('dl'); + $this->element('dd', 'subscribers entity_subscribers', $subbed_count); - $this->elementStart('dl', 'entity_groups'); $this->elementStart('dt'); $this->element('a', array('href' => common_local_url('usergroups', array('nickname' => $this->profile->nickname))), _('Groups')); $this->elementEnd('dt'); - $this->element('dd', 'groups', $group_count); - $this->elementEnd('dl'); + $this->element('dd', 'groups entity_groups', $group_count); - $this->elementStart('dl', 'entity_notices'); $this->element('dt', null, _('Notices')); - $this->element('dd', null, $notice_count); - $this->elementEnd('dl'); + $this->element('dd', 'entity_notices', $notice_count); - $this->elementStart('dl', 'entity_daily_notices'); // TRANS: Average count of posts made per day since account registration $this->element('dt', null, _('Daily average')); - $this->element('dd', null, $daily_count); + $this->element('dd', 'entity_daily_notices', $daily_count); + $this->elementEnd('dl'); $this->elementEnd('div'); diff --git a/lib/searchaction.php b/lib/searchaction.php index 6d7f46cd6e..67d0bcdeb8 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -165,12 +165,10 @@ You can also try your search on other engines: E_O_T ), $qe, $qe, $qe, $qe, $qe); } - $this->elementStart('dl', array('id' => 'help_search', 'class' => 'help')); - // TRANS: Definition list item with instructions on how to get (better) search results. - $this->element('dt', null, _('Search help')); - $this->elementStart('dd', 'instructions'); + $this->elementStart('div', 'help instructions'); $this->raw(common_markup_to_html($message)); - $this->elementEnd('dd'); + $this->elementEnd('div'); + $this->elementEnd('div'); } } diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index fc8f33f2ec..3ca4603948 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -98,8 +98,6 @@ class SubscriptionListItem extends ProfileListItem { $tags = Profile_tag::getTags($this->owner->id, $this->profile->id); - $this->out->elementStart('dl', 'entity_tags'); - $this->out->elementStart('dt'); if ($this->isOwn()) { $this->out->element('a', array('href' => common_local_url('tagother', array('id' => $this->profile->id))), @@ -107,10 +105,8 @@ class SubscriptionListItem extends ProfileListItem } else { $this->out->text(_('Tags')); } - $this->out->elementEnd('dt'); - $this->out->elementStart('dd'); if ($tags) { - $this->out->elementStart('ul', 'tags xoxo'); + $this->out->elementStart('ul', 'tags xoxo entity_tags'); foreach ($tags as $tag) { $this->out->elementStart('li'); // Avoid space by using raw output. @@ -126,7 +122,5 @@ class SubscriptionListItem extends ProfileListItem } else { $this->out->text(_('(None)')); } - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); } } diff --git a/lib/userprofile.php b/lib/userprofile.php index 2813f735ea..71b54682af 100644 --- a/lib/userprofile.php +++ b/lib/userprofile.php @@ -103,26 +103,21 @@ class UserProfile extends Widget $avatar = $this->profile->getAvatar(73); } - $this->out->elementStart('dl', 'entity_depiction'); - $this->out->element('dt', null, _('Photo')); - $this->out->elementStart('dd'); - $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), - 'class' => 'photo avatar', - 'width' => AVATAR_PROFILE_SIZE, - 'height' => AVATAR_PROFILE_SIZE, - 'alt' => $this->profile->nickname)); - $this->out->elementEnd('dd'); - + $this->out->element('img', + array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), + 'class' => 'photo avatar entity_depiction', + 'width' => AVATAR_PROFILE_SIZE, + 'height' => AVATAR_PROFILE_SIZE, + 'alt' => $this->profile->nickname)); + $cur = common_current_user(); + if ($cur && $cur->id == $this->profile->id) { - $this->out->elementStart('dd'); $this->out->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar')); - $this->out->elementEnd('dd'); } - $this->out->elementEnd('dl'); - - Event::handle('EndProfilePageAvatar', array($this->out, $this->profile)); + Event::handle('EndProfilePageAvatar', + array($this->out, $this->profile)); } } @@ -130,15 +125,12 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageNickname', array($this->out, $this->profile))) { - $this->out->elementStart('dl', 'entity_nickname'); - $this->out->element('dt', null, _('Nickname')); - $this->out->elementStart('dd'); - $hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid'; - $this->out->element('a', array('href' => $this->profile->profileurl, - 'rel' => 'me', 'class' => $hasFN), + $hasFN = ($this->profile->fullname) ? 'entity_nickname nickname url uid' : 'entity_nickname fn nickname url uid'; + $this->out->element('a', + array('href' => $this->profile->profileurl, + 'rel' => 'me', + 'class' => $hasFN), $this->profile->nickname); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); Event::handle('EndProfilePageNickname', array($this->out, $this->profile)); } @@ -148,12 +140,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageFullName', array($this->out, $this->profile))) { if ($this->profile->fullname) { - $this->out->elementStart('dl', 'entity_fn'); - $this->out->element('dt', null, _('Full name')); - $this->out->elementStart('dd'); - $this->out->element('span', 'fn', $this->profile->fullname); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); + $this->out->element('span', + 'entity_fn fn', + $this->profile->fullname); } Event::handle('EndProfilePageFullName', array($this->out, $this->profile)); } @@ -163,10 +152,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageLocation', array($this->out, $this->profile))) { if ($this->profile->location) { - $this->out->elementStart('dl', 'entity_location'); - $this->out->element('dt', null, _('Location')); - $this->out->element('dd', 'label', $this->profile->location); - $this->out->elementEnd('dl'); + $this->out->element('span', + 'entity_location label', + $this->profile->location); } Event::handle('EndProfilePageLocation', array($this->out, $this->profile)); } @@ -176,14 +164,11 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageHomepage', array($this->out, $this->profile))) { if ($this->profile->homepage) { - $this->out->elementStart('dl', 'entity_url'); - $this->out->element('dt', null, _('URL')); - $this->out->elementStart('dd'); - $this->out->element('a', array('href' => $this->profile->homepage, - 'rel' => 'me', 'class' => 'url'), + $this->out->element('a', + array('href' => $this->profile->homepage, + 'rel' => 'me', + 'class' => 'url entity_url'), $this->profile->homepage); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); } Event::handle('EndProfilePageHomepage', array($this->out, $this->profile)); } @@ -193,10 +178,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageBio', array($this->out, $this->profile))) { if ($this->profile->bio) { - $this->out->elementStart('dl', 'entity_note'); - $this->out->element('dt', null, _('Note')); - $this->out->element('dd', 'note', $this->profile->bio); - $this->out->elementEnd('dl'); + $this->out->element('div', + 'note entity_note', + $this->profile->bio); } Event::handle('EndProfilePageBio', array($this->out, $this->profile)); } @@ -208,10 +192,7 @@ class UserProfile extends Widget $tags = Profile_tag::getTags($this->profile->id, $this->profile->id); if (count($tags) > 0) { - $this->out->elementStart('dl', 'entity_tags'); - $this->out->element('dt', null, _('Tags')); - $this->out->elementStart('dd'); - $this->out->elementStart('ul', 'tags xoxo'); + $this->out->elementStart('ul', 'tags xoxo entity_tags'); foreach ($tags as $tag) { $this->out->elementStart('li'); // Avoid space by using raw output. @@ -222,8 +203,6 @@ class UserProfile extends Widget $this->out->elementEnd('li'); } $this->out->elementEnd('ul'); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); } Event::handle('EndProfilePageProfileTags', array($this->out, $this->profile)); } diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index a293fda5db..5ca7ce7674 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -163,65 +163,41 @@ class OStatusSubAction extends Action } $this->elementStart('div', 'entity_profile vcard'); - $this->elementStart('dl', 'entity_depiction'); - $this->element('dt', null, _m('Photo')); - $this->elementStart('dd'); $this->element('img', array('src' => $avatar, - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $nickname)); - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - $this->element('dt', null, _m('Nickname')); - $this->elementStart('dd'); - $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname'; + $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname entity_nickname'; $this->elementStart('a', array('href' => $profile, 'class' => 'url '.$hasFN)); $this->raw($nickname); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if (!is_null($fullname)) { - $this->elementStart('dl', 'entity_fn'); - $this->elementStart('dd'); - $this->elementStart('span', 'fn'); + $this->elementStart('div', 'fn entity_fn'); $this->raw($fullname); - $this->elementEnd('span'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } + if (!is_null($location)) { - $this->elementStart('dl', 'entity_location'); - $this->element('dt', null, _m('Location')); - $this->elementStart('dd', 'label'); + $this->elementStart('div', 'label entity_location'); $this->raw($location); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } if (!is_null($homepage)) { - $this->elementStart('dl', 'entity_url'); - $this->element('dt', null, _m('URL')); - $this->elementStart('dd'); $this->elementStart('a', array('href' => $homepage, - 'class' => 'url')); + 'class' => 'url entity_url')); $this->raw($homepage); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } if (!is_null($note)) { - $this->elementStart('dl', 'entity_note'); - $this->element('dt', null, _m('Note')); - $this->elementStart('dd', 'note'); + $this->elementStart('div', 'note entity_note'); $this->raw($note); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } $this->elementEnd('div'); }