loaing of model via arbitrary field and nice home page
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
This commit is contained in:
@ -15,6 +15,13 @@ class Demo extends Page{
|
||||
//$this->addSubmenuItem('Hund hinzufügen','/dogs/add','fas fa-plus-circle');
|
||||
}
|
||||
|
||||
function test()
|
||||
{
|
||||
$u = new User();
|
||||
$u->load('Chris','firstname');
|
||||
var_dump($u->data);
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->set('successTitle','Erfolgreich');
|
||||
|
@ -16,6 +16,53 @@
|
||||
</div>
|
||||
|
||||
<h1>Admin stuff</h1>
|
||||
|
||||
<div class="container text-center">
|
||||
<div class="row">
|
||||
<?php foreach ($userdata as $user) : ?>
|
||||
<div class="m-3 col">
|
||||
<div class="card">
|
||||
<img src="<?= $user['photo']?:'https://pictshare.net/pj7vzx.jpg' ?>" class="card-img-top" alt="...">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><?= escape($user['firstname'].' '.$user['lastname']) ?></h5>
|
||||
<p class="card-text"><?= escape($user['email']) ?></p>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item">
|
||||
<h6>uuid</h6>
|
||||
<span class="badge rounded-pill text-bg-secondary"><?= escape($user['uuid']); ?></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<h6>Registered</h6>
|
||||
<?= escape($user['registered']); ?>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<h6>last_login</h6>
|
||||
<?= escape($user['last_login']); ?>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<h6>Active</h6>
|
||||
<?= $user['active']?'yes':'no'; ?>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<h6>Dogs</h6>
|
||||
<?php foreach($user['dogs'] as $dog): ?>
|
||||
<a href="/dogs/<?= $dog ?>" class="btn btn-secondary"><?= escape((new Dog())->getField('name',$dog)); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="card-body">
|
||||
<button class="btn btn-primary" name="email" value="<?= $user['email'] ?>" hx-post="/admin/loginas/">Login</button>
|
||||
<button class="btn btn-primary"name="email" value="<?= $user['email'] ?>" hx-post="/admin/edituser/" hx-target="#main">Edit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
<figure class="table-responsive">
|
||||
<table class="table" role="grid">
|
||||
<thead>
|
||||
@ -58,4 +105,4 @@
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
</figure> -->
|
Reference in New Issue
Block a user