mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
intentando resolver conflictos
This commit is contained in:
121
ci4/app/Views/themes/vuexy/form/group/viewUserGroupForm.php
Executable file
121
ci4/app/Views/themes/vuexy/form/group/viewUserGroupForm.php
Executable file
@ -0,0 +1,121 @@
|
||||
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section("content") ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card card-info">
|
||||
<h3 class="card-header"><?= lang("RolesPermisos.editRol") ?></h3>
|
||||
<div class="card-body">
|
||||
<?= formAlert() ?>
|
||||
<form id="groupForm" method="post" class="card-body" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
|
||||
<div class="row g-3">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
value="<?= old('id', $group->id) ?>"
|
||||
>
|
||||
<div class="col-md-4">
|
||||
<label for="title" class="form-label text-dark">
|
||||
<?= lang("RolesPermisos.rolName") ?>
|
||||
</label>
|
||||
<input type="text" name="title" id="title" class="form-control"
|
||||
value="<?= old('title', $group->title) ?>">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<label for="description" class="form-label text-dark">
|
||||
<?= lang("RolesPermisos.rolDescription") ?>
|
||||
</label>
|
||||
<input type="text" name="description" id="description" class="form-control"
|
||||
value="<?= old('description', $group->description) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mt-3">
|
||||
<div class="col-md-12">
|
||||
<h5><?= lang("RolesPermisos.rolPermissions") ?></h5>
|
||||
<!-- Permission table -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush-spacing">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-nowrap fw-semibold" colspan="1">
|
||||
<?= lang("RolesPermisos.adminRol") ?>
|
||||
<i class="ti ti-info-circle" data-bs-toggle="tooltip"
|
||||
data-bs-placement="top"
|
||||
aria-label="<?= lang("RolesPermisos.adminRolTooltip") ?>"
|
||||
data-bs-original-title="<?= lang("RolesPermisos.adminRolTooltip") ?>">
|
||||
</i>
|
||||
</td>
|
||||
<td colspan="3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="selectAll">
|
||||
<label class="form-check-label" for="selectAll">
|
||||
<?= lang("RolesPermisos.selectAll") ?>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($permisos as $permiso): ?>
|
||||
<tr>
|
||||
<td colspan="4" class="text-nowrap fw-semibold">
|
||||
<?= $permiso->name ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ($permiso->rules as $key => $rules): ?>
|
||||
<tr>
|
||||
<td class="text-nowrap fw-semibold" >
|
||||
  <?= lang("RolesPermisos." . convertToCamelCase($key) . "Section") ?>
|
||||
</td>
|
||||
<?php foreach ($rules as $rule): ?>
|
||||
<td>
|
||||
<div class="form-check">
|
||||
<input type="checkbox"
|
||||
id="<?= $key . '_' . $rule ?>"
|
||||
name="<?= $key . '_' . $rule ?>"
|
||||
class="form-check-input"
|
||||
<?= ruleIsChecked($group->rules, $key, $rule) ? 'checked' : '' ?>
|
||||
>
|
||||
<label for="<?= $key . '_' . $rule ?>" class="form-check-label">
|
||||
<?= lang("RolesPermisos." . $rule . "Permission") ?>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt-4">
|
||||
<input type="submit" class="btn btn-primary float-start me-sm-3 me-1" name="save"
|
||||
value="<?= lang("Basic.global.Save") ?>">
|
||||
<?= anchor(route_to("groupIndex"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary"]) ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div><!-- /.card-body -->
|
||||
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('additionalInlineJs') ?>
|
||||
|
||||
$('input[name="selectAll"]').click(function() {
|
||||
var checkedStatus = this.checked;
|
||||
$('input[type="checkbox"]').each(function() {
|
||||
this.checked = checkedStatus;
|
||||
});
|
||||
});
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
82
ci4/app/Views/themes/vuexy/form/group/viewUserGroupList.php
Executable file
82
ci4/app/Views/themes/vuexy/form/group/viewUserGroupList.php
Executable file
@ -0,0 +1,82 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('RolesPermisos.pageTitle') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="container-xxl flex-grow-1 container-p-y">
|
||||
<!-- Role cards -->
|
||||
<div class="row g-4">
|
||||
<div class="col-xl-4 col-lg-6 col-md-6">
|
||||
<div class="card h-100">
|
||||
<div class="row h-100">
|
||||
<div class="col-sm-5">
|
||||
<div class="d-flex align-items-end h-100 justify-content-center mt-sm-0 mt-3">
|
||||
<img
|
||||
src="<?= site_url('themes/vuexy/img/illustrations/add-new-roles.png') ?>"
|
||||
class="img-fluid mt-sm-4 mt-md-0"
|
||||
alt="add-new-roles"
|
||||
width="83"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="card-body text-sm-end text-center ps-sm-0">
|
||||
<button
|
||||
onclick="window.location='<?= route_to('newGroup') ?>'"
|
||||
class="btn btn-primary mb-2 text-nowrap add-new-role"
|
||||
>
|
||||
<?= lang('Basic.global.addNew') ?>
|
||||
</button>
|
||||
<p class="mb-0 mt-1"><?= lang("RolesPermisos.addRol") ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php foreach ($userGroupList as $item) : ?>
|
||||
<div class="col-xl-4 col-lg-6 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h6 class="fw-normal mb-2"><?= $model->getUsersWithRol($item->keyword); ?><?= lang("RolesPermisos.totalUsers") ?></h6>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-end mt-1">
|
||||
<div class="role-heading">
|
||||
<h4 class="mb-1"><?= esc($item->title) ?></h4>
|
||||
<a href="<?= route_to('editGroup', $item->id) ?>">
|
||||
<span><?= lang('Basic.global.edit') ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?=
|
||||
anchor('#confirm2delete', "<i class='ti ti-trash ti-md'></i>",
|
||||
[
|
||||
'class' => 'text-muted',
|
||||
'data-href' => route_to('deleteGroup', $item->id),
|
||||
'data-bs-toggle' => 'modal',
|
||||
'data-bs-target' => '#confirm2delete'
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<!--/ Role cards -->
|
||||
</div>
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user