Merge pull request #1984 from rabuzarus/manage
identity selector use now the profile pics
This commit is contained in:
commit
a8ef43e80e
5 changed files with 153 additions and 24 deletions
|
@ -98,8 +98,16 @@ function manage_content(&$a) {
|
|||
}
|
||||
|
||||
$identities = $a->identities;
|
||||
foreach($identities as $key=>$id) {
|
||||
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
|
||||
|
||||
//getting additinal information for each identity
|
||||
foreach ($identities as $key=>$id) {
|
||||
$thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = '%s' AND `self` = 1",
|
||||
dbesc($id['uid'])
|
||||
);
|
||||
|
||||
$identities[$key][thumb] = $thumb[0][thumb];
|
||||
|
||||
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);
|
||||
}
|
||||
|
||||
$o = replace_macros(get_markup_template('manage.tpl'), array(
|
||||
|
|
|
@ -213,6 +213,50 @@ a {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
.itentity-match-wrapper {
|
||||
float: left;
|
||||
padding: 10px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.identity-match-photo {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.identity-match-name {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.identity-match-details {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
overflow: hidden;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.identity-match-break, .identity-match-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.identity-match-photo button {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.selected-identity img {
|
||||
border: 2px solid #ff0000;
|
||||
}
|
||||
/* poke */
|
||||
#poke-desc {
|
||||
margin: 5px 0 10px;
|
||||
|
|
|
@ -2,17 +2,30 @@
|
|||
<h3>{{$title}}</h3>
|
||||
<div id="identity-manage-desc">{{$desc}}</div>
|
||||
<div id="identity-manage-choose">{{$choose}}</div>
|
||||
|
||||
<div id="identity-selector-wrapper">
|
||||
<form action="manage" method="post" >
|
||||
<select name="identity" size="10" onchange="this.form.submit();" >
|
||||
|
||||
{{foreach $identities as $id}}
|
||||
<option {{$id.selected}} value="{{$id.uid}}">{{$id.username}} ({{$id.nickname}})</option>
|
||||
<div class="itentity-match-wrapper {{if $id.selected}}selected-identity{{/if}}" id="identity-match-{{$id.uid}}">
|
||||
<div class="identity-match-photo" id="identity-match-photo-{{$id.uid}}">
|
||||
<button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" title="{{$id.username}}">
|
||||
<img src="{{$id.thumb}}" alt="{{$id.username}}" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="identity-match-break"></div>
|
||||
|
||||
<div class="identity-match-desc">
|
||||
<div class="identity-match-name" id="identity-match-name-{{$id.uid}}">{{$id.username}}</div>
|
||||
<div class="identity-match-details" id="identity-match-nick-{{$id.uid}}">({{$id.nickname}})</div>
|
||||
</div>
|
||||
|
||||
<div class="identity-match-end"></div>
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
||||
</select>
|
||||
<div id="identity-select-break"></div>
|
||||
|
||||
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
|
||||
</div></form>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -3250,17 +3250,49 @@ aside input[type='text'] {
|
|||
margin: 10px;
|
||||
}
|
||||
|
||||
#identity-manage-desc {
|
||||
margin-top:15px;
|
||||
margin-bottom: 15px;
|
||||
.itentity-match-wrapper {
|
||||
float: left;
|
||||
padding: 10px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#identity-manage-choose {
|
||||
margin-bottom: 15px;
|
||||
.identity-match-photo {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#identity-submit {
|
||||
margin-top: 20px;
|
||||
.identity-match-name {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.identity-match-details {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
overflow: hidden;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.identity-match-break, .identity-match-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.identity-match-photo button {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.selected-identity img {
|
||||
border: 2px solid #ff0000;
|
||||
}
|
||||
|
||||
#photo-nav {
|
||||
|
|
|
@ -3022,17 +3022,49 @@ aside input[type='text'] {
|
|||
margin: 10px;
|
||||
}
|
||||
|
||||
#identity-manage-desc {
|
||||
margin-top:15px;
|
||||
margin-bottom: 15px;
|
||||
.itentity-match-wrapper {
|
||||
float: left;
|
||||
padding: 10px;
|
||||
width: 120px;
|
||||
height: 140px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#identity-manage-choose {
|
||||
margin-bottom: 15px;
|
||||
.identity-match-photo {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#identity-submit {
|
||||
margin-top: 20px;
|
||||
.identity-match-name {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.identity-match-details {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
overflow: hidden;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.identity-match-break, .identity-match-end {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.identity-match-photo button {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.selected-identity img {
|
||||
border: 2px solid #ff0000;
|
||||
}
|
||||
|
||||
#photo-prev-link, #photo-next-link {
|
||||
|
|
Loading…
Reference in a new issue