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