first implementation of follow mechanics

This commit is contained in:
Inga Kirschnick
2023-01-31 08:59:42 +01:00
parent 97bba2498b
commit e2cdcd3f7c
9 changed files with 202 additions and 12 deletions

View File

@ -1,7 +1,7 @@
class UserList extends ResourceList {
static autoInit() {
for (let publicUserListElement of document.querySelectorAll('.user-list:not(.no-autoinit)')) {
new UserList(publicUserListElement);
for (let userListElement of document.querySelectorAll('.user-list:not(.no-autoinit)')) {
new UserList(userListElement);
}
}
@ -41,14 +41,14 @@ class UserList extends ResourceList {
initListContainerElement() {
if (!this.listContainerElement.hasAttribute('id')) {
this.listContainerElement.id = Utils.generateElementId('public-user-list-');
this.listContainerElement.id = Utils.generateElementId('user-list-');
}
let listSearchElementId = Utils.generateElementId(`${this.listContainerElement.id}-search-`);
this.listContainerElement.innerHTML = `
<div class="input-field">
<i class="material-icons prefix">search</i>
<input id="${listSearchElementId}" class="search" type="text"></input>
<label for="${listSearchElementId}">Search public user</label>
<label for="${listSearchElementId}">Search user</label>
</div>
<table>
<thead>
@ -77,7 +77,7 @@ class UserList extends ResourceList {
'full-name': user.full_name ? user.full_name : '',
'location': user.location ? user.location : '',
'organization': user.organization ? user.organization : '',
'corpora-online': '0'
'corpora-online': '-'
};
};