mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 01:12:03 +00:00
[contact_email] modified 'share popup' & 'user profile'
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
.icon-eye:before { content: "\f06e"; }
|
||||
.icon-eye-slash:before { content: "\f070"; }
|
||||
.icon-plus-square:before { content: "\f0fe"; }
|
||||
.icon-envelope:before { content: "\f0e0"; }
|
||||
.fa-1x {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
@@ -3145,18 +3146,18 @@ button.dropdown-toggle:focus {
|
||||
#user-profile .avatar {
|
||||
border-radius: 0;
|
||||
}
|
||||
#user-profile p {
|
||||
.user-profile-nickname {
|
||||
padding: 8px 15px;
|
||||
margin: 0;
|
||||
}
|
||||
#user-profile .nickname {
|
||||
font-size: 18px;
|
||||
}
|
||||
#user-profile .info {
|
||||
.user-profile-info {
|
||||
padding: 8px 15px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
#user-profile .info-detail {
|
||||
padding-left: 6px;
|
||||
.user-profile-info-icon {
|
||||
display:inline-block;
|
||||
width:1.4em;
|
||||
}
|
||||
/* shared file view */
|
||||
#shared-file-view-hd .cur-path,
|
||||
|
@@ -5,23 +5,30 @@
|
||||
<div id="user-profile">
|
||||
{% if user %}
|
||||
{% avatar user.username 290 %}
|
||||
<p title="{{ nickname }}" class="user-profile-nickname ellipsis">{{ nickname }}</p>
|
||||
<ul>
|
||||
{% if d_profile %}
|
||||
{% if d_profile.department %}
|
||||
<li title="{{ d_profile.department }}" class="user-profile-info ellipsis">
|
||||
<span class="user-profile-info-icon icon-building fa-1x vam"></span>
|
||||
<span class="vam">{{ d_profile.department }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if d_profile.telephone %}
|
||||
<li title="{{ d_profile.telephone }}" class="user-profile-info ellipsis">
|
||||
<span class="user-profile-info-icon icon-phone fa-1x vam"></span>
|
||||
<span class="vam">{{ d_profile.telephone }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<li title="{{ contact_email }}" class="user-profile-info ellipsis">
|
||||
<span class="user-profile-info-icon icon-envelope fa-1x vam"></span>
|
||||
<span class="vam">{{ contact_email }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
{% avatar "" 290 %}
|
||||
{% endif %}
|
||||
<p title="{{ nickname }}" class="nickname ellipsis">{{ nickname }}</p>
|
||||
{% if d_profile %}
|
||||
{% if d_profile.department %}
|
||||
<p title="{{ d_profile.department }}" class="info ellipsis">
|
||||
<span class="icon-building fa-1x vam"></span>
|
||||
<span class="info-detail vam">{{ d_profile.department }}</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if d_profile.telephone %}
|
||||
<p title="{{ d_profile.telephone }}" class="info ellipsis">
|
||||
<span class="icon-phone fa-1x vam"></span>
|
||||
<span class="info-detail vam">{{ d_profile.telephone }}</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -94,17 +94,20 @@ def user_profile(request, username):
|
||||
else:
|
||||
user = None
|
||||
|
||||
nickname = '' if user is None else email2nickname(user.username)
|
||||
|
||||
if user is not None:
|
||||
nickname = email2nickname(user.username)
|
||||
contact_email = Profile.objects.get_contact_email_by_user(user.username)
|
||||
d_profile = DetailedProfile.objects.get_detailed_profile_by_user(
|
||||
user.username)
|
||||
else:
|
||||
nickname = ''
|
||||
contact_email = ''
|
||||
d_profile = None
|
||||
|
||||
return render_to_response('profile/user_profile.html', {
|
||||
'user': user,
|
||||
'nickname': nickname,
|
||||
'contact_email': contact_email,
|
||||
'd_profile': d_profile,
|
||||
}, context_instance=RequestContext(request))
|
||||
|
||||
|
@@ -559,8 +559,9 @@ define([
|
||||
"id": users[i].email,
|
||||
// for search. both name & email can be searched.
|
||||
// use ' '(space) to separate name & email
|
||||
"text": users[i].name + ' ' + users[i].email,
|
||||
"text": users[i].name + ' ' + users[i].contact_email,
|
||||
"avatar_url": users[i].avatar_url,
|
||||
"contact_email": users[i].contact_email,
|
||||
"name": users[i].name
|
||||
});
|
||||
}
|
||||
@@ -574,7 +575,7 @@ define([
|
||||
// format items shown in the drop-down menu
|
||||
formatResult: function(item) {
|
||||
if (item.avatar_url) {
|
||||
return '<img src="' + item.avatar_url + '" width="32" height="32" class="avatar"><span class="text ellipsis">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.id) + '</span>';
|
||||
return '<img src="' + item.avatar_url + '" width="32" height="32" class="avatar"><span class="text ellipsis">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.contact_email) + '</span>';
|
||||
} else {
|
||||
return; // if no match, show nothing
|
||||
}
|
||||
|
Reference in New Issue
Block a user