$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);
+
+ $notifications = 0;
+
+ $r = q("SELECT DISTINCT(`parent`) FROM `notify` WHERE `uid` = %d AND NOT `seen` AND NOT (`type` IN (%d, %d))",
+ intval($id['uid']), intval(NOTIFY_INTRO), intval(NOTIFY_MAIL));
+ if ($r)
+ $notifications = sizeof($r);
+
+ $r = q("SELECT DISTINCT(`convid`) FROM `mail` WHERE `uid` = %d AND NOT `seen`",
+ intval($id['uid']));
+ if ($r)
+ $notifications = $notifications + sizeof($r);
+
+ $identities[$key]['notifications'] = $notifications;
}
$o = replace_macros(get_markup_template('manage.tpl'), array(
<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}}" />
+ {{if $id.notifications}}<span class="manage-notify">{{$id.notifications}}</span>{{/if}}
</button>
</div>
</div>
<div class="identity-match-details" id="identity-match-nick-{{$id.uid}}">({{$id.nickname}})</div>
</div>
-
<div class="identity-match-end"></div>
</div>
{{/foreach}}
color: #000;
}
+.manage-notify {
+ background-color: #CB4437;
+ border-radius: 10px;
+ font: bold 11px/16px Arial;
+}
+
nav .nav-notify {
/* background-color: #427FED; */
background-color: #CB4437;
margin-top: -3px;
margin-right: 4px;
}
+
nav .nav-menu-icon .nav-notify {
top: 3px;
}
/* background: #4c619c; */
text-decoration: none;
}
+
+.manage-notify {
+ background-color: #F80;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+ border-radius: 5px 5px 5px 5px;
+ font-size: 10px;
+ padding: 1px 3px;
+ top: 0px;
+ min-width: 15px;
+ text-align: center;
+ color: white;
+ float: right;
+ margin-top: -14px;
+ margin-right: -20px;
+}
+
nav .nav-notify {
display: none;
position: absolute;
text-align: center;
color: white;
}
+
nav .nav-notify.show {
display: block;
}