- common_element('a', array('href' => $profile,
- 'class' => 'external profile nickname'),
- $nickname);
- if ($fullname) {
- common_element_start('div', 'fullname');
- if ($homepage) {
- common_element('a', array('href' => $homepage),
- $fullname);
- } else {
- common_text($fullname);
- }
- common_element_end('div');
- }
- if ($location) {
- common_element('div', 'location', $location);
- }
- if ($bio) {
- common_element('div', 'bio', $bio);
- }
- common_element_start('div', 'license');
- common_element('a', array('href' => $license,
- 'class' => 'license'),
- $license);
- common_element_end('div');
- common_element_end('div');
- common_element_start('form', array('method' => 'post',
- 'id' => 'userauthorization',
- 'name' => 'userauthorization',
- 'action' => common_local_url('userauthorization')));
- common_hidden('token', common_session_token());
- common_submit('accept', _('Accept'));
- common_submit('reject', _('Reject'));
- common_element_end('form');
- common_show_footer();
+ $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname';
+ $this->elementStart('span', $hasFN);
+ $this->raw($nickname);
+ $this->elementEnd('span');
+ $this->elementEnd('a');
+
+ if (!is_null($fullname)) {
+ $this->elementStart('dl', 'entity_fn');
+ $this->elementStart('dd');
+ $this->elementStart('span', 'fn');
+ $this->raw($fullname);
+ $this->elementEnd('span');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+ }
+ if (!is_null($location)) {
+ $this->elementStart('dl', 'entity_location');
+ $this->element('dt', null, _('Location'));
+ $this->elementStart('dd', 'label');
+ $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'));
+ $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->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'),
+ $license);
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+ }
+ $this->elementEnd('div');
+
+ $this->elementStart('div', 'entity_actions');
+ $this->elementStart('ul');
+ $this->elementStart('li', 'entity_subscribe');
+ $this->elementStart('form', array('method' => 'post',
+ 'id' => 'userauthorization',
+ 'class' => 'form_user_authorization',
+ 'name' => 'userauthorization',
+ 'action' => common_local_url('userauthorization')));
+ $this->hidden('token', common_session_token());
+
+ $this->submit('accept', _('Accept'), 'submit accept', null, _('Subscribe to this user'));
+ $this->submit('reject', _('Reject'), 'submit reject', null, _('Reject this subscription'));
+ $this->elementEnd('form');
+ $this->elementEnd('li');
+ $this->elementEnd('ul');
+ $this->elementEnd('div');
+ $this->elementEnd('div');