Rollen/Rechte

This commit is contained in:
aschwarz 2023-03-28 13:06:08 +02:00
parent aee828463e
commit 0b55c7d5cb
18 changed files with 1733 additions and 303 deletions

View File

@ -0,0 +1,141 @@
.table-responsive {
margin: 30px 0;
}
.table-wrapper {
min-width: 1000px;
background: #fff;
padding: 20px 25px;
border-radius: 3px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {
padding-bottom: 15px;
background: #299be4;
color: #fff;
padding: 16px 30px;
margin: -20px -25px 10px;
border-radius: 3px 3px 0 0;
}
.table-title h2 {
margin: 5px 0 0;
font-size: 24px;
}
.table-title .btn {
color: #566787;
float: right;
font-size: 13px;
background: #fff;
border: none;
min-width: 50px;
border-radius: 2px;
border: none;
outline: none !important;
margin-left: 10px;
}
.table-title .btn:hover, .table-title .btn:focus {
color: #566787;
background: #f2f2f2;
}
.table-title .btn i {
float: left;
font-size: 21px;
margin-right: 5px;
}
.table-title .btn span {
float: left;
margin-top: 2px;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
padding: 12px 15px;
vertical-align: middle;
}
table.table tr th:first-child {
width: 60px;
}
table.table tr th:last-child {
width: 100px;
}
table.table-striped tbody tr:nth-of-type(odd) {
background-color: #fcfcfc;
}
table.table-striped.table-hover tbody tr:hover {
background: #f5f5f5;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table td:last-child i {
opacity: 0.9;
font-size: 22px;
margin: 0 5px;
}
table.table td a {
font-weight: bold;
color: #566787;
display: inline-block;
text-decoration: none;
}
table.table td a:hover {
color: #2196F3;
}
table.table td a.settings {
color: #2196F3;
}
table.table td a.delete {
color: #F44336;
}
table.table td i {
font-size: 19px;
}
table.table .avatar {
border-radius: 50%;
vertical-align: middle;
margin-right: 10px;
}
.status {
font-size: 30px;
margin: 2px 2px 0 0;
display: inline-block;
vertical-align: middle;
line-height: 10px;
}
.pagination {
float: right;
margin: 0 0 5px;
}
.pagination li a {
border: none;
font-size: 13px;
min-width: 30px;
min-height: 30px;
color: #999;
margin: 0 2px;
line-height: 30px;
border-radius: 2px !important;
text-align: center;
padding: 0 6px;
}
.pagination li a:hover {
color: #666;
}
.pagination li.active a, .pagination li.active a.page-link {
background: #03A9F4;
}
.pagination li.active a:hover {
background: #0397d6;
}
.pagination li.disabled i {
color: #ccc;
}
.pagination li i {
font-size: 16px;
padding-top: 6px
}
.hint-text {
float: left;
margin-top: 10px;
font-size: 13px;
}

143
controller/admin_rollen.php Normal file
View File

@ -0,0 +1,143 @@
<?php
require_once("../config.inc.php");
$function = $_POST['function'];
if ($function == 'rollesave') {
if (isset($_POST['rollenname'])) {
$rollenname = $_POST['rollenname'];
}
$db = dbconnect();
$result = $db->query("SELECT count(*) Anz FROM jumi_admin_rolle WHERE upper(bezeichnung)=upper('$rollenname')");
$row = $result->fetch_array();
if ($rollenname == ''){ //verschlüsseltes Passwort überprüfen
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Rollenname darf nicht leer sein.</div>|***|error';
exit;
}else if ($row['Anz'] > 0){ //verschlüsseltes Passwort überprüfen
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Rollenname ist bereits vorhanden.</div>|***|error';
exit;
}else{
$sql1 = $db->query("INSERT INTO jumi_admin_rolle ( bezeichnung ) VALUES ( '$rollenname' )");
if($sql1){
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Rollenname wurde gespeichert!</div>|***|success';
exit;
}else{
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Rollenname wurde nicht gespeichert: Insert Fehler Datenbank.</div>|***|error';
exit;
}
}
}
if ($function == 'erfzuordnung') {
if (isset($_POST['rid'])) {
$rid = $_POST['rid'];
}
if (isset($_POST['meid'])) {
$meid = $_POST['meid'];
}
$db = dbconnect();
$sql1 = $db->query("INSERT INTO jumi_admin_rollen_rechte_zuord ( rid, meid) VALUES ( $rid, $meid )");
if($sql1){
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Das Recht wurde zugewiesen!</div>|***|success|***|'.$rid;
exit;
}else{
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Das Recht wurde nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
exit;
}
}
if ($function == 'delzuordnung') {
if (isset($_POST['rid'])) {
$rid = $_POST['rid'];
}
if (isset($_POST['meid'])) {
$meid = $_POST['meid'];
}
$sql1 = $db->query("DELETE FROM jumi_admin_rollen_rechte_zuord WHERE rid='$rid' AND meid='$meid'");
if($sql1){
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Das Recht wurde gelöscht!</div>|***|success|***|'.$rid;
exit;
}else{
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Das Recht wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
exit;
}
}
if ($function == 'erfuser') {
if (isset($_POST['rid'])) {
$rid = $_POST['rid'];
}
if (isset($_POST['uid'])) {
$uid = $_POST['uid'];
}
$db = dbconnect();
$sql1 = $db->query("INSERT INTO jumi_admin_rollen_user_zuord ( rid, uid) VALUES ( $rid, $uid )");
if($sql1){
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde zugewiesen!</div>|***|success|***|'.$rid;
exit;
}else{
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht zugewiesen: Insert Fehler Datenbank.</div>|***|error';
exit;
}
}
if ($function == 'deluser') {
if (isset($_POST['rid'])) {
$rid = $_POST['rid'];
}
if (isset($_POST['uid'])) {
$uid = $_POST['uid'];
}
$sql1 = $db->query("DELETE FROM jumi_admin_rollen_user_zuord WHERE rid='$rid' AND uid='$uid'");
if($sql1){
echo '<div class="alert alert-success"><i class="fa fa-fw fa-thumbs-up"></i> Der Benutzer wurde gelöscht!</div>|***|success|***|'.$rid;
exit;
}else{
echo '<div class="alert alert-danger"><i class="fa fa-fw fa-thumbs-down"></i> Der Benutzer wurde nicht gelöscht: DELETE Fehler Datenbank.</div>|***|error';
exit;
}
}
/*
if ($function == 'delete') {
$tabelle = $_POST['tabelle'];
$spalte = $_POST['spalte'];
$id = $_POST['id'];
$stmt = $db->query("DELETE FROM $tabelle WHERE $spalte = $id");
if ($stmt) {
echo "success: DELETE FROM $tabelle WHERE $spalte = $id";
} else {
echo "error: DELETE FROM $tabelle WHERE $spalte = $id";
}
}
if ($function == 'deleteQuestion') {
$id2 = $_POST['id2'];
$stmt1 = $db->query("DELETE FROM jumi_umfragen_antworten WHERE ufid = $id2");
$stmt2 = $db->query("DELETE FROM jumi_umfragen_fragen WHERE ufid = $id2");
# ggf. bereis Abstimmergebnisse löschen
# Sonst werden keine neue Fragen erfasst
# unset($_SESSION["umfrageerf_ufid"]);
if ($stmt1 and $stmt2) {
echo "Success";
} else {
echo "Error";
}
}
*/
?>

45
dashboard/rollen.php Normal file
View File

@ -0,0 +1,45 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte(basename(__FILE__), $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
# Gespeicherte Werte
$query = "SELECT rid, bezeichnung
FROM jumi_admin_rolle
ORDER BY bezeichnung ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -0,0 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene Rechte
$query = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid NOT IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT meid, headline
FROM jumi_menu_entries
WHERE meid IN (SELECT meid FROM jumi_admin_rollen_rechte_zuord WHERE rid=$rid)
ORDER BY meid ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -0,0 +1,64 @@
<?php
if (!isset($_SESSION)) {
session_start();
}
include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
if(!rechte('rollen.php', $uid)){
echo "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
exit;
}
require_once "../language/german.inc.php";
if (isset($_GET['action'])) {
$action = $_GET['action'];
} else {
$action = '';
}
if ($action == '') {
if (isset($_GET['edit'])) {
$rid = $_GET['edit'];
$smarty->assign('rollen_edit', $rid);
}
$result_head = $db->query("SELECT bezeichnung FROM jumi_admin_rolle WHERE rid=$rid");
$row_head = $result_head->fetch_array();
$smarty->assign('rollenzuordnung_bezeichnung', $row_head['bezeichnung']);
# Nicht zugewiesene User
$query = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid NOT IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result = $db->query($query) or die("Cannot execute query");
while ($row = $result->fetch_array()) {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
# Zugewiesene Rechte
$query1 = "SELECT uid, vorname, nachname
FROM jumi_admin
WHERE uid IN (SELECT uid FROM jumi_admin_rollen_user_zuord WHERE rid=$rid)
ORDER BY nachname ASC";
$result1 = $db->query($query1) or die("Cannot execute query1");
while ($row1 = $result1->fetch_array()) {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/dashboard/$templatename");
?>

View File

@ -0,0 +1,229 @@
function rollesave(){
var rollenname = document.getElementById("rollenname").value;
$.ajax({
type: 'POST',
url: '../controller/admin_rollen.php',
data: {
'function': 'rollesave',
'rollenname': rollenname
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
document.getElementById("rollenname").value ="";
$(document).ajaxStop(function(){
window.location = "?";
});
}
$('#msg').show().delay(10000).fadeOut(500);
$('#msg').html(a[0]);
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
function erfzuordnung(val) {
var param = val.split('|');
var meid = param[0];
var rid = param[1];
$.ajax({
type: 'POST',
url: '../controller/admin_rollen.php',
data: {
'function': 'erfzuordnung',
'meid': meid,
'rid': rid
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
$(document).ajaxStop(function(){
// Refresh Modal
var value = a[2];
// load the url and show modal on success
$("#ZuordnungModal .modal-body").load('rollenzuordnung.php?edit='+value, function() {
$("#ZuordnungModal").modal("show");
});
});
}
$('#msg').show().delay(5000).fadeOut(500);
$('#msg').html(a[0]);
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
function delzuordnung(val) {
var param = val.split('|');
var meid = param[0];
var rid = param[1];
$.ajax({
type: 'POST',
url: '../controller/admin_rollen.php',
data: {
'function': 'delzuordnung',
'meid': meid,
'rid': rid
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
$(document).ajaxStop(function(){
// Refresh Modal
var value = a[2];
// load the url and show modal on success
$("#ZuordnungModal .modal-body").load('rollenzuordnung.php?edit='+value, function() {
$("#ZuordnungModal").modal("show");
});
});
}
$('#msg').show().delay(20000).fadeOut(500);
$('#msg').html(a[0]);
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
function erfuser(val) {
var param = val.split('|');
var uid = param[0];
var rid = param[1];
$.ajax({
type: 'POST',
url: '../controller/admin_rollen.php',
data: {
'function': 'erfuser',
'uid': uid,
'rid': rid
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
$(document).ajaxStop(function(){
// Refresh Modal
var value = a[2];
// load the url and show modal on success
$("#ZuordnungModal .modal-body").load('userzuordnung.php?edit='+value, function() {
$("#ZuordnungModal").modal("show");
});
});
}
$('#msg').show().delay(5000).fadeOut(500);
$('#msg').html(a[0]);
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
function deluser(val) {
var param = val.split('|');
var uid = param[0];
var rid = param[1];
$.ajax({
type: 'POST',
url: '../controller/admin_rollen.php',
data: {
'function': 'deluser',
'uid': uid,
'rid': rid
},
success: function(result) { //we got the response
if(result!=''){
var a = result.split('|***|');
if(a[1]=="success"){
$(document).ajaxStop(function(){
// Refresh Modal
var value = a[2];
// load the url and show modal on success
$("#ZuordnungModal .modal-body").load('userzuordnung.php?edit='+value, function() {
$("#ZuordnungModal").modal("show");
});
});
}
$('#msg').show().delay(20000).fadeOut(500);
$('#msg').html(a[0]);
}
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
/*
function onClickDelete(id) {
document.getElementById("antwort").value = "";
r = confirm('Antwort löschen?');
if (r) {
$.ajax({
type: 'POST',
url: '../controller/admin_erfassen.php',
data: {
'function': 'delete',
'tabelle': 'jumi_umfragen_antworten',
'spalte': 'uaid',
'id': id
},
success: function(result) { //we got the response
$(document).ajaxStop(function(){
window.location = "?action=fragen&erfassen=1";
});
},
error: function(xhr, status, exception) {
console.log(xhr);
}
});
}
}
function onClickDeleteQuestion(id2) {
document.getElementById("frage").value = "";
document.getElementById("antwort").value = "";
r = confirm('Gesamte Frage löschen?');
if (r) {
$.ajax({
type: 'POST',
url: '../controller/admin_erfassen.php',
data: {
'function': 'deleteQuestion',
'id2': id2
},
success: function(result) {
// document.getElementById("del").innerHTML = "<strong>entfernt</strong>";
//Text einblenden geht nicht, da ein Refresh gemacht wird. Dann sieht man den Text nicht
$(document).ajaxStop(function(){
window.location = "?action=fragen&erfassen=1";
});
}
});
}
}
*/

View File

@ -19,153 +19,12 @@
<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/data-table/jumistyle.css"></style>
<script src="js/all.js" crossorigin="anonymous"></script>
<script src="../jquery/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
.table-responsive {
margin: 30px 0;
}
.table-wrapper {
min-width: 1000px;
background: #fff;
padding: 20px 25px;
border-radius: 3px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {
padding-bottom: 15px;
background: #299be4;
color: #fff;
padding: 16px 30px;
margin: -20px -25px 10px;
border-radius: 3px 3px 0 0;
}
.table-title h2 {
margin: 5px 0 0;
font-size: 24px;
}
.table-title .btn {
color: #566787;
float: right;
font-size: 13px;
background: #fff;
border: none;
min-width: 50px;
border-radius: 2px;
border: none;
outline: none !important;
margin-left: 10px;
}
.table-title .btn:hover, .table-title .btn:focus {
color: #566787;
background: #f2f2f2;
}
.table-title .btn i {
float: left;
font-size: 21px;
margin-right: 5px;
}
.table-title .btn span {
float: left;
margin-top: 2px;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
padding: 12px 15px;
vertical-align: middle;
}
table.table tr th:first-child {
width: 60px;
}
table.table tr th:last-child {
width: 100px;
}
table.table-striped tbody tr:nth-of-type(odd) {
background-color: #fcfcfc;
}
table.table-striped.table-hover tbody tr:hover {
background: #f5f5f5;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table td:last-child i {
opacity: 0.9;
font-size: 22px;
margin: 0 5px;
}
table.table td a {
font-weight: bold;
color: #566787;
display: inline-block;
text-decoration: none;
}
table.table td a:hover {
color: #2196F3;
}
table.table td a.settings {
color: #2196F3;
}
table.table td a.delete {
color: #F44336;
}
table.table td i {
font-size: 19px;
}
table.table .avatar {
border-radius: 50%;
vertical-align: middle;
margin-right: 10px;
}
.status {
font-size: 30px;
margin: 2px 2px 0 0;
display: inline-block;
vertical-align: middle;
line-height: 10px;
}
.pagination {
float: right;
margin: 0 0 5px;
}
.pagination li a {
border: none;
font-size: 13px;
min-width: 30px;
min-height: 30px;
color: #999;
margin: 0 2px;
line-height: 30px;
border-radius: 2px !important;
text-align: center;
padding: 0 6px;
}
.pagination li a:hover {
color: #666;
}
.pagination li.active a, .pagination li.active a.page-link {
background: #03A9F4;
}
.pagination li.active a:hover {
background: #0397d6;
}
.pagination li.disabled i {
color: #ccc;
}
.pagination li i {
font-size: 16px;
padding-top: 6px
}
.hint-text {
float: left;
margin-top: 10px;
font-size: 13px;
}
</style>
</head>
<body class="sb-nav-fixed">
<div id="navtop"></div>

View File

@ -0,0 +1,166 @@
{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>
<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;
}
</style>
<script type="text/javascript">
{literal}
function keysave(ele) {
if(event.key === 'Enter') {
rollesave();
}
}
{/literal}
</script>
<style type="text/css">
.ui-sortable tr {
cursor:pointer;
}
.ui-sortable tr:hover {
background:rgba(244,251,17,0.45);
}
</style>
<script>
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
</script>
</head>
<!--<body onload="if(document.erfassen)document.erfassen.{$umfrageerf_focus}.focus();return false;">-->
<body class="sb-nav-fixed">
<div id="navtop"></div>
{literal}
<script>
$(function(){
// im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht
$("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');});
$("#navleft").load("nav.php");
$("#footer").load("footer.php");
});
</script>
{/literal}
<div id="layoutSidenav">
<!-- Navigation left -->
<div id="navleft"></div>
<div id="layoutSidenav_content">
<main>
<!--Anwendung-->
<script src="../js/components/admin_rollen.js"></script>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Rollen erfassen
</div>
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-12 col-md-4">Rollenname:</div>
<div class="col-12 col-md-8"><input class="form-control" type="text" name="rollenname" id="rollenname" value="{$umfrageerf_value_frage}" size="60" onkeydown="keysave(this)"></div>
</div>
</div>
<div class="row">
<div class="row col-3"></div>
<div class="row col-6"><button class="btn btn-primary btn-sm mt-3" id="save" onclick="rollesave();">Speichern</button></div>
<div class="row col-3"></div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Vorhandene Rollen
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Rolle</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
{section name=table_data loop=$table_data}
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-8 col-md-10">{$table_data[table_data].bezeichnung}</div>
<div class="col-4 col-md-2">
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].rid}|rollenzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-eye" style="width:18px;"></i></a>
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].rid}|userzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-user" style="width:18px;"></i></a>
</div>
</div>
{/section}
<!-- Modal -->
<div class="modal" id="ZuordnungModal" tabindex="-1" aria-labelledby="ZuordnungModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ZuordnungModalLabel">Rollenübersicht</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
</div>
</div>
</div>
</div>
<!-- Lösen Sie das Modal mit einem Button aus -->
{literal}
<script>
function ShowZuordnung(a){
let receive = a.getAttribute("value");
var a = receive.split('|');
var value = a[0];
var file = a[1];
$( '.modal-body' ).load( file+'?edit='+value , function () {
$( '#ZuordnungModal' ).modal({show: true });
});
}
</script>
{/literal}
</div>
</div>
</div>
<div id="msg"></div>
</main>
<!--
<button type="button" class="btn btn-primary" data-bs-toggle="popover" title="Popover Header" data-bs-content="Some content inside the popover">
Toggle popover
</button>
-->
<!-- footer -->
<div id="footer"></div>
</div>
</div>
<!--
<script>
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl)
})
</script>
-->
</body>
</html>
{/if}

View File

@ -0,0 +1,93 @@
{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>
<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;
}
</style>
<style type="text/css">
.ui-sortable tr {
cursor:pointer;
}
.ui-sortable tr:hover {
background:rgba(244,251,17,0.45);
}
</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 Rechte
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Recht</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
{section name=table_data loop=$table_data}
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-10 col-md-10">{$table_data[table_data].headline}</div>
<div class="col-2 col-md-2"><a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfzuordnung('{$table_data[table_data].meid}|{$rollen_edit}')"><i class="fa-solid fa-plus" style="width:18px;"></i></a></div>
</div>
{/section}
</div>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Zugewiesene Rechte
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Recht</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
{section name=table_data1 loop=$table_data1}
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-10 col-md-10">{$table_data1[table_data1].headline}</div>
<div class="col-2 col-md-2"><a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delzuordnung('{$table_data1[table_data1].meid}|{$rollen_edit}')"><i class="fa-solid fa-minus" style="width:18px;"></i></a></div>
</div>
{/section}
</div>
</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>
</html>
{/if}

View File

@ -41,7 +41,7 @@
<p class="card-text">Herzlich willkommen zur Administration von Jugendchor & Miteinander.<br><br>
</p>
<!--
<div class="row">
<div class="col-xl-3 col-md-6">
@ -77,7 +77,7 @@
</div>
</div>
</div>
-->
</div>
</div>

View File

@ -0,0 +1,149 @@
{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 Rechte
</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 Rechte
</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',
},
});
var table2 = new DataTable('#assigned', {
rowReorder: true,
pageLength: 5,
language: {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
},
});
});
</script>
</html>
{/if}

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-27 16:45:22
/* Smarty version 3.1.39, created on 2023-03-28 08:14:45
from 'F:\git\survey\templates\modern\dashboard\startseite.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6421ac028e2800_44904301',
'unifunc' => 'content_642285d52b62c0_90543019',
'has_nocache_code' => false,
'file_dependency' =>
array (
'1d7d9664b76f0bd4587451aa9401c286ca72b20b' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\startseite.html',
1 => 1679928167,
1 => 1679978763,
2 => 'file',
),
),
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_6421ac028e2800_44904301 (Smarty_Internal_Template $_smarty_tpl) {
function content_642285d52b62c0_90543019 (Smarty_Internal_Template $_smarty_tpl) {
?><!DOCTYPE html>
<html lang="en">
<head>
@ -71,7 +71,7 @@ function content_6421ac028e2800_44904301 (Smarty_Internal_Template $_smarty_tpl)
<p class="card-text">Herzlich willkommen zur Administration von Jugendchor & Miteinander.<br><br>
</p>
<!--
<div class="row">
<div class="col-xl-3 col-md-6">
@ -107,7 +107,7 @@ function content_6421ac028e2800_44904301 (Smarty_Internal_Template $_smarty_tpl)
</div>
</div>
</div>
-->
</div>
</div>

View File

@ -0,0 +1,227 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-28 12:49:38
from 'F:\git\survey\templates\modern\dashboard\rollen.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6422c6426320c9_55428832',
'has_nocache_code' => false,
'file_dependency' =>
array (
'5e39749cb1a64f7b81c95621b910340c1aee6ae0' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\rollen.html',
1 => 1680000576,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6422c6426320c9_55428832 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!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">
<?php echo '<script'; ?>
src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"><?php echo '</script'; ?>
>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<?php echo '<script'; ?>
src="js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<!-- jQuery UI CSS
<?php echo '<script'; ?>
src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"><?php echo '</script'; ?>
>
-->
<?php echo '<script'; ?>
src="../jquery/jquery-ui.js"><?php echo '</script'; ?>
>
<style>
.btn-group > .btn{
margin-bottom:20px;
border-radius:20px !important;
}
</style>
<?php echo '<script'; ?>
type="text/javascript">
function keysave(ele) {
if(event.key === 'Enter') {
rollesave();
}
}
<?php echo '</script'; ?>
>
<style type="text/css">
.ui-sortable tr {
cursor:pointer;
}
.ui-sortable tr:hover {
background:rgba(244,251,17,0.45);
}
</style>
<?php echo '<script'; ?>
>
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
<?php echo '</script'; ?>
>
</head>
<!--<body onload="if(document.erfassen)document.erfassen.<?php echo $_smarty_tpl->tpl_vars['umfrageerf_focus']->value;?>
.focus();return false;">-->
<body class="sb-nav-fixed">
<div id="navtop"></div>
<?php echo '<script'; ?>
>
$(function(){
// im Navbar muss der toggle in der Callbackfunktion definiert werden. Sonst findet jquery getelementbyID nicht
$("#navtop").load('navtop.php', null, function(){$.getScript('js/scripts.js');});
$("#navleft").load("nav.php");
$("#footer").load("footer.php");
});
<?php echo '</script'; ?>
>
<div id="layoutSidenav">
<!-- Navigation left -->
<div id="navleft"></div>
<div id="layoutSidenav_content">
<main>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_rollen.js"><?php echo '</script'; ?>
>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Rollen erfassen
</div>
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-12 col-md-4">Rollenname:</div>
<div class="col-12 col-md-8"><input class="form-control" type="text" name="rollenname" id="rollenname" value="<?php echo $_smarty_tpl->tpl_vars['umfrageerf_value_frage']->value;?>
" size="60" onkeydown="keysave(this)"></div>
</div>
</div>
<div class="row">
<div class="row col-3"></div>
<div class="row col-6"><button class="btn btn-primary btn-sm mt-3" id="save" onclick="rollesave();">Speichern</button></div>
<div class="row col-3"></div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Vorhandene Rollen
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Rolle</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
<?php
$__section_table_data_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data_0_total = $__section_table_data_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data'] = new Smarty_Variable(array());
if ($__section_table_data_0_total !== 0) {
for ($__section_table_data_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] = 0; $__section_table_data_0_iteration <= $__section_table_data_0_total; $__section_table_data_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']++){
?>
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-8 col-md-10"><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['bezeichnung'];?>
</div>
<div class="col-4 col-md-2">
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['rid'];?>
|rollenzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-eye" style="width:18px;"></i></a>
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['rid'];?>
|userzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-user" style="width:18px;"></i></a>
</div>
</div>
<?php
}
}
?>
<!-- Modal -->
<div class="modal" id="ZuordnungModal" tabindex="-1" aria-labelledby="ZuordnungModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="ZuordnungModalLabel">Rollenübersicht</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
</div>
</div>
</div>
</div>
<!-- Lösen Sie das Modal mit einem Button aus -->
<?php echo '<script'; ?>
>
function ShowZuordnung(a){
let receive = a.getAttribute("value");
var a = receive.split('|');
var value = a[0];
var file = a[1];
$( '.modal-body' ).load( file+'?edit='+value , function () {
$( '#ZuordnungModal' ).modal({show: true });
});
}
<?php echo '</script'; ?>
>
</div>
</div>
</div>
<div id="msg"></div>
</main>
<!--
<button type="button" class="btn btn-primary" data-bs-toggle="popover" title="Popover Header" data-bs-content="Some content inside the popover">
Toggle popover
</button>
-->
<!-- footer -->
<div id="footer"></div>
</div>
</div>
<!--
<?php echo '<script'; ?>
>
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
return new bootstrap.Popover(popoverTriggerEl)
})
<?php echo '</script'; ?>
>
-->
</body>
</html>
<?php }?>
<?php }
}

View File

@ -0,0 +1,160 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-28 13:05:16
from 'F:\git\survey\templates\modern\dashboard\rollenzuordnung.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6422c9ecda72b1_03402738',
'has_nocache_code' => false,
'file_dependency' =>
array (
'5e7995984bd9e4f7369ac5c50001d68213d73e68' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\rollenzuordnung.html',
1 => 1680001505,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6422c9ecda72b1_03402738 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!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">
<?php echo '<script'; ?>
src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"><?php echo '</script'; ?>
>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<?php echo '<script'; ?>
src="js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<!-- jQuery UI CSS
<?php echo '<script'; ?>
src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"><?php echo '</script'; ?>
>
-->
<?php echo '<script'; ?>
src="../jquery/jquery-ui.js"><?php echo '</script'; ?>
>
<style>
.btn-group > .btn{
margin-bottom:20px;
border-radius:20px !important;
}
</style>
<style type="text/css">
.ui-sortable tr {
cursor:pointer;
}
.ui-sortable tr:hover {
background:rgba(244,251,17,0.45);
}
</style>
</head>
<!--<body onload="if(document.erfassen)document.erfassen.<?php echo $_smarty_tpl->tpl_vars['umfrageerf_focus']->value;?>
.focus();return false;">-->
<body class="sb-nav-fixed">
<main>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_rollen.js"><?php echo '</script'; ?>
>
<p class="text-center"><b><?php echo $_smarty_tpl->tpl_vars['rollenzuordnung_bezeichnung']->value;?>
</b></p>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Nicht zugewiesene Rechte
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Recht</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
<?php
$__section_table_data_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data_0_total = $__section_table_data_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data'] = new Smarty_Variable(array());
if ($__section_table_data_0_total !== 0) {
for ($__section_table_data_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] = 0; $__section_table_data_0_iteration <= $__section_table_data_0_total; $__section_table_data_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']++){
?>
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-10 col-md-10"><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['headline'];?>
</div>
<div class="col-2 col-md-2"><a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfzuordnung('<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['meid'];?>
|<?php echo $_smarty_tpl->tpl_vars['rollen_edit']->value;?>
')"><i class="fa-solid fa-plus" style="width:18px;"></i></a></div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Zugewiesene Rechte
</div>
<div class="card-body">
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="row mt-0 mb-0">
<div class="d-none col-md-10 d-md-block"><b>Recht</b></div>
<div class="d-none col-md-2 d-md-block"><b>Aktion</b></div>
</div>
<?php
$__section_table_data1_1_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data1']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data1_1_total = $__section_table_data1_1_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data1'] = new Smarty_Variable(array());
if ($__section_table_data1_1_total !== 0) {
for ($__section_table_data1_1_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] = 0; $__section_table_data1_1_iteration <= $__section_table_data1_1_total; $__section_table_data1_1_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']++){
?>
<div class="row mt-0 mt-sm-1 mb-0 mb-sm-1">
<div class="col-10 col-md-10"><?php echo $_smarty_tpl->tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['headline'];?>
</div>
<div class="col-2 col-md-2"><a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delzuordnung('<?php echo $_smarty_tpl->tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['meid'];?>
|<?php echo $_smarty_tpl->tpl_vars['rollen_edit']->value;?>
')"><i class="fa-solid fa-minus" style="width:18px;"></i></a></div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<div id="msg"></div>
</main>
</div>
<?php echo '<script'; ?>
src="../bootstrap/node_modules/move-js/move.js"><?php echo '</script'; ?>
>
<link href="../bootstrap/dist/scrollable-tabs.min.css" rel="stylesheet">
<?php echo '<script'; ?>
src="../bootstrap/dist/scrollable-tabs.min.js"><?php echo '</script'; ?>
>
</body>
</html>
<?php }
}
}

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-27 13:07:01
/* Smarty version 3.1.39, created on 2023-03-28 10:33:00
from 'F:\git\survey\templates\modern\dashboard\edit_user.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_642178d5c1eea6_03816576',
'unifunc' => 'content_6422a63c5b0501_72223624',
'has_nocache_code' => false,
'file_dependency' =>
array (
'79043b0398a7fe1f928c28aa43fc5b429e06493b' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\edit_user.html',
1 => 1679914316,
1 => 1679992372,
2 => 'file',
),
),
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_642178d5c1eea6_03816576 (Smarty_Internal_Template $_smarty_tpl) {
function content_6422a63c5b0501_72223624 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="de">
@ -52,6 +52,7 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<?php echo '<script'; ?>
type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/data-table/jumistyle.css"></style>
<?php echo '<script'; ?>
src="js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
@ -60,149 +61,7 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
.table-responsive {
margin: 30px 0;
}
.table-wrapper {
min-width: 1000px;
background: #fff;
padding: 20px 25px;
border-radius: 3px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {
padding-bottom: 15px;
background: #299be4;
color: #fff;
padding: 16px 30px;
margin: -20px -25px 10px;
border-radius: 3px 3px 0 0;
}
.table-title h2 {
margin: 5px 0 0;
font-size: 24px;
}
.table-title .btn {
color: #566787;
float: right;
font-size: 13px;
background: #fff;
border: none;
min-width: 50px;
border-radius: 2px;
border: none;
outline: none !important;
margin-left: 10px;
}
.table-title .btn:hover, .table-title .btn:focus {
color: #566787;
background: #f2f2f2;
}
.table-title .btn i {
float: left;
font-size: 21px;
margin-right: 5px;
}
.table-title .btn span {
float: left;
margin-top: 2px;
}
table.table tr th, table.table tr td {
border-color: #e9e9e9;
padding: 12px 15px;
vertical-align: middle;
}
table.table tr th:first-child {
width: 60px;
}
table.table tr th:last-child {
width: 100px;
}
table.table-striped tbody tr:nth-of-type(odd) {
background-color: #fcfcfc;
}
table.table-striped.table-hover tbody tr:hover {
background: #f5f5f5;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table td:last-child i {
opacity: 0.9;
font-size: 22px;
margin: 0 5px;
}
table.table td a {
font-weight: bold;
color: #566787;
display: inline-block;
text-decoration: none;
}
table.table td a:hover {
color: #2196F3;
}
table.table td a.settings {
color: #2196F3;
}
table.table td a.delete {
color: #F44336;
}
table.table td i {
font-size: 19px;
}
table.table .avatar {
border-radius: 50%;
vertical-align: middle;
margin-right: 10px;
}
.status {
font-size: 30px;
margin: 2px 2px 0 0;
display: inline-block;
vertical-align: middle;
line-height: 10px;
}
.pagination {
float: right;
margin: 0 0 5px;
}
.pagination li a {
border: none;
font-size: 13px;
min-width: 30px;
min-height: 30px;
color: #999;
margin: 0 2px;
line-height: 30px;
border-radius: 2px !important;
text-align: center;
padding: 0 6px;
}
.pagination li a:hover {
color: #666;
}
.pagination li.active a, .pagination li.active a.page-link {
background: #03A9F4;
}
.pagination li.active a:hover {
background: #0397d6;
}
.pagination li.disabled i {
color: #ccc;
}
.pagination li i {
font-size: 16px;
padding-top: 6px
}
.hint-text {
float: left;
margin-top: 10px;
font-size: 13px;
}
</style>
</head>
<body class="sb-nav-fixed">
<div id="navtop"></div>

View File

@ -1,18 +1,18 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-24 16:50:02
/* Smarty version 3.1.39, created on 2023-03-28 06:12:35
from 'F:\git\survey\templates\modern\dashboard\index.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_641dc6aa4376e5_36783062',
'unifunc' => 'content_642269335a1849_37187460',
'has_nocache_code' => false,
'file_dependency' =>
array (
'bf479f21e7ad507ad2c2c30536bdf206de07b30e' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\index.html',
1 => 1679673000,
1 => 1679910276,
2 => 'file',
),
),
@ -20,7 +20,7 @@ if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
array (
),
),false)) {
function content_641dc6aa4376e5_36783062 (Smarty_Internal_Template $_smarty_tpl) {
function content_642269335a1849_37187460 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!DOCTYPE html>
<html lang="en">
@ -33,7 +33,7 @@ if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<title>JU & MI Administration</title>
<link href="css/styles.css" rel="stylesheet" />
<?php echo '<script'; ?>
src="all.js" crossorigin="anonymous"><?php echo '</script'; ?>
src="js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>

View File

@ -0,0 +1,228 @@
<?php
/* Smarty version 3.1.39, created on 2023-03-28 12:17:15
from 'F:\git\survey\templates\modern\dashboard\userzuordnung.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '3.1.39',
'unifunc' => 'content_6422beab4ef474_64190224',
'has_nocache_code' => false,
'file_dependency' =>
array (
'ede0fde7d4e03354fe52af80288b249d058551a4' =>
array (
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\userzuordnung.html',
1 => 1679998632,
2 => 'file',
),
),
'includes' =>
array (
),
),false)) {
function content_6422beab4ef474_64190224 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['action']->value == '') {?>
<!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">
<?php echo '<script'; ?>
src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"><?php echo '</script'; ?>
>
<!-- nochmals bootstrap.css mit Erweiterungen vom Dashboard -->
<link href="css/styles.css" rel="stylesheet" />
<!-- icons in nav-->
<?php echo '<script'; ?>
src="js/all.js" crossorigin="anonymous"><?php echo '</script'; ?>
>
<!-- data Table: https://datatables.net/ -->
<?php echo '<script'; ?>
src="../bootstrap/data-table/jquery.min.js"><?php echo '</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>
<?php echo '<script'; ?>
type="text/javascript" src="../bootstrap/data-table/jquery.dataTables.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
type="text/javascript" src="../bootstrap/data-table/dataTables.rowReorder.min.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
type="text/javascript" src="../bootstrap/data-table/dataTables.bootstrap5.min.js"><?php echo '</script'; ?>
>
<link rel="stylesheet" href="../bootstrap/node_modules/bootstrap-icons/font/bootstrap-icons.css">
<?php echo '<script'; ?>
src="../jquery/jquery-3.4.1.min.js"><?php echo '</script'; ?>
>
<!-- jQuery UI CSS
<?php echo '<script'; ?>
src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"><?php echo '</script'; ?>
>
-->
<?php echo '<script'; ?>
src="../jquery/jquery-ui.js"><?php echo '</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.<?php echo $_smarty_tpl->tpl_vars['umfrageerf_focus']->value;?>
.focus();return false;">-->
<body class="sb-nav-fixed">
<main>
<!--Anwendung-->
<?php echo '<script'; ?>
src="../js/components/admin_rollen.js"><?php echo '</script'; ?>
>
<p class="text-center"><b><?php echo $_smarty_tpl->tpl_vars['rollenzuordnung_bezeichnung']->value;?>
</b></p>
<div class="container-fluid">
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Nicht zugewiesene Rechte
</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>
<?php
$__section_table_data_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data_0_total = $__section_table_data_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data'] = new Smarty_Variable(array());
if ($__section_table_data_0_total !== 0) {
for ($__section_table_data_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] = 0; $__section_table_data_0_iteration <= $__section_table_data_0_total; $__section_table_data_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']++){
?>
<tr>
<td><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['vorname'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['nachname'];?>
</td>
<td>
<p class="text-center">
<a class="btn btn-success btn-rounded btn-icon btn-sm" onclick="erfuser('<?php echo $_smarty_tpl->tpl_vars['table_data']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data']->value['index'] : null)]['uid'];?>
|<?php echo $_smarty_tpl->tpl_vars['rollen_edit']->value;?>
')"><i class="fa-solid fa-plus" style="width:18px;"></i></a>
</p>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
<br>
<div class="card">
<div class="card-header">
<i class="fas fa-table me-1"></i>
Zugewiesene Rechte
</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>
<?php
$__section_table_data1_1_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['table_data1']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_table_data1_1_total = $__section_table_data1_1_loop;
$_smarty_tpl->tpl_vars['__smarty_section_table_data1'] = new Smarty_Variable(array());
if ($__section_table_data1_1_total !== 0) {
for ($__section_table_data1_1_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] = 0; $__section_table_data1_1_iteration <= $__section_table_data1_1_total; $__section_table_data1_1_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']++){
?>
<tr>
<td><?php echo $_smarty_tpl->tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['vorname'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['nachname'];?>
</td>
<td>
<p class="text-center">
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="deluser('<?php echo $_smarty_tpl->tpl_vars['table_data1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_table_data1']->value['index'] : null)]['uid'];?>
|<?php echo $_smarty_tpl->tpl_vars['rollen_edit']->value;?>
')"><i class="fa-solid fa-minus" style="width:18px;"></i></a>
</p>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
<div id="msg"></div>
</main>
</div>
<?php echo '<script'; ?>
src="../bootstrap/node_modules/move-js/move.js"><?php echo '</script'; ?>
>
<link href="../bootstrap/dist/scrollable-tabs.min.css" rel="stylesheet">
<?php echo '<script'; ?>
src="../bootstrap/dist/scrollable-tabs.min.js"><?php echo '</script'; ?>
>
</body>
<?php echo '<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',
},
});
var table2 = new DataTable('#assigned', {
rowReorder: true,
pageLength: 5,
language: {
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/de-DE.json',
},
});
});
<?php echo '</script'; ?>
>
</html>
<?php }
}
}

View File

@ -8,3 +8,6 @@ todo
Rechteverwaltung
Kacheln Startseite
Passwortvorschau
Fragen erfassen Probleme
Focus beim Frage erfassen