-
-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adicionar campo situação nos Usuarios (#2449)
* Adicionar campo situação nos Usuarios * Colocando Ativo como Verde Inativo como vermelho * Melhorando a disposição do código
- Loading branch information
Showing
1 changed file
with
65 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,75 @@ | ||
<style> | ||
select { | ||
width: 70px; | ||
} | ||
select { | ||
width: 70px; | ||
} | ||
.situacao-ativo { | ||
background-color: #00cd00; | ||
color: white; | ||
} | ||
.situacao-inativo { | ||
background-color: #ff0000; | ||
color: white; | ||
} | ||
</style> | ||
|
||
<div class="new122"> | ||
<div class="widget-title" style="margin:-15px -10px 0"> | ||
<h5>Usuários</h5> | ||
<h5>Usuários</h5> | ||
</div> | ||
<a href="<?php echo base_url() ?>index.php/usuarios/adicionar" class="button btn btn-success" style="max-width: 160px"> | ||
<span class="button__icon"><i class='bx bx-plus-circle'></i></span><span class="button__text2">Adicionar Usuário</span></a> | ||
<a href="<?= base_url('index.php/usuarios/adicionar') ?>" class="button btn btn-success" style="max-width: 160px"> | ||
<span class="button__icon"><i class='bx bx-plus-circle'></i></span><span class="button__text2">Adicionar Usuário</span> | ||
</a> | ||
|
||
<div class="widget-box"> | ||
<div class="widget-title" style="margin: -20px 0 0"> | ||
<span class="icon"> | ||
<i class="fas fa-cash-register"></i> | ||
</span> | ||
<h5 style="padding: 3px 0"></h5> | ||
<div class="widget-box"> | ||
<div class="widget-title" style="margin: -20px 0 0"> | ||
<span class="icon"> | ||
<i class="fas fa-cash-register"></i> | ||
</span> | ||
<h5 style="padding: 3px 0"></h5> | ||
</div> | ||
<div class="widget-content nopadding tab-content"> | ||
<table id="tabela" class="table table-bordered "> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>Nome</th> | ||
<th>CPF</th> | ||
<th>Telefone</th> | ||
<th>Nível</th> | ||
<th>Situação</th> | ||
<th>Validade</th> | ||
<th>Ações</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php if (empty($results)): ?> | ||
<tr> | ||
<td colspan="8">Nenhum Usuário Cadastrado</td> | ||
</tr> | ||
<?php else: ?> | ||
<?php foreach ($results as $r): ?> | ||
<tr> | ||
<td><?= $r->idUsuarios ?></td> | ||
<td><?= $r->nome ?></td> | ||
<td><?= $r->cpf ?></td> | ||
<td><?= $r->telefone ?></td> | ||
<td><?= $r->permissao ?></td> | ||
<?php | ||
$situacao = ($r->situacao == 1) ? 'Ativo' : 'Inativo'; | ||
$situacaoClasse = ($r->situacao == 1) ? 'situacao-ativo' : 'situacao-inativo'; | ||
?> | ||
<td><span class="badge <?= $situacaoClasse ?>"><?= ucfirst($situacao) ?></span></td> | ||
<td><?= $r->dataExpiracao ?></td> | ||
<td> | ||
<a href="<?= base_url('index.php/usuarios/editar/' . $r->idUsuarios) ?>" class="btn-nwe3" title="Editar OS"><i class="bx bx-edit"></i></a> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div class="widget-content nopadding tab-content"> | ||
<table id="tabela" class="table table-bordered "> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>Nome</th> | ||
<th>CPF</th> | ||
<th>Telefone</th> | ||
<th>Nível</th> | ||
<th>Validade</th> | ||
<th>Ações</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php | ||
if (!$results) { | ||
echo '<tr> | ||
<td colspan="5">Nenhum Usuário Cadastrado</td> | ||
</tr>'; | ||
} | ||
foreach ($results as $r) { | ||
echo '<tr>'; | ||
echo '<td>' . $r->idUsuarios . '</td>'; | ||
echo '<td>' . $r->nome . '</td>'; | ||
echo '<td>' . $r->cpf . '</td>'; | ||
echo '<td>' . $r->telefone . '</td>'; | ||
echo '<td>' . $r->permissao . '</td>'; | ||
echo '<td>' . $r->dataExpiracao . '</td>'; | ||
echo '<td> | ||
<a href="' . base_url() . 'index.php/usuarios/editar/' . $r->idUsuarios . '" class="btn-nwe3" title="Editar OS"><i class="bx bx-edit"></i></a> | ||
</td>'; | ||
echo '</tr>'; | ||
} ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?php echo $this->pagination->create_links(); ?> | ||
<?= $this->pagination->create_links(); ?> |