First commit
This commit is contained in:
48
application/demo/comment/comments.messages.js
Normal file
48
application/demo/comment/comments.messages.js
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
import renderCollection from '/unify/renderCollection.js';
|
||||
|
||||
import groups from '/user/group/user.group.permission.js';
|
||||
|
||||
import OR from '/unify/sql/OR.js';
|
||||
|
||||
import AND from '/unify/sql/AND.js';
|
||||
|
||||
import LIKE from '/unify/sql/LIKE.js';
|
||||
|
||||
|
||||
export default class commentsMessages extends renderCollection {
|
||||
|
||||
flexFlow = "column";
|
||||
|
||||
direction = "desc";
|
||||
|
||||
width = "-webkit-fill-available";
|
||||
|
||||
marginTop = 20;
|
||||
|
||||
debug = true;
|
||||
|
||||
node async search( value ) {
|
||||
|
||||
var filter = this.getFilter();
|
||||
|
||||
filter.search = OR( LIKE( filter.body, value ), LIKE( filter.title, value ) );
|
||||
|
||||
filter.direction = "desc";
|
||||
|
||||
}
|
||||
|
||||
permission() {
|
||||
|
||||
this.allow( groups.visitor, "READ" );
|
||||
|
||||
this.allow( groups.member, "READ" );
|
||||
|
||||
this.allow( groups.admin, "READ" );
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user