Atualizando abas documentos
This commit is contained in:
parent
695576b2c3
commit
a91ef1e0a8
1 changed files with 8 additions and 45 deletions
53
vendor/view/documents/documents_datagrid.php
vendored
53
vendor/view/documents/documents_datagrid.php
vendored
|
|
@ -29,15 +29,9 @@ if($Main->verifyToken()){
|
|||
$page = strtolower(isset($_POST['page']) ? (int)$Main->antiInjection( filter_input(INPUT_POST,'page', FILTER_SANITIZE_SPECIAL_CHARS) ) : 0);
|
||||
$max = isset($settings->{'app'}->{'datagrid'}->{'rows'}) ? $settings->{'app'}->{'datagrid'}->{'rows'} : 20;
|
||||
|
||||
/** Consulta a quantidade de registros */
|
||||
$NumberRecords = $Documents->Count((int)$documentsCategorysId, (string)$tag, (string)$label, true);
|
||||
$NumberRecords += $Documents->Count((int)$documentsCategorysId, (string)$tag, (string)$label, false);
|
||||
|
||||
/** Cores do card */
|
||||
$colors = [ 'success', 'info', 'warning', 'danger', 'secondary'];
|
||||
|
||||
/** Verifico a quantidade de registros localizados */
|
||||
if ($NumberRecords > 0){ //Caso tenha registros cadastrados, carrego o layout
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -116,7 +110,10 @@ if($Main->verifyToken()){
|
|||
<tbody>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
/** Conulta a quantidade de registros */
|
||||
$NumberRecords = $Documents->Count((int)$documentsCategorysId, (string)$tag, (string)$label, true);
|
||||
|
||||
/** Consulta os usuário cadastrados*/
|
||||
$DocumentsResult = $Documents->All($start, $max, (int)$documentsCategorysId, (string)$tag, (string)$label, true);
|
||||
foreach($DocumentsResult as $DocumentsKey => $Result){
|
||||
|
|
@ -171,6 +168,9 @@ if($Main->verifyToken()){
|
|||
<tbody>
|
||||
|
||||
<?php
|
||||
|
||||
/** Conulta a quantidade de registros */
|
||||
$NumberRecords = $Documents->Count((int)$documentsCategorysId, (string)$tag, (string)$label, false);
|
||||
|
||||
/** Consulta os usuário cadastrados*/
|
||||
$DocumentsResult = $Documents->All($start, $max, (int)$documentsCategorysId, (string)$tag, (string)$label, false);
|
||||
|
|
@ -242,44 +242,7 @@ if($Main->verifyToken()){
|
|||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
}else{//Caso não tenha registros cadastrados, informo ?>
|
||||
|
||||
<div class="col-lg-12">
|
||||
|
||||
<!-- Informo -->
|
||||
<div class="card shadow mb-12">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Atenção</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8 text-right">
|
||||
<h4>Não foram cadastrados documentos.</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 text-right">
|
||||
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="request('FOLDER=view&TABLE=documents&ACTION=documents_form', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)">
|
||||
|
||||
<i class="fas fa-plus-circle mr-1"></i>Cadastrar novo documento
|
||||
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
<?php
|
||||
|
||||
/** Caso o token de acesso seja inválido, informo */
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue