Nicknames in subscriptions list

This commit is contained in:
Mikael Nordfeldth 2014-06-24 01:56:55 +02:00
parent c74dc15173
commit 53fb39a1d0
4 changed files with 21 additions and 33 deletions

View File

@ -169,23 +169,6 @@ class SubscriptionsList extends SubscriptionList
class SubscriptionsListItem extends SubscriptionListItem class SubscriptionsListItem extends SubscriptionListItem
{ {
function showProfile()
{
$this->startProfile();
$this->showAvatar($this->profile);
$this->showFullName();
$this->showLocation();
$this->showHomepage();
$this->showBio();
$this->showTags();
// Relevant portion!
$cur = common_current_user();
if (!empty($cur) && $cur->id == $this->owner->id) {
$this->showOwnerControls();
}
$this->endProfile();
}
function showOwnerControls() function showOwnerControls()
{ {
$sub = Subscription::pkeyGet(array('subscriber' => $this->owner->id, $sub = Subscription::pkeyGet(array('subscriber' => $this->owner->id,
@ -239,6 +222,5 @@ class SubscriptionsListItem extends SubscriptionListItem
// TRANS: Save button for settings for a profile in a subscriptions list. // TRANS: Save button for settings for a profile in a subscriptions list.
$this->out->submit('save', _m('BUTTON','Save')); $this->out->submit('save', _m('BUTTON','Save'));
$this->out->elementEnd('form'); $this->out->elementEnd('form');
return;
} }
} }

View File

@ -74,7 +74,7 @@ class ProfileList extends Widget
function startList() function startList()
{ {
$this->out->elementStart('ul', 'profiles xoxo'); $this->out->elementStart('ul', 'profile_list xoxo');
} }
function endList() function endList()
@ -142,7 +142,7 @@ class ProfileListItem extends Widget
function startItem() function startItem()
{ {
$this->out->elementStart('li', array('class' => 'profile h-entry', $this->out->elementStart('li', array('class' => 'profile',
'id' => 'profile-' . $this->profile->id)); 'id' => 'profile-' . $this->profile->id));
} }
@ -208,7 +208,7 @@ class ProfileListItem extends Widget
function showLocation() function showLocation()
{ {
if (!empty($this->profile->location)) { if (!empty($this->profile->location)) {
$this->out->element('span', 'label p-location', $this->profile->location); $this->out->element('span', 'label p-locality', $this->profile->location);
} }
} }

View File

@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1); exit(1);
} }
require_once INSTALLDIR.'/lib/profilelist.php';
/** /**
* Widget to show a list of subscriptions * Widget to show a list of subscriptions
* *
@ -84,9 +82,17 @@ class SubscriptionListItem extends ProfileListItem
$this->showBio(); $this->showBio();
// Relevant portion! // Relevant portion!
$this->showTags(); $this->showTags();
if ($this->isOwn()) {
$this->showOwnerControls();
}
$this->endProfile(); $this->endProfile();
} }
function showOwnerControls()
{
// pass
}
function isOwn() function isOwn()
{ {
$user = common_current_user(); $user = common_current_user();

View File

@ -1593,10 +1593,18 @@ height:16px;
top: -3px; top: -3px;
} }
table.profile_list .h-card .u-photo { ul.profile_list {
list-style-type:none;
}
ul.profile_list li {
margin-bottom: 20px;
}
.profile_list .h-card .u-photo {
margin-right: 4px; margin-right: 4px;
} }
table.profile_list .h-card .p-nickname { .profile_list .h-card .p-nickname {
display: block; display: block;
} }
@ -1872,14 +1880,6 @@ min-height:60px;
display:none; display:none;
} }
.profiles {
list-style-type:none;
}
.profiles li {
margin-bottom: 20px;
}
.profile .entity_profile .p-name, .profile .entity_profile .p-name,
.profile .entity_profile .u-url[rel~=contact] { .profile .entity_profile .u-url[rel~=contact] {
margin-left:0; margin-left:0;