Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/UserSearch.vue
<template> | <template> | ||||
<div id="search-box" class="card"> | <div id="search-box" class="card"> | ||||
<div class="card-body"> | <div class="card-body"> | ||||
<form @submit.prevent="searchUser" class="row justify-content-center"> | <form @submit.prevent="searchUser" class="row justify-content-center"> | ||||
<div class="input-group col-sm-8"> | <div class="input-group col-sm-8"> | ||||
<input class="form-control" type="text" placeholder="User ID, email or domain" v-model="search"> | <input class="form-control" type="text" :placeholder="$t('user.search-pl')" v-model="search"> | ||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> Search</button> | <button type="submit" class="btn btn-primary"><svg-icon icon="search"></svg-icon> {{ $t('btn.search') }}</button> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</form> | </form> | ||||
<table v-if="users.length" class="table table-sm table-hover mt-4"> | <table v-if="users.length" class="table table-sm table-hover mt-4"> | ||||
<thead class="thead-light"> | <thead class="thead-light"> | ||||
<tr> | <tr> | ||||
<th scope="col">Primary Email</th> | <th scope="col">{{ $t('form.primary-email') }}</th> | ||||
<th scope="col">ID</th> | <th scope="col">{{ $t('form.id') }}</th> | ||||
<th scope="col" class="d-none d-md-table-cell">Created</th> | <th scope="col" class="d-none d-md-table-cell">{{ $t('form.created') }}</th> | ||||
<th scope="col" class="d-none d-md-table-cell">Deleted</th> | <th scope="col" class="d-none d-md-table-cell">{{ $t('form.deleted') }}</th> | ||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> | ||||
<tr v-for="user in users" :id="'user' + user.id" :key="user.id" :class="user.isDeleted ? 'text-secondary' : ''"> | <tr v-for="user in users" :id="'user' + user.id" :key="user.id" :class="user.isDeleted ? 'text-secondary' : ''"> | ||||
<td class="text-nowrap"> | <td class="text-nowrap"> | ||||
<svg-icon icon="user" :class="$root.userStatusClass(user)" :title="$root.userStatusText(user)"></svg-icon> | <svg-icon icon="user" :class="$root.userStatusClass(user)" :title="$root.userStatusText(user)"></svg-icon> | ||||
<router-link v-if="!user.isDeleted" :to="{ path: 'user/' + user.id }">{{ user.email }}</router-link> | <router-link v-if="!user.isDeleted" :to="{ path: 'user/' + user.id }">{{ user.email }}</router-link> | ||||
<span v-if="user.isDeleted">{{ user.email }}</span> | <span v-if="user.isDeleted">{{ user.email }}</span> | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |