some inital work to have profile pics on manage page

This commit is contained in:
rabuzarus 2015-10-25 14:00:08 +01:00
parent 64a5b33e77
commit e0e6762ed8
2 changed files with 29 additions and 4 deletions

View File

@ -98,7 +98,16 @@ function manage_content(&$a) {
}
$identities = $a->identities;
foreach($identities as $key=>$id) {
//getting profile pics for delegates
foreach ($identities as $key=>$id) {
$thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
intval($a->user['uid']),
dbesc($id['username']),
dbesc($id['nickname'])
);
$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
}

View File

@ -2,7 +2,7 @@
<h3>{{$title}}</h3>
<div id="identity-manage-desc">{{$desc}}</div>
<div id="identity-manage-choose">{{$choose}}</div>
<div id="identity-selector-wrapper">
{{*<div id="identity-selector-wrapper">
<form action="manage" method="post" >
<select name="identity" size="10" onchange="this.form.submit();" >
@ -13,6 +13,22 @@
</select>
<div id="identity-select-break"></div>
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
</div></form>
</form>
</div>*}}
<div id="identity-selector-wrapper">
<form action="manage" method="post" >
{{foreach $identities as $id}}
<button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" class="id-selection-photo-link" title="{{$id.username}}"><img class="channel-photo" src="{{$id.thumb}}" alt="{{$id.username}}" /></button>
{{/foreach}}
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
</form>
</div>