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:
77
ci4/app/Views/themes/vuexy/form/user/_userFormItems.php
Executable file
77
ci4/app/Views/themes/vuexy/form/user/_userFormItems.php
Executable file
@ -0,0 +1,77 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="firstName" class="form-label">
|
||||
<?= lang('Users.firstName') ?>
|
||||
</label>
|
||||
<input tabindex="1" type="text" id="firstName" name="first_name" maxLength="150" class="form-control"
|
||||
value="<?= old('first_name', $user->first_name) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">
|
||||
<?= lang('Users.email') ?>*
|
||||
</label>
|
||||
<input tabindex="13" type="email" id="email" name="email" maxLength="150" class="form-control"
|
||||
value="<?= old('email', $user->email) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-group">
|
||||
<label for="group" class="form-label"> <?= lang('Users.group') ?></label>
|
||||
<select tabindex="17" name="group[]" id="group" multiple="multiple"
|
||||
class="form-control select2 form-select">
|
||||
<option value=""><?= lang('Basic.global.pleaseSelectA', [lang('Users.group')]) ?></option>
|
||||
<?php
|
||||
$selectedGroups = isset($selectedGroups) && is_array($selectedGroups) ? $selectedGroups : [];
|
||||
$selectedKeywords = array_map(fn($group) => $group->group, $selectedGroups);
|
||||
foreach ($groups as $item) :
|
||||
$isSelected = in_array($item->keyword, $selectedKeywords) ? 'selected' : '';
|
||||
?>
|
||||
<option value="<?= $item->keyword ?>"
|
||||
data-select2-id=<?= $item->keyword ?> <?= $isSelected ?>>
|
||||
<?= $item->title ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
|
||||
</div><!--//.col -->
|
||||
<div class="col-md-12 col-lg-6 px-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="lastName" class="form-label">
|
||||
<?= lang('Users.lastName') ?>
|
||||
</label>
|
||||
<input tabindex="2" type="text" id="lastName" name="last_name" maxLength="150" class="form-control"
|
||||
value="<?= old('last_name', $user->last_name) ?>">
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="status" class="form-label">
|
||||
<?= lang('Users.blocked') ?>
|
||||
</label>
|
||||
<?php $isBanned = old('blocked', $user->status); ?>
|
||||
<select tabindex="12" name="status" id="status" class="select2 form-control">
|
||||
<option value="0" <?= is_null($isBanned) ? 'selected' : '' ?>><?= lang("Users.non_blocked") ?></option>
|
||||
<option value="1" <?= $isBanned === "banned" ? 'selected' : '' ?>><?= lang("Users.blocked") ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="active" class="form-label">
|
||||
<?= lang('Users.status') ?>
|
||||
</label>
|
||||
<?php $isActive = old('status', $user->active); ?>
|
||||
<select tabindex="16" name="active" id="active" class="select2 form-control">
|
||||
<option value="1" <?= $isActive ? 'selected' : '' ?>><?= lang("Users.global_active") ?></option>
|
||||
<option value="0" <?= $isActive ? '' : 'selected' ?>><?= lang("Users.global_inactive") ?></option>
|
||||
</select>
|
||||
</div><!--//.mb-3 -->
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!-- //.row -->
|
||||
30
ci4/app/Views/themes/vuexy/form/user/viewUserForm.php
Executable file
30
ci4/app/Views/themes/vuexy/form/user/viewUserForm.php
Executable file
@ -0,0 +1,30 @@
|
||||
<?= $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">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<form id="userForm" method="post" class="card-body" action="<?= $formAction ?>">
|
||||
<?= csrf_field() ?>
|
||||
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
|
||||
<?= view("themes/backend/vuexy/form/user/_userFormItems") ?>
|
||||
<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("userIndex"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary"]) ?>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.card-body -->
|
||||
</div><!-- //.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= $this->endSection() ?>
|
||||
120
ci4/app/Views/themes/vuexy/form/user/viewUserList.php
Executable file
120
ci4/app/Views/themes/vuexy/form/user/viewUserList.php
Executable file
@ -0,0 +1,120 @@
|
||||
<?=$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('Users.userList') ?></h3>
|
||||
<?=anchor(route_to('newUser'), lang('Basic.global.addNew').' '.lang('Users.user'), ['class'=>'btn btn-primary float-end']); ?>
|
||||
</div><!--//.card-header -->
|
||||
<div class="card-body">
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
|
||||
<table id="tableOfUsers" class="table table-striped table-hover using-data-table" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= lang('Users.firstName') ?></th>
|
||||
<th><?= lang('Users.lastName') ?></th>
|
||||
<th><?= lang('Users.lastAccess') ?></th>
|
||||
<?php /*
|
||||
<th><?= lang('Users.group') ?></th>
|
||||
<th><?= lang('Users.mobile') ?></th>
|
||||
<th><?= lang('Users.email') ?></th>
|
||||
<th><?= lang('Users.address') ?></th>
|
||||
<th><?= lang('Users.city') ?></th>
|
||||
<th><?= lang('Users.state') ?></th>
|
||||
<th><?= lang('Users.country') ?></th>
|
||||
<th><?= lang('Users.zipCode') ?></th>
|
||||
<th><?= lang('Users.lastIp') ?></th>
|
||||
|
||||
<th><?= lang('Users.picture') ?></th>
|
||||
<th><?= lang('Users.language') ?></th>
|
||||
<th><?= lang('Users.blocked') ?></th>
|
||||
<th><?= lang('Users.emailConfirmed') ?></th>
|
||||
*/ ?>
|
||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($userList as $item ) : ?>
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->first_name) || strlen($item->first_name) < 51 ? esc($item->first_name) : character_limiter(esc($item->first_name), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->last_name) || strlen($item->last_name) < 51 ? esc($item->last_name) : character_limiter(esc($item->last_name), 50) ?>
|
||||
</td>
|
||||
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->last_active) ? '' : date('d/m/Y H:m:s', strtotime($item->last_active)) ?>
|
||||
</td>
|
||||
|
||||
<?php /*
|
||||
|
||||
<td class="align-middle">
|
||||
<?= empty($user_model->getGroupsTitles($item->token)) || strlen($user_model->getGroupsTitles($item->token)) < 51 ? esc($user_model->getGroupsTitles($item->token)) : character_limiter($user_model->getGroupsTitles($item->token), 50) ?>
|
||||
</td>
|
||||
|
||||
<td class="align-middle">
|
||||
<?= empty($item->mobile) || strlen($item->mobile) < 51 ? esc($item->mobile) : character_limiter(esc($item->mobile), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->email) ?>
|
||||
</td>
|
||||
|
||||
<td class="align-middle">
|
||||
<?= empty($item->address) || strlen($item->address) < 51 ? esc($item->address) : character_limiter(esc($item->address), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->city) || strlen($item->city) < 51 ? esc($item->city) : character_limiter(esc($item->city), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->state) || strlen($item->state) < 51 ? esc($item->state) : character_limiter(esc($item->state), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->country) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->zip_code) || strlen($item->zip_code) < 51 ? esc($item->zip_code) : character_limiter(esc($item->zip_code), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->last_ip) || strlen($item->last_ip) < 51 ? esc($item->last_ip) : character_limiter(esc($item->last_ip), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->last_access) ? '' : date('d/m/Y H:m:s', strtotime($item->last_access)) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= empty($item->picture) || strlen($item->picture) < 51 ? esc($item->picture) : character_limiter(esc($item->picture), 50) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->language) ?>
|
||||
</td>
|
||||
|
||||
<td class="align-middle text-nowrap">
|
||||
<?= empty($item->blocked) ? '' : date('d/m/Y H:m:s', strtotime($item->blocked)) ?>
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<?= esc($item->email_confirmed) ?>
|
||||
</td>
|
||||
*/ ?>
|
||||
|
||||
<td class="align-middle text-center text-nowrap">
|
||||
<?=anchor(route_to('editUser', $item->id), "<i class='ti ti-pencil ti-sm mx-2'></i>", ['class'=>'text-body', 'data-id'=>$item->id,]); ?>
|
||||
<?=anchor('#confirm2delete', "<i class='ti ti-trash ti-sm mx-2'></i>", ['class'=>'text-body', 'data-href'=>route_to('deleteUser', $item->id), 'data-bs-toggle'=>'modal', 'data-bs-target'=>'#confirm2delete']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</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