survey/templates/modern/dashboard/userzuordnung.html
2023-03-28 19:02:02 +02:00

154 lines
6.0 KiB
HTML

{if $action == ''}
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="description" content="Scrollable tab for Bootstrap 5">
<meta name="keywords" content="Bootstrap, Bootstrap 5, Tabs">
<meta name="author" content="Federico Navarrete">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<script src="js/all.js" crossorigin="anonymous"></script>
<!-- data Table: https://datatables.net/ -->
<script src="../bootstrap/data-table/jquery.min.js"></script>
<link rel="stylesheet" href="../bootstrap/data-table/dataTables.bootstrap5.min.css"></style>
<link rel="stylesheet" href="../bootstrap/data-table/rowReorder.dataTables.min.css"></style>
<script type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"></script>
<script type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"></script>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<script src="../jquery/jquery-3.4.1.min.js"></script>
<!-- jQuery UI CSS
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
-->
<script src="../jquery/jquery-ui.js"></script>
<style>
.btn-group > .btn{
margin-bottom:20px;
border-radius:20px !important;
}
.ui-sortable tr {
cursor:pointer;
}
.ui-sortable tr:hover {
background:rgba(244,251,17,0.45);
}
.table>:not(caption)>*>* {
padding: 0.1rem 0.1rem;
}
p {
margin: 0;
}
</style>
</head>
<!--<body onload="if(document.erfassen)document.erfassen.{$umfrageerf_focus}.focus();return false;">-->
<body class="sb-nav-fixed">
<main>
<!--Anwendung-->
<script src="../js/components/admin_rollen.js"></script>
<p class="text-center"><b>{$rollenzuordnung_bezeichnung}</b></p>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Nicht zugewiesene Benutzer
</div>
<div class="card-body">
<table id="notassigned" class="table table-striped table-bordered table-responsive table-hover" >
<thead class="d-none">
<tr>
<th>Vorname</th>
<th>Nachname</th>
<th>Aktion</th>
</tr>
</thead>
<tbody>
{section name=table_data loop=$table_data}
<tr>
<td>{$table_data[table_data].vorname}</td>
<td>{$table_data[table_data].nachname}</td>
<td>
<p class="text-center">
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfuser('{$table_data[table_data].uid}|{$rollen_edit}')"><i class="fa-solid fa-plus" style="width:18px;"></i></a>
</p>
</td>
</tr>
{/section}
</tbody>
</table>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Zugewiesene Benutzer
</div>
<div class="card-body">
<table id="assigned" class="table table-striped table-bordered table-responsive table-hover" >
<thead class="d-none">
<tr>
<th>Vorname</th>
<th>Nachname</th>
<th>Aktion</th>
</tr>
</thead>
<tbody>
{section name=table_data1 loop=$table_data1}
<tr>
<td>{$table_data1[table_data1].vorname}</td>
<td>{$table_data1[table_data1].nachname}</td>
<td>
<p class="text-center">
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="deluser('{$table_data1[table_data1].uid}|{$rollen_edit}')"><i class="fa-solid fa-minus" style="width:18px;"></i></a>
</p>
</td>
</tr>
{/section}
</tbody>
</table>
</div>
</div>
<div id="msg"></div>
</main>
</div>
<script src="../bootstrap/node_modules/move-js/move.js"></script>
<link href="../bootstrap/dist/scrollable-tabs.min.css" rel="stylesheet">
<script src="../bootstrap/dist/scrollable-tabs.min.js"></script>
</body>
<script>
$(document).ready(function(){
var table = new DataTable('#notassigned', {
rowReorder: true,
pageLength: 5,
language: {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
search: "",
lengthMenu: "_MENU_ Zeilen",
},
});
var table2 = new DataTable('#assigned', {
rowReorder: true,
pageLength: 5,
language: {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
search: "",
lengthMenu: "_MENU_ Zeilen",
},
});
});
</script>
</html>
{/if}