Initial
This commit is contained in:
83
app/Views/accountstree.php
Normal file
83
app/Views/accountstree.php
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
<?= $this->extend('layout'); ?>
|
||||
|
||||
<?= $this->section('css'); ?>
|
||||
<link rel="stylesheet" href="/css/mawim.css">
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('menu'); ?>
|
||||
<?= $this->include('sidebar') ?>
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('content'); ?>
|
||||
|
||||
<?php function printsub($id, $all){
|
||||
$liste = '';
|
||||
$ret='';
|
||||
foreach($all as $ele){
|
||||
$class ="";
|
||||
if ($ele->parent_id == $id){
|
||||
if ($ele->LKZ) $class = "bg-danger";
|
||||
else if ($ele->bookable !=1) $class = "bg-warning";
|
||||
$toolt ="bookable: $ele->bookable; LKZ: $ele->LKZ; Id: $ele->id; PID:$ele->parent_id";
|
||||
$liste .= "<li><span data-bs-toggle='tooltip' data-bs-html=true title='$toolt'";
|
||||
$liste .= "data-id=\"$ele->id\"";
|
||||
$liste .= "data-pid=\"$ele->parent_id\"";
|
||||
$liste .= "data-bookable=\"$ele->bookable\"";
|
||||
$liste .= "data-lkz=\"$ele->LKZ\"";
|
||||
$liste .= "data-type=\"$ele->type\"";
|
||||
$liste .= "data-description=\"$ele->description\"";
|
||||
$liste .= "class='$class'>$ele->description</span></li>";
|
||||
$liste .= printsub($ele->id, $all);
|
||||
}
|
||||
}
|
||||
if ($liste !=''){
|
||||
$ret = "<ul>";
|
||||
$ret .= $liste;
|
||||
$ret .= "</ul>";
|
||||
}
|
||||
return $ret;
|
||||
} ?>
|
||||
<div class="page-heading">
|
||||
<h3> Kategorien bearbeiten</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-12" id="tree">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<div><a class="btn btn-info multi" onclick="newCat();" role="button">Neue Kategorie</a></div>
|
||||
<div class="tree">
|
||||
<ul>
|
||||
<?php foreach($parents as $parent): ?>
|
||||
<?php $class='';
|
||||
if ($parent->LKZ) $class = "bg-danger";
|
||||
else if ($parent->bookable !=1) $class = "bg-warning"; ?>
|
||||
<li> <span data-bs-toggle='tooltip'
|
||||
data-bs-html=true
|
||||
data-id="<?=$parent->id?>"
|
||||
data-pid="0"
|
||||
data-bookable="<?=$parent->bookable?>"
|
||||
data-lkz=" <?= $parent->LKZ?>"
|
||||
data-type="<?= $parent->type?>"
|
||||
data-description="<?= $parent->description?>";
|
||||
title="bookable: <?=$parent->bookable?>; LKZ: <?= $parent->LKZ?>; Id: <?=$parent->id?>;" class="<?=$class?>"><?=$parent->description?></span>
|
||||
<?= printsub($parent->id, $all); ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-12 d-none" id="editor">
|
||||
<?= $this->include('accountsform') ?>
|
||||
</div>
|
||||
</section>
|
||||
<?= $this->endSection(); ?>
|
||||
<?= $this->section('scripts'); ?>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
|
||||
<script></script>
|
||||
<script src="/js/accounts.js"></script>
|
||||
<?= $this->endSection(); ?>
|
||||
Reference in New Issue
Block a user