230 lines
10 KiB
PHP
230 lines
10 KiB
PHP
<?php
|
|
/* Smarty version 3.1.39, created on 2023-03-28 13:28:55
|
|
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_6422cf77bc2191_44742864',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'5e39749cb1a64f7b81c95621b910340c1aee6ae0' =>
|
|
array (
|
|
0 => 'F:\\git\\survey\\templates\\modern\\dashboard\\rollen.html',
|
|
1 => 1680002934,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
),
|
|
),false)) {
|
|
function content_6422cf77bc2191_44742864 (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>
|
|
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delRole(<?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'];?>
|
|
)"><i class="fa fa-trash" 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 }
|
|
}
|