Quick-Search: Added Quick-search in the topbar
Changed how and what we store in elastic to unify it with how we store things in mongodb so we can have more generic javascript code to render the data. Elastic changes: Added: Node.project.url Altered to store id instead of url Node.picture Made Post searchable ./manage.py elastic reset_index ./manage.py elastic reindex Thanks to Pablo and Sybren
This commit is contained in:
23
src/scripts/js/es6/common/templates/users/Users.js
Normal file
23
src/scripts/js/es6/common/templates/users/Users.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentCreatorInterface } from '../component/ComponentCreatorInterface'
|
||||
|
||||
export class Users extends ComponentCreatorInterface {
|
||||
static create$listItem(userDoc) {
|
||||
return $('<div>')
|
||||
.addClass('users p-2 border-bottom')
|
||||
.attr('data-user-id', userDoc._id || userDoc.objectID )
|
||||
.append(
|
||||
$('<h6>')
|
||||
.addClass('mb-0 font-weight-bold')
|
||||
.text(userDoc.full_name),
|
||||
$('<small>')
|
||||
.text(userDoc.username),
|
||||
$('<small>')
|
||||
.addClass('d-block roles text-info')
|
||||
.text(userDoc.roles.join(', '))
|
||||
)
|
||||
}
|
||||
|
||||
static canCreate(candidate) {
|
||||
return !!candidate.username;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user