mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Avatar picture dashboard list
This commit is contained in:
parent
d9699b9c6d
commit
7d368ed0ac
@ -269,7 +269,7 @@ class Avatar(HashidMixin, FileMixin, db.Model):
|
||||
|
||||
def to_json_serializeable(self, backrefs=False, relationships=False):
|
||||
json_serializeable = {
|
||||
'id': self.id
|
||||
'id': self.hashid
|
||||
}
|
||||
return json_serializeable
|
||||
|
||||
|
@ -7,7 +7,6 @@ class PublicUserList extends RessourceList {
|
||||
|
||||
static options = {
|
||||
initialHtmlGenerator: (id) => {
|
||||
console.log(id);
|
||||
return `
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">search</i>
|
||||
@ -19,6 +18,10 @@ class PublicUserList extends RessourceList {
|
||||
<tr>
|
||||
<th style="width:15%;"></th>
|
||||
<th>Username</th>
|
||||
<th>Full name</th>
|
||||
<th>Location</th>
|
||||
<th>Organization</th>
|
||||
<th>Corpora online</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -29,8 +32,12 @@ class PublicUserList extends RessourceList {
|
||||
},
|
||||
item: `
|
||||
<tr class="clickable hoverable">
|
||||
<td><img alt="user-image" class="circle responsive-img avatar" style="width:80%"></td>
|
||||
<td><span class="username"></span></td>
|
||||
<td><img alt="user-image" class="circle responsive-img avatar" style="width:50%"></td>
|
||||
<td><b><span class="username"></span><b></td>
|
||||
<td><span class="full-name"></span></td>
|
||||
<td><span class="location"></span></td>
|
||||
<td><span class="organization"></span></td>
|
||||
<td><span class="corpora-online"></span></td>
|
||||
<td class="right-align">
|
||||
<a class="action-button btn-floating waves-effect waves-light" data-action="view"><i class="material-icons">send</i></a>
|
||||
</td>
|
||||
@ -40,8 +47,12 @@ class PublicUserList extends RessourceList {
|
||||
return {
|
||||
'id': user.id,
|
||||
'member-since': user.member_since,
|
||||
'avatar': `/static/images/user_avatar.png`,
|
||||
'username': user.username
|
||||
'avatar': user.avatar ? `/profile/${user.id}/avatars/${user.avatar.id}` : '/static/images/user_avatar.png',
|
||||
'username': user.username,
|
||||
'full-name': user.full_name ? user.full_name : '',
|
||||
'location': user.location ? user.location : '',
|
||||
'organization': user.organization ? user.organization : '',
|
||||
'corpora-online': '0'
|
||||
};
|
||||
},
|
||||
sortArgs: ['member-since', {order: 'desc'}],
|
||||
@ -49,7 +60,11 @@ class PublicUserList extends RessourceList {
|
||||
{data: ['id']},
|
||||
{data: ['member-since']},
|
||||
{name: 'avatar', attr: 'src'},
|
||||
'username'
|
||||
'username',
|
||||
'full-name',
|
||||
'location',
|
||||
'organization',
|
||||
'corpora-online'
|
||||
]
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<div class="col s12" id="social">
|
||||
<h3>Social</h3>
|
||||
<div class="col s6">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Other users and groups</span>
|
||||
@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s6">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Public corpora</span>
|
||||
|
Loading…
Reference in New Issue
Block a user