refractoring of user list
这个提交包含在:
父节点
a572b4c234
当前提交
773cbec28a
共有 1 个文件被更改,包括 59 次插入 和 49 次删除
|
|
@ -1,63 +1,73 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2><?php echo $page_title; ?></h2>
|
<h2><?php echo $page_title; ?></h2>
|
||||||
|
|
||||||
<?php if($this->session->flashdata('notice')) { ?>
|
<?php if ($this->session->flashdata('notice')) { ?>
|
||||||
<!-- Display Message -->
|
<!-- Display Message -->
|
||||||
<div class="alert alert-info" role="alert">
|
<div class="alert alert-info" role="alert">
|
||||||
<?php echo $this->session->flashdata('notice'); ?>
|
<?php echo $this->session->flashdata('notice'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<?php echo lang('admin_user_list'); ?>
|
<?php echo lang('admin_user_list'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="card-text"><?php echo lang('admin_user_line1'); ?></p>
|
<p class="card-text"><?php echo lang('admin_user_line1'); ?></p>
|
||||||
<p class="card-text"><?php echo lang('admin_user_line2'); ?></p>
|
<p class="card-text"><?php echo lang('admin_user_line2'); ?></p>
|
||||||
<p class="card-text"><?php echo lang('admin_user_line3'); ?></p>
|
<p class="card-text"><?php echo lang('admin_user_line3'); ?></p>
|
||||||
<div class="table-responsive">
|
<p><a class="btn btn-primary" href="<?php echo site_url('user/add'); ?>"><i class="fas fa-user-plus"></i> <?php echo lang('admin_create_user'); ?></a></p>
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col"><?php echo lang('admin_user'); ?></th>
|
|
||||||
<th scope="col"><?php echo lang('admin_email'); ?></th>
|
|
||||||
<th scope="col"><?php echo lang('admin_type'); ?></th>
|
|
||||||
<th scope="col"><?php echo lang('admin_options'); ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<?php
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><?php echo lang('admin_user'); ?></th>
|
||||||
|
<th scope="col"><?php echo lang('gen_hamradio_callsign'); ?></th>
|
||||||
|
<th scope="col"><?php echo lang('admin_email'); ?></th>
|
||||||
|
<th scope="col"><?php echo lang('admin_type'); ?></th>
|
||||||
|
<th style="text-align: center; vertical-align: middle;" scope="col"><?php echo lang('admin_edit'); ?></th>
|
||||||
|
<th style="text-align: center; vertical-align: middle;" scope="col">Password Reset</th>
|
||||||
|
<th style="text-align: center; vertical-align: middle;" scope="col"><?php echo lang('admin_delete'); ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
foreach ($results->result() as $row) { ?>
|
|
||||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
|
||||||
<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
|
|
||||||
<td><?php echo $row->user_email; ?></td>
|
|
||||||
<td><?php $l = $this->config->item('auth_level'); echo $l[$row->user_type]; ?></td>
|
|
||||||
<td>
|
|
||||||
<a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-edit"></i> <?php echo lang('admin_edit'); ?></a>
|
|
||||||
<?php
|
<?php
|
||||||
if ($_SESSION['user_id'] != $row->user_id) {
|
|
||||||
echo "<a href=" . site_url('user/delete'). "/" . $row->user_id . " class=\"btn btn-danger btn-sm\"><i class=\"fas fa-user-minus\"></i> ".lang('admin_delete')."</a>";
|
$i = 0;
|
||||||
}
|
foreach ($results->result() as $row) { ?>
|
||||||
?>
|
<?php echo '<tr class="tr' . ($i & 1) . '">'; ?>
|
||||||
</td>
|
<td><a href="<?php echo site_url('user/edit') . "/" . $row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
|
||||||
</tr>
|
<td><?php echo $row->user_callsign; ?></td>
|
||||||
<?php $i++; } ?>
|
<td><?php echo $row->user_email; ?></td>
|
||||||
</tbody>
|
<td><?php $l = $this->config->item('auth_level');
|
||||||
</table>
|
echo $l[$row->user_type]; ?></td>
|
||||||
|
<td style="text-align: center; vertical-align: middle;"><a href="<?php echo site_url('user/edit') . "/" . $row->user_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-edit"></i></a>
|
||||||
|
<td style="text-align: center; vertical-align: middle;">
|
||||||
|
<?php
|
||||||
|
if ($_SESSION['user_id'] != $row->user_id) {
|
||||||
|
echo "<a href=" . site_url('user/admin_send_passwort_reset') . "/" . $row->user_id . " class=\"btn btn-primary btn-sm ms-1\"><i class=\"fas fa-key\"></i></a>";
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
|
<td style="text-align: center; vertical-align: middle;">
|
||||||
|
<?php
|
||||||
|
if ($_SESSION['user_id'] != $row->user_id) {
|
||||||
|
echo "<a href=" . site_url('user/delete') . "/" . $row->user_id . " class=\"btn btn-danger btn-sm\"><i class=\"fas fa-user-minus\"></i></a>";
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php $i++;
|
||||||
|
} ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
</div>
|
||||||
<a class="btn btn-primary" href="<?php echo site_url('user/add'); ?>"><i class="fas fa-user-plus"></i> <?php echo lang('admin_create_user'); ?></a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
正在加载…
在新工单中引用