Merge branch 'Akuket-edge' into edge

This commit is contained in:
Lauri Ojansivu 2019-04-20 16:29:08 +03:00
commit b627499acd
53 changed files with 166 additions and 56 deletions

View file

@ -3,8 +3,13 @@ template(name="people")
unless currentUser.isAdmin
| {{_ 'error-notAuthorized'}}
else
.content-title
span {{_ 'people'}}
.content-title.ext-box
.ext-box-left
span {{_ 'people'}}
input#searchInput(placeholder="{{_ 'search'}}")
button#searchButton {{_ 'enter'}}
.ext-box-right
span {{_ 'people-number'}} #{peopleNumber}
.content-body
.side-menu
ul
@ -103,4 +108,4 @@ template(name="editUserPopup")
| {{_ 'password'}}
input.js-profile-password(type="password")
input.primary.wide(type="submit" value="{{_ 'save'}}")
input.primary.wide(type="submit" value="{{_ 'save'}}")

View file

@ -8,6 +8,8 @@ BlazeComponent.extendComponent({
this.error = new ReactiveVar('');
this.loading = new ReactiveVar(false);
this.people = new ReactiveVar(true);
this.findUsersOptions = new ReactiveVar({});
this.number = new ReactiveVar(0);
this.page = new ReactiveVar(1);
this.loadNextPageLocked = false;
@ -26,6 +28,33 @@ BlazeComponent.extendComponent({
});
});
},
events() {
return [{
'click #searchButton'() {
this.filterPeople();
},
'keydown #searchInput'(event) {
if (event.keyCode === 13 && !event.shiftKey) {
this.filterPeople();
}
},
}];
},
filterPeople() {
const value = $('#searchInput').first().val();
if (value === '') {
this.findUsersOptions.set({});
} else {
const regex = new RegExp(value, 'i');
this.findUsersOptions.set({
$or: [
{ username: regex },
{ 'profile.fullname': regex },
{ 'emails.address': regex },
],
});
}
},
loadNextPage() {
if (this.loadNextPageLocked === false) {
this.page.set(this.page.get() + 1);
@ -49,9 +78,14 @@ BlazeComponent.extendComponent({
this.loading.set(w);
},
peopleList() {
return Users.find({}, {
const users = Users.find(this.findUsersOptions.get(), {
fields: {_id: true},
});
this.number.set(users.count());
return users;
},
peopleNumber() {
return this.number.get();
},
}).register('people');

View file

@ -13,3 +13,24 @@ table
tr:nth-child(even)
background-color: #dddddd;
.ext-box
display: flex;
flex-direction: row;
height: 34px;
.ext-box-left
display: flex;
width: 40%
span
vertical-align: center;
line-height: 34px;
margin-right: 10px;
input, button
margin: 0 10px 0 0;
padding: 0;
button
min-width: 60px;

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Během přihlašování nastala chyba",
"display-authentication-method": "Zobraz způsob ověřování",
"default-authentication-method": "Zobraz způsob ověřování",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Es ist ein Fehler beim Anmelden aufgetreten",
"display-authentication-method": "Anzeige Authentifizierungsverfahren",
"default-authentication-method": "Standardauthentifizierungsverfahren",
"duplicate-board": "Board duplizieren"
"duplicate-board": "Board duplizieren",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -686,5 +686,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is: "
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Ocurrió un error al intentar acceder",
"display-authentication-method": "Mostrar el método de autenticación",
"default-authentication-method": "Método de autenticación por defecto",
"duplicate-board": "Duplicar tablero"
"duplicate-board": "Duplicar tablero",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "هنگام تلاش برای ورود به یک خطا رخ داد",
"display-authentication-method": "نمایش نوع اعتبارسنجی",
"default-authentication-method": "نوع اعتبارسنجی پیشفرض",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Virhe tapahtui yrittäessä kirjautua sisään",
"display-authentication-method": "Näytä kirjautumistapa",
"default-authentication-method": "Oletus kirjautumistapa",
"duplicate-board": "Tee kaksoiskappale taulusta"
"duplicate-board": "Tee kaksoiskappale taulusta",
"people-number": "Ihmisten määrä on:"
}

View file

@ -386,7 +386,7 @@
"normal": "Normal",
"normal-desc": "Peut voir et modifier les cartes. Ne peut pas changer les paramètres.",
"not-accepted-yet": "L'invitation n'a pas encore été acceptée",
"notify-participate": "Recevoir les mises à jour de toutes les cartes auxquelles vous participez en tant que créateur ou que participant ",
"notify-participate": "Recevoir les mises à jour de toutes les cartes auxquelles vous participez en tant que créateur ou que participant",
"notify-watch": "Recevoir les mises à jour de tous les tableaux, listes ou cartes que vous suivez",
"optional": "optionnel",
"or": "ou",
@ -432,7 +432,7 @@
"shortcut-show-shortcuts": "Afficher cette liste de raccourcis",
"shortcut-toggle-filterbar": "Afficher/Masquer la barre latérale des filtres",
"shortcut-toggle-sidebar": "Afficher/Masquer la barre latérale du tableau",
"show-cards-minimum-count": "Afficher le nombre de cartes si la liste en contient plus de ",
"show-cards-minimum-count": "Afficher le nombre de cartes si la liste en contient plus de",
"sidebar-open": "Ouvrir le panneau",
"sidebar-close": "Fermer le panneau",
"signupPopup-title": "Créer un compte",
@ -683,5 +683,6 @@
"error-ldap-login": "Une erreur s'est produite lors de la tentative de connexion",
"display-authentication-method": "Afficher la méthode d'authentification",
"default-authentication-method": "Méthode d'authentification par défaut",
"duplicate-board": "Dupliquer le tableau"
"duplicate-board": "Dupliquer le tableau",
"people-number": "Le nombre d'utilisateurs est de :"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "אירעה שגיאה בעת ניסיון הכניסה",
"display-authentication-method": "הצגת שיטת אימות",
"default-authentication-method": "שיטת אימות כבררת מחדל",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Hiba történt bejelentkezés közben",
"display-authentication-method": "Hitelelesítési mód mutatása",
"default-authentication-method": "Alapértelmezett hitelesítési mód",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "C'è stato un errore mentre provavi ad effettuare il login",
"display-authentication-method": "Mostra il metodo di autenticazione",
"default-authentication-method": "Metodo di autenticazione predefinito",
"duplicate-board": "Duplica bacheca"
"duplicate-board": "Duplica bacheca",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Wystąpił błąd w trakcie logowania",
"display-authentication-method": "Wyświetl metodę logowania",
"default-authentication-method": "Domyślna metoda logowania",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Um erro ocorreu enquanto tentava entrar",
"display-authentication-method": "Mostrar Método de Autenticação",
"default-authentication-method": "Método de Autenticação Padrão",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Ошибка при попытке авторизации",
"display-authentication-method": "Показывать способ авторизации",
"default-authentication-method": "Способ авторизации по умолчанию",
"duplicate-board": "Клонировать доску"
"duplicate-board": "Клонировать доску",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Ett fel uppstod när du försökte logga in",
"display-authentication-method": "Visa autentiseringsmetod",
"default-authentication-method": "Standard autentiseringsmetod",
"duplicate-board": "Dubbletttavla"
"duplicate-board": "Dubbletttavla",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "Giriş yapmaya çalışırken bir hata oluştu",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "尝试登陆时出错",
"display-authentication-method": "显示认证方式",
"default-authentication-method": "缺省认证方式",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}

View file

@ -683,5 +683,6 @@
"error-ldap-login": "An error occurred while trying to login",
"display-authentication-method": "Display Authentication Method",
"default-authentication-method": "Default Authentication Method",
"duplicate-board": "Duplicate Board"
"duplicate-board": "Duplicate Board",
"people-number": "The number of people is:"
}