more CSS / WIP

This commit is contained in:
Christine Slotty 2020-06-19 08:36:26 +02:00
parent fbed22c08f
commit 150ea986c9
15 changed files with 457 additions and 315 deletions

View File

@ -1,6 +1,6 @@
<?php
/*
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@ -11,15 +11,14 @@ return [
'input' => '<div class="input-group showcase_row_area">'
. '<input type="{{type}}" class="form-control" name="{{name}}"{{attrs}}/>'
. '</div>',
'error' => '<div class="input-group showcase_content_area invalid-feedback">'
. '{{content}}'
. '</div>',
// Container for error items.
//'errorList' => '<ul>{{content}}</ul>',
'errorList' => '{{content}}',
// Error item wrapper.
//'errorItem' => '<li>{{text}}</li>',
'errorItem' => '<div>{{text}}</div>'

View File

@ -10,6 +10,9 @@ use App\Controller\AppController;
use App\Form\UserSearchForm;
use App\Model\Validation\GenericValidation;
use Model\Navigation\NaviHierarchy;
use Model\Navigation\NaviHierarchyEntry;
use Model\Transactions\TransactionCreation;
// for translating
@ -31,20 +34,24 @@ __('no keys');
*/
class StateUsersController extends AppController
{
public function initialize()
{
parent::initialize();
$this->loadComponent('GradidoNumber');
$this->loadComponent('JsonRequestClient');
$this->Auth->allow([
'search', 'ajaxCopyLoginToCommunity', 'ajaxCopyCommunityToLogin',
'search', 'ajaxCopyLoginToCommunity', 'ajaxCopyCommunityToLogin',
'ajaxDelete', 'ajaxCountTransactions', 'ajaxVerificationEmailResend',
'ajaxGetUserEmailVerificationCode'
]);
$this->set(
'naviHierarchy',
(new NaviHierarchy())->
add(new NaviHierarchyEntry(__('Startseite'), 'Dashboard', 'index', false))->add(new NaviHierarchyEntry(__('Benutzer suchen'), 'StateUsers', 'search', true))
);
}
/**
* Index method
*
@ -59,7 +66,7 @@ class StateUsersController extends AppController
$this->set(compact('stateUsers'));
}
public function listIdentHashes()
{
$stateUsers = $this->StateUsers->find('all')->toArray();
@ -68,7 +75,7 @@ class StateUsersController extends AppController
}
$this->set('stateUsers', $stateUsers);
}
public function search()
{
$startTime = microtime(true);
@ -81,19 +88,19 @@ class StateUsersController extends AppController
}
$user = $session->read('StateUser');
if($user['role'] != 'admin') {
return $this->redirect(['controller' => 'dashboard', 'action' => 'index']);
return $this->redirect(['controller' => 'dashboard', 'action' => 'index']);
}
$searchForm = new UserSearchForm();
$timeUsed = microtime(true) - $startTime;
//$this->set('timeUsed', $timeUsed);
$csfr_token = $this->request->getParam('_csrfToken');
$this->set(compact('timeUsed', 'searchForm', 'csfr_token'));
if ($this->request->is('post')) {
$requestData = $this->request->getData();
if($searchForm->validate($requestData)) {
//var_dump($requestData);
$searchString = $requestData['search'];
@ -134,13 +141,13 @@ class StateUsersController extends AppController
$communityUsers = $this->StateUsers
->find('all')
->contain(['StateBalances' => ['fields' => ['amount', 'state_user_id']]]);
$communityUsers->where(['OR' => [
'first_name LIKE' => $globalSearch,
'last_name LIKE' => $globalSearch,
'email LIKE' => $globalSearch
]]);
//var_dump($communityUsers->toArray());
foreach($communityUsers as $u) {
$pubkey_hex = bin2hex(stream_get_contents($u->public_key));
@ -159,14 +166,14 @@ class StateUsersController extends AppController
$finalUser['balance'] = 0;
$finalUser['pubkeyhex'] = $pubhex;
$finalUser['created'] = null;
if(count($user['community']) == 1) {
if(isset($user['community'][0]->state_balances) &&
if(isset($user['community'][0]->state_balances) &&
isset($user['community'][0]->state_balances[0]['amount'])) {
$finalUser['balance'] = $user['community'][0]->state_balances[0]->amount;
}
}
if(count($user['login']) == 0) {
$state = 'account not on login-server';
$color = 'danger';
@ -191,9 +198,9 @@ class StateUsersController extends AppController
$state = 'account copied to community';
$color = 'success';
//var_dump($user['community'][0]->state_balances[0]['amount']);
}
} else {
$state = 'email not activated';
$color = 'warning';
@ -205,7 +212,7 @@ class StateUsersController extends AppController
$finalUser['indicator'] = ['name' => $state, 'color' => $color];
array_push($finalUserEntrys, $finalUser);
}
foreach($emptyPubkeys as $user) {
$finalUser = [];
$state = 'account not on community server';
@ -231,14 +238,14 @@ class StateUsersController extends AppController
} else {
$this->Flash->error(__('Something was invalid, please try again!'));
}
$this->set('finalUserEntrys', $finalUserEntrys);
}
$timeUsed = microtime(true) - $startTime;
$this->set('timeUsed', $timeUsed);
}
public function ajaxCopyCommunityToLogin()
public function ajaxCopyCommunityToLogin()
{
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
@ -254,8 +261,8 @@ class StateUsersController extends AppController
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
public function ajaxCopyLoginToCommunity()
public function ajaxCopyLoginToCommunity()
{
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
@ -266,26 +273,26 @@ class StateUsersController extends AppController
if($user['role'] != 'admin') {
return $this->returnJson(['state' => 'error', 'msg' => 'not an admin']);
}
if($this->request->is('post')) {
$jsonData = $this->request->input('json_decode', true);
//$user = $jsonData['user'];
//var_dump($jsonData);
$newStateUser = $this->StateUsers->newEntity();
$this->StateUsers->patchEntity($newStateUser, $jsonData);
$newStateUser->public_key = hex2bin($jsonData['pubkeyhex']);
if(!$this->StateUsers->save($newStateUser)) {
return $this->returnJson(['state' => 'error', 'msg' => 'error by saving', 'details' => json_encode($newStateUser->errors())]);
}
return $this->returnJson(['state' => 'success']);
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
public function ajaxVerificationEmailResend()
public function ajaxVerificationEmailResend()
{
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
@ -300,7 +307,7 @@ class StateUsersController extends AppController
$jsonData = $this->request->input('json_decode', true);
$email = $jsonData['email'];
$session_id = $session->read('session_id');
return $this->returnJson($this->JsonRequestClient->sendRequest(json_encode([
'session_id' => $session_id,
'email' => $email
@ -312,7 +319,7 @@ class StateUsersController extends AppController
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
public function ajaxGetUserEmailVerificationCode()
{
$session = $this->getRequest()->getSession();
@ -328,7 +335,7 @@ class StateUsersController extends AppController
$jsonData = $this->request->input('json_decode', true);
$email = $jsonData['email'];
$session_id = $session->read('session_id');
return $this->returnJson($this->JsonRequestClient->sendRequest(json_encode([
'session_id' => $session_id,
'email' => $email,
@ -337,9 +344,9 @@ class StateUsersController extends AppController
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
public function ajaxDelete()
public function ajaxDelete()
{
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
@ -350,7 +357,7 @@ class StateUsersController extends AppController
if($user['role'] != 'admin') {
return $this->returnJson(['state' => 'error', 'msg' => 'not an admin']);
}
if($this->request->is('post')) {
$jsonData = $this->request->input('json_decode', true);
//$user = $jsonData['user'];
@ -360,7 +367,7 @@ class StateUsersController extends AppController
if($stateUsers->count() != 1) {
return $this->returnJson(['state' => 'error', 'msg' => 'invalid result count']);
}
if ($this->StateUsers->delete($stateUsers->first())) {
return $this->returnJson(['state' => 'success']);
} else {
@ -369,7 +376,7 @@ class StateUsersController extends AppController
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
public function ajaxCountTransactions()
{
$session = $this->getRequest()->getSession();
@ -381,7 +388,7 @@ class StateUsersController extends AppController
if($user['role'] != 'admin') {
return $this->returnJson(['state' => 'error', 'msg' => 'not an admin']);
}
if($this->request->is('post')) {
$jsonData = $this->request->input('json_decode', true);
//$user = $jsonData['user'];
@ -419,17 +426,17 @@ class StateUsersController extends AppController
}
}
return $this->returnJson(['state' => 'success', 'counts' => $counts]);
}
return $this->returnJson(['state' => 'error', 'msg' => 'no post request']);
}
/*
getField(vnode, 'receive'),
getField(vnode, 'sended'),
getField(vnode, 'creation'),
*/
@ -444,8 +451,8 @@ class StateUsersController extends AppController
{
$stateUser = $this->StateUsers->get($id, [
'contain' => [
'StateBalances',
'TransactionCreations' => ['Transactions'],
'StateBalances',
'TransactionCreations' => ['Transactions'],
'TransactionSendCoins' => ['Transactions', 'ReceiverUsers'],
'TransactionReceivedCoins' => ['Transactions', 'StateUsers']]
]);

View File

@ -10,6 +10,9 @@ use Cake\Core\Configure;
use Cake\I18n\FrozenDate;
use Cake\Datasource\ConnectionManager;
use Model\Navigation\NaviHierarchy;
use Model\Navigation\NaviHierarchyEntry;
use App\Form\CreationForm;
// protobuf transactions
//use Model\Messages\Gradido\TransactionCreation;
@ -24,7 +27,7 @@ use Model\Transactions\TransactionCreation;
*/
class TransactionCreationsController extends AppController
{
public function initialize()
{
parent::initialize();
@ -32,6 +35,11 @@ class TransactionCreationsController extends AppController
$this->loadComponent('JsonRequestClient');
//$this->Auth->allow(['add', 'edit']);
//$this->Auth->allow('create');
$this->set(
'naviHierarchy',
(new NaviHierarchy())->
add(new NaviHierarchyEntry(__('Startseite'), 'Dashboard', 'index', false))->add(new NaviHierarchyEntry(__('Gradido schöpfen'), 'TransactionCreations', 'create-multi', true))
);
}
/**
* Index method
@ -68,7 +76,7 @@ class TransactionCreationsController extends AppController
$this->set('transactionCreation', $transactionCreation);
}
public function create()
{
$startTime = microtime(true);
@ -87,8 +95,8 @@ class TransactionCreationsController extends AppController
$creationForm = new CreationForm();
$transactionCreation = $this->TransactionCreations->newEntity();
$transactionCreation->state_user_id = $user['id'];
// adding possible addresses + input field for copy
// adding possible addresses + input field for copy
$stateUserTable = TableRegistry::getTableLocator()->get('StateUsers');
$stateUsers = $stateUserTable->find('all')->contain(false);
$receiverProposal = [];
@ -103,13 +111,13 @@ class TransactionCreationsController extends AppController
}
$timeUsed = microtime(true) - $startTime;
$this->set(compact('transactionCreation', 'timeUsed', 'receiverProposal', 'creationForm'));
if ($this->request->is('post')) {
$requestData = $this->request->getData();
$mode = 'next';
if(isset($requestData['add'])) {$mode = 'add'; }
if($creationForm->validate($requestData)) {
$pubKeyHex = '';
$identHash = '';
$amountCent = $this->GradidoNumber->parseInputNumberToCentNumber($requestData['amount']);
@ -121,14 +129,14 @@ class TransactionCreationsController extends AppController
//echo "identHash: $identHash for " . $receiverProposal[$receiverIndex]['email'];
}
$builderResult = TransactionCreation::build(
$amountCent,
$requestData['memo'],
$amountCent,
$requestData['memo'],
$pubKeyHex,
$identHash
);
// echo "builder result state: " . $builderResult['state'] . '<br>';
if($builderResult['state'] == 'success') {
$user_balance = 0;
if(isset($user['balance'])) {
$user_balance = $user['balance'];
@ -181,7 +189,7 @@ class TransactionCreationsController extends AppController
}
}
}
public function createMulti($page = 0)
{
$startTime = microtime(true);
@ -193,9 +201,9 @@ class TransactionCreationsController extends AppController
return $result;
}
$user = $session->read('StateUser');
$stateUserTable = TableRegistry::getTableLocator()->get('StateUsers');
$connection = ConnectionManager::get('default');
$transactionActiveMonth = $connection->execute(
'SELECT id, received FROM transactions '
@ -209,7 +217,7 @@ class TransactionCreationsController extends AppController
foreach($transactionActiveMonth as $t) {
$transactionActiveMonthSortedById[$t['id']] = $t['received'];
}
$firstDayLastMonth = new FrozenDate();
$firstDayLastMonth = new FrozenDate();
$firstDayLastMonth = $firstDayLastMonth->day(1)->subMonth(1);
$transactionsLastMonthTargeDate = $this->TransactionCreations
->find('all')
@ -218,15 +226,15 @@ class TransactionCreationsController extends AppController
->group(['state_user_id'])
->contain([]);
$transactionsLastMonthTargeDate->select([
'state_user_id',
'state_user_id',
'sum_amount' => $transactionsLastMonthTargeDate->func()->sum('amount')
]);
$transactionsLastMonthTargetDateSortedByStateUserId = [];
foreach($transactionsLastMonthTargeDate as $transactionCreation) {
$transactionsLastMonthTargetDateSortedByStateUserId[$transactionCreation->state_user_id] = $transactionCreation->sum_amount;
}
$stateUsers = $stateUserTable
->find('all')
->select(['id', 'first_name', 'last_name', 'email'])
@ -238,7 +246,7 @@ class TransactionCreationsController extends AppController
'TransactionCreations.state_user_id'
]
]]);
//var_dump($stateUsers->toArray());
$possibleReceiver = [];
$countUsers = 0;
@ -257,9 +265,9 @@ class TransactionCreationsController extends AppController
if(isset($transactionActiveMonthSortedById[$transactionCreation->transaction_id])) {
$sumAmount += $transactionCreation->amount;
}
}
//if($sumAmount < 20000000) {
array_push($possibleReceiver, [
'name' => $stateUser->first_name . '&nbsp;' . $stateUser->last_name,
@ -277,10 +285,10 @@ class TransactionCreationsController extends AppController
});
//var_dump($possibleReceiver);
$creationForm = new CreationForm();
$timeUsed = microtime(true) - $startTime;
$this->set(compact('timeUsed', 'stateUsers', 'creationForm', 'possibleReceiver'));
$this->set('firstDayLastMonth', $firstDayLastMonth);
$this->set('activeUser', $user);
$this->set('creationForm', $creationForm);
@ -289,7 +297,7 @@ class TransactionCreationsController extends AppController
$this->set('countUsers', $countUsers);
$this->set('limit', $limit);
$this->set('page', $page);
if ($this->request->is('post')) {
$requestData = $this->request->getData();
//var_dump($requestData);
@ -302,7 +310,7 @@ class TransactionCreationsController extends AppController
$targetDate = $requestData['target_date'];
$mode = 'next';
if(isset($requestData['add'])) {$mode = 'add'; }
if(!isset($requestData['user']) || count($requestData['user']) == 0) {
$this->Flash->error(__('no user choosen'));
} else {
@ -348,8 +356,8 @@ class TransactionCreationsController extends AppController
//echo "output: "; var_dump($localTargetDateFrozen);
//die('a');
$builderResult = TransactionCreation::build(
$localAmountCent,
$memo,
$localAmountCent,
$memo,
$pubKeyHex,
$identHash,
$localTargetDateFrozen
@ -413,7 +421,7 @@ class TransactionCreationsController extends AppController
}
}
}
}
}
}
}
}
@ -425,7 +433,7 @@ class TransactionCreationsController extends AppController
*/
public function add()
{
$transactionCreation = $this->TransactionCreations->newEntity();
if ($this->request->is('post')) {
$transactionCreation = $this->TransactionCreations->patchEntity($transactionCreation, $this->request->getData());

View File

@ -5,6 +5,9 @@ use App\Controller\AppController;
use Cake\Datasource\ConnectionManager;
use Cake\I18n\Time;
use Model\Navigation\NaviHierarchy;
use Model\Navigation\NaviHierarchyEntry;
/**
* Users Controller
*
@ -14,6 +17,16 @@ use Cake\I18n\Time;
*/
class UsersController extends AppController
{
public function initialize()
{
parent::initialize();
$this->set(
'naviHierarchy',
(new NaviHierarchy())->
add(new NaviHierarchyEntry(__('Startseite'), 'Dashboard', 'index', false))->add(new NaviHierarchyEntry(__('Benutzerstatistiken'), 'Users', 'statistics', true))
);
}
/**
* Index method
*
@ -25,13 +38,13 @@ class UsersController extends AppController
$this->set(compact('users'));
}
public function statistics()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend');
$users = $this->Users->find('all')->select(['id']);
//$newUsersThisMonth
$now = new Time();
$sortDate = $this->getStartEndForMonth($now->month, $now->year);
@ -44,11 +57,11 @@ class UsersController extends AppController
$newUsersLastMonth = $this->Users->find('all')
->select(['id'])
->where(['created >=' => $prevSortDate[0], 'created <' => $prevSortDate[1]]);
// new user sorted after date
$connection = ConnectionManager::get('loginServer');
$newAccountsPerDay = $connection->execute('SELECT count(id) as count, created FROM users GROUP BY CAST(created as DATE) ORDER BY created DESC ')->fetchAll('assoc');
$newAccountsTree = [];
foreach($newAccountsPerDay as $entry) {
$created = new Time($entry['created']);
@ -61,12 +74,12 @@ class UsersController extends AppController
array_push($newAccountsTree[$created->year][$created->month]['days'], $entry);
$newAccountsTree[$created->year][$created->month]['count'] += intval($entry['count']);
}
// last 5 new users
$lastUsers = $this->Users->find('all')->order(['created DESC'])->limit(5);
$timeUsed = microtime(true) - $startTime;
$this->set(compact(
'users', 'newUsersThisMonth', 'newUsersLastMonth',
'timeUsed', 'newAccountsTree', 'lastUsers'));

View File

@ -26,7 +26,7 @@ $this->assign('header', $header);
<?php endif; ?>
<div class="content-list">
<p class="content-list-title">Überweisungen</p>
<div class="content-list-table wiretransfer">
<div class="content-list-table">
<div class="row">
<div class="cell header-cell c4"><?= __('Absender') . ' / ' . ('Empfänger') ?></div>
<div class="cell header-cell c0"><?= __('Verwendungszweck') ?></div>

View File

@ -1,6 +1,6 @@
<?php
/*
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@ -9,9 +9,10 @@
$this->assign('title', __('Benutzer suchen'));
// In a View class
$this->loadHelper('Form', [
'templates' => 'ripple_control_group_form',
]);//*/
'templates' => 'horizontal_form',
]);
?>
<?= $this->Html->css(['loginServer/style.css']) ?>
<style type="text/css">
td.actions {
padding: 10px 30px;
@ -19,44 +20,30 @@ $this->loadHelper('Form', [
td.actions p {
white-space:normal;
font-size:16px;
}
}
td.actions ul {
list-style-type:decimal;
padding-left:20px;
}
td.actions ul li {
white-space:initial;
font-size:14px;
- font-size:14px;
}
td.actions ul li .btn {
margin: 0 15px;
}
</style>
<div class="row">
<div class="col-md-10 equel-grid">
<div class="grid">
<p class="grid-header">Benutzer suchen</p>
<div class="grid-body">
<div class="item-wrapper">
<div class="row mb-3">
<div class="col-md-10 mx-auto">
<?= $this->Form->create($searchForm, ['class' => 't-header-search-box']) ?>
<?= $this->Form->control('search', ['label' => false, 'class' => 'form-control', 'id' => 'inlineFormInputGroup', 'placeholder' => __('Vorname oder Nachname oder E-Mail')]) ?>
<?= $this->Form->button('<i class="mdi mdi-magnify"></i>&nbsp;' . __('Datenbank durchsuchen'), ['class' => 'btn btn-sm btn-primary']) ?>
<?= $this->Form->hidden('order_row', ['id' => 'input-order-row']) ?>
</div>
</div>
</div>
</div>
</div>
<div class="action-form">
<p class="form-header">Benutzer suchen</p>
<div class="form-body">
<?= $this->Form->create($searchForm, []) ?>
<?= $this->Form->control('search', ['label' => __('Suchbegriff'), 'class' => 'form-control', 'id' => 'inlineFormInputGroup', 'placeholder' => __('Vorname/Nachname/E-Mail')]) ?>
<?= $this->Form->button('<i class="material-icons-outlined">search</i>&nbsp;' . __('Suchen'), ['class' => 'form-button']) ?>
<?= $this->Form->hidden('order_row', ['id' => 'input-order-row']) ?>
</div>
</div>
<div class="row">
<div class="col-md-12 equel-grid">
<div class="grid">
<div id="gradido-mithril-user-search"></div>
</div>
</div>
<div class="default-container">
<div id="gradido-mithril-user-search"></div>
</div>
<?php // adding scripts vendor and core from ripple ui for popup/tooltip ?>
<script type="text/javascript">
@ -66,6 +53,6 @@ $this->loadHelper('Form', [
g_users = [];
<?php endif; ?>
csfr_token = '<?= $csfr_token ?>';
</script>
<?= $this->Html->script('userSearch') ?>
<?= $this->Html->script('userSearch') ?>

View File

@ -1,6 +1,6 @@
<?php
/*
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@ -23,34 +23,34 @@ use Cake\I18n\FrozenTime;
input[type='checkbox'] {
width:25px;
}
.grd_big_checkbox {
border:1px dotted black;
padding:4px;
margin-bottom:5px;
}
.grd_margin-bottom_50 {
margin-bottom:50px;
}
.grd_margin-bottom_100 {
margin-bottom:100px;
}
.grd_margin-bottom_120 {
margin-bottom:120px;
}
.grd_smaller {
font-size:smaller;
color:blue;
}
.color-orange {
color:#6400d9;
}
.flowing-bottom {
position:fixed;
bottom:0px;
@ -60,10 +60,9 @@ use Cake\I18n\FrozenTime;
padding-bottom:10px;
background-color:rgba(255,255,255,0.5);
}
</style>
<div class="grd_container_small grd_margin-bottom_120">
<button type="button" onclick="checkAll()" >Alle auswählen</button>
<button type="button" onclick="uncheckAll()">Alle abwählen</button>
<div style="margin-bottom:5px"></div>
@ -74,8 +73,8 @@ use Cake\I18n\FrozenTime;
<fieldset>
<?= $this->Form->control('memo'); ?>
<?= $this->Form->control('amount', ['required' => false]); ?>
<?php
$firstDayLastMonth = new FrozenTime();
<?php
$firstDayLastMonth = new FrozenTime();
$firstDayLastMonth = $firstDayLastMonth->day(1)->subMonth(1);
?>
<?= $this->Form->control('target_date', ['value' => $firstDayLastMonth]); ?>
@ -94,7 +93,7 @@ use Cake\I18n\FrozenTime;
<span style="color:grey" title="Du kannst leider nicht für dich selbst schöpfen.">
<?php endif; ?>
<a style="color:black;text-decoration: none;" target="_blank" href="/state-users/view/<?= $possibleReceiver['id'] ?>">
<?= $possibleReceiver['name'] ?>
<?= $possibleReceiver['name'] ?>
<?php if($possibleReceiver['email'] != '') : ?>
&lt;<?= $possibleReceiver['email'] ?>&gt;
<?php endif; ?></a><br>
@ -129,17 +128,17 @@ use Cake\I18n\FrozenTime;
<!--<?= $this->Form->control('receiver_pubkey_hex', []) ?>-->
</fieldset>
<div class="flowing-bottom">
<?php if($countUsers > $limit) :
<?php if($countUsers > $limit) :
?><p><?= $countUsers ?> Benutzer insgesamt</p>
<p>Seiten:
<p>Seiten:
<?php for($i = 0; $i < ceil($countUsers/$limit); $i++) {
if($i > 0) echo ', ';
if($i > 0) echo ', ';
if($i != $page) {
echo $this->Html->link($i, ['action' => 'create_multi', $i]);
} else {
echo $i;
}
}
}
?>
</p><?php endif ?>
<?= $this->Form->button(__('Transaktion(en) abschließen'), ['name' => 'next', 'class' => 'grd-form-bn grd-form-bn-succeed grd_clickable grd-width-200']) ?>
@ -154,21 +153,21 @@ use Cake\I18n\FrozenTime;
var inputs = document.getElementsByTagName("input");
for(var i = 0; i < inputs.length; i++) {
if(inputs[i].type == "checkbox") {
inputs[i].checked = true;
}
}
inputs[i].checked = true;
}
}
}
function uncheckAll()
{
var inputs = document.getElementsByTagName("input");
for(var i = 0; i < inputs.length; i++) {
if(inputs[i].type == "checkbox") {
inputs[i].checked = false;
}
inputs[i].checked = false;
}
}
}
(function(document, window, domIsReady, undefined) {
domIsReady(function() {
var userAmountInputs = document.getElementsByClassName("user_amount");
@ -188,15 +187,15 @@ use Cake\I18n\FrozenTime;
});
})(document, window, domIsReady);
//
//
</script>
<?php if($transactionExecutingCount > 0) : ?>
<script type="text/javascript">
//function getJson(basisUrl, method, successFunction, errorFunction, timeoutFunction)
g_transactionExecutionCount = <?= $transactionExecutingCount ?>;
g_updateExecutionDisplayInterval = null;
function updateTransactionExecutingDisplay(count) {
var display = document.getElementById('transaction-execute-display');
if(count > 0) {
@ -210,10 +209,10 @@ use Cake\I18n\FrozenTime;
display.innerHTML = '<?= __('Alle Transaktionen abgeschlossen!') ?> <button class="grd-form-bn grd_clickable" onclick="location.reload()">Seite neuladen</button>';
}
}
function checkTransactionExecuting() {
getJson('<?= $this->Url->build(["controller" => "JsonRequestHandler"]);?>', 'getRunningUserTasks',
// success
function(json) {
@ -240,7 +239,7 @@ use Cake\I18n\FrozenTime;
}
)
}
(function(document, window, domIsReady, undefined) {
domIsReady(function() {
updateTransactionExecutingDisplay(g_transactionExecutionCount);

View File

@ -1,6 +1,6 @@
<?php
/*
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
@ -11,112 +11,88 @@ $this->assign('title', __('Benutzer Statistiken'));
//mdi mdi-account-multiple-plus
//$newUserPercent = (1 - (b / a)) * 100
$newUserPercent = 0;
$percentColor = 'text-secondary';
$percentColor = 'info';
if($users->count() > 0 && $newUsersLastMonth->count()) {
$newUserPercent = round((1 - ($users->count() / $newUsersLastMonth->count())) * 100.0, 2);
if($newUserPercent > 0 ) {
$percentColor = 'text-primary';
} else if($newUserPercent < 0) {
$percentColor = 'text-warning';
$percentColor = 'success';
} else if($newUserPercent <= 0) {
$percentColor = 'alert';
}
}
$userColor = 'info';
if($users->count() > 0) {
if($users->count() > 0 ) {
$userColor = 'success';
} else if($users->count() <= 0) {
$userColor = 'alert';
}
}
?>
<div class="row">
<div class="col-md-5 order-md-0">
<div class="row">
<div class="col-6 equel-grid">
<div class="grid d-flex flex-column align-items-center justify-content-center">
<div class="grid-body text-center">
<div class="profile-img img-rounded bg-inverse-primary no-avatar component-flat mx-auto mb-4"><i class="mdi mdi-account-group mdi-2x"></i></div>
<h2 class="font-weight-medium"><span class="animated-count"><?= $users->count()?></span></h2>
<small class="text-gray d-block mt-3"><?= __('Alle Anmeldungen'); ?><br>&nbsp;</small>
<small class="font-weight-medium <?= $percentColor; ?>">
<span class="animated-count" >&nbsp;</span>
</small>
</div>
</div>
</div>
<div class="col-6 equel-grid">
<div class="grid d-flex flex-column align-items-center justify-content-center">
<div class="grid-body text-center">
<div class="profile-img img-rounded bg-inverse-warning no-avatar component-flat mx-auto mb-4"><i class="mdi mdi-account-multiple-plus mdi-2x"></i></div>
<h2 class="font-weight-medium"><span class="animated-count"><?= $newUsersThisMonth->count() ?></span></h2>
<small class="text-gray d-block mt-3"><?= __('Anmeldungen diesen Monat'); ?></small>
<small class="font-weight-medium <?= $percentColor; ?>">
<?php if($newUserPercent < 0) : ?>
<i class="mdi mdi-menu-down"></i>
<?php elseif($newUserPercent > 0) : ?>
<i class="mdi mdi-menu-up"></i>
<?php endif; ?>
<span class="animated-count" title="<?= __('Anmeldungen im Vergleich zum letzten Monat, 0% = gleiche Anzahl') ?>"><?= $newUserPercent ?></span>%
</small>
</div>
</div>
</div>
<div class="block-container">
<div class="content-block">
<div class="block-img <?= $userColor ?>-icon">
<i class="material-icons-outlined">people</i>
</div>
<h1><?= $users->count()?></h1>
<small class="small-font"><?= __('Alle Anmeldungen'); ?><br>&nbsp;</small>
<small class="font-weight-medium <?= $userColor; ?>-color">
<span>&nbsp;</span>
</small>
</div>
<div class="content-block">
<div class="block-img <?= $percentColor ?>-icon">
<i class="material-icons-outlined">group_add</i>
</div>
<h1><?= $newUsersThisMonth->count() ?></h1>
<small class="small-font"><?= __('Anmeldungen diesen Monat'); ?><br>&nbsp;</small>
<small class="font-weight-medium <?= $percentColor; ?>-color">
<?php if($newUserPercent < 0) : ?>
<i class="material-icons-outlined">arrow_drop_down</i>
<?php elseif($newUserPercent > 0) : ?>
<i class="material-icons-outlined">arrow_drop_up</i>
<?php endif; ?>
<span title="<?= __('Anmeldungen im Vergleich zum letzten Monat, 0% = gleiche Anzahl') ?>"><?= $newUserPercent ?></span>%
</small>
</div>
</div>
<div class="row">
<div class="col-md-10 equel-grid">
<div class="grid">
<div class="grid-body py-3">
<p class="card-title ml-n1"><?= __('Letzte Anmeldungen'); ?></p>
</div>
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr class="solid-header">
<th class="pl-4"><?= __('Name')?></th>
<th><?= __('E-Mail') ?></th>
<th><?= __('Erstellt') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($lastUsers as $user) : ?>
<tr>
<td><?= $user->first_name . ' ' . $user->last_name ?></td>
<td><?= $user->email ?></td>
<td><?= $user->created ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php //var_dump($lastUsers->toArray()); ?>
</div>
<div class="content-list">
<p class="content-list-title"><?= __('Letzte Anmeldungen'); ?></p>
<div class="content-list-table">
<div class="row">
<div class="cell header-cell c4"><?= __('Name')?></div>
<div class="cell header-cell c0"><?= __('E-Mail') ?></div>
<div class="cell header-cell c4"><?= __('Erstellt') ?></div>
</div>
<?php foreach($lastUsers as $user) : ?>
<div class="row">
<div class="cell c4"><?= $user->first_name . ' ' . $user->last_name ?></div>
<div class="cell c0"><?= $user->email ?></div>
<div class="cell c4"><?= $user->created ?></div>
</div>
<?php endforeach; ?>
<?php //var_dump($lastUsers->toArray()); ?>
</div>
</div>
<div class="row">
<div class="col-md-8 equel-grid">
<div class="grid">
<div class="grid-body py-3">
<p class="card-title ml-n1"><?= __('Anmeldungen detailliert'); ?></p>
</div>
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr class="solid-header">
<th class="pl-4"><?= __('Jahr')?></th>
<th><?= __('Monat') ?></th>
<th><?= __('Anzahl Anmeldungen') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($newAccountsTree as $year => $yearEntrys) : ?>
<?php foreach($yearEntrys as $month => $monthEntrys): ?>
<tr class="collapsed" data-toggle="collapse" aria-expanded="false">
<td><?= $year ?></td>
<td><?= $month ?></td>
<td><?= $monthEntrys['count'] ?></td>
</tr>
<tr class="collapse"><td>Tage</td></tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="content-list">
<p class="content-list-title"><?= __('Anmeldungen detailliert'); ?></p>
<div class="content-list-table">
<div class="row">
<div class="cell header-cell c4"><?= __('Jahr')?></div>
<div class="cell header-cell c0"><?= __('Monat') ?></div>
<div class="cell header-cell c4"><?= __('Anzahl Anmeldungen') ?></div>
</div>
<?php foreach($newAccountsTree as $year => $yearEntrys) : ?>
<?php foreach($yearEntrys as $month => $monthEntrys): ?>
<div class="row">
<div class="cell c4"><?= $year ?></div>
<div class="cell c0"><?= $month ?></div>
<div class="cell c4"><?= $monthEntrys['count'] ?></div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
<?= $this->Html->script(['core', 'vendor.addons']); ?>
<?= $this->Html->script('userSearch') ?>

View File

@ -70,15 +70,47 @@
/*rgba(0, 0, 0, 0.5) ??? */
/* NOTIFICATION */
/* https://www.w3schools.com/colors/colors_shades.asp */
.alert-color {
color: #ff5f66;
.info-color {
color: grey;
}
.success-color {
color: #047006;
}
.alert-color {
color: #ff5f66;
}
.orange-color {
color: #ffa600;
}
.unobtrusive {
color: grey;
}
.info-icon {
color: grey;
background-color: #80808026;
}
.success-icon {
color: #047006;
background-color: rgba(4, 112, 6, 0.2);
}
.alert-icon {
color: #ff5f66;
background-color: #ff5f662e;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
/* ============================================================
Typography Definitions
@ -89,6 +121,10 @@
Copyright : Gradio
============================================================*/
.small-font {
font-size: 0.75em;
font-weight: 300;
}
/* ============================================================
Basic screen styles.
@ -215,20 +251,6 @@
a.grd_invisible_link:hover {
color: grey;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
}
/* Ende @media screen */
/*
@ -737,6 +759,11 @@ and open the template in the editor.
border: 1px solid rgba(238, 238, 238, 0.75);
margin: 1em 0.25em;
}
/* Block Container Above Main */
.block-container {
width: 100%;
display: flex;
}
/* Top Info Above Main */
.info-container {
max-width: 70%;
@ -751,6 +778,31 @@ and open the template in the editor.
margin: auto;
padding: 1em;
}
/* Content Block */
.content-block {
width: 170px;
padding: 20px 25px 20px;
border: 1px dashed grey;
border-radius: 16px;
margin: 1em;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.block-img {
width: 40px;
height: 40px;
line-height: 20px;
font-size: 24px;
padding: 8px;
border-radius: 20px;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
overflow: hidden;
border-style: none;
box-sizing: border-box;
}
/* Generic Content */
.content-region {
border-bottom: 1px dashed #F5F5F5;
@ -880,9 +932,6 @@ and open the template in the editor.
vertical-align: middle;
}
/* Individual Tables XXX rm!! */
.wiretransfer {
grid-template-columns: 5fr 4fr 3fr 2fr 1fr;
}
.error-list {
grid-template-columns: 2fr 2fr 5fr 1fr;
}

View File

@ -70,15 +70,47 @@
/*rgba(0, 0, 0, 0.5) ??? */
/* NOTIFICATION */
/* https://www.w3schools.com/colors/colors_shades.asp */
.alert-color {
color: #ff5f66;
.info-color {
color: grey;
}
.success-color {
color: #047006;
}
.alert-color {
color: #ff5f66;
}
.orange-color {
color: #ffa600;
}
.unobtrusive {
color: grey;
}
.info-icon {
color: grey;
background-color: #80808026;
}
.success-icon {
color: #047006;
background-color: rgba(4, 112, 6, 0.2);
}
.alert-icon {
color: #ff5f66;
background-color: #ff5f662e;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
/* ============================================================
Typography Definitions
@ -89,6 +121,10 @@
Copyright : Gradio
============================================================*/
.small-font {
font-size: 0.75em;
font-weight: 300;
}
/* ============================================================
Basic screen styles.
@ -215,20 +251,6 @@
a.grd_invisible_link:hover {
color: grey;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
}
/* Ende @media screen */
/*
@ -737,6 +759,11 @@ and open the template in the editor.
border: 1px solid rgba(238, 238, 238, 0.75);
margin: 1em 0.25em;
}
/* Block Container Above Main */
.block-container {
width: 100%;
display: flex;
}
/* Top Info Above Main */
.info-container {
max-width: 70%;
@ -751,6 +778,31 @@ and open the template in the editor.
margin: auto;
padding: 1em;
}
/* Content Block */
.content-block {
width: 170px;
padding: 20px 25px 20px;
border: 1px dashed grey;
border-radius: 16px;
margin: 1em;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.block-img {
width: 40px;
height: 40px;
line-height: 20px;
font-size: 24px;
padding: 8px;
border-radius: 20px;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
overflow: hidden;
border-style: none;
box-sizing: border-box;
}
/* Generic Content */
.content-region {
border-bottom: 1px dashed #F5F5F5;
@ -880,9 +932,6 @@ and open the template in the editor.
vertical-align: middle;
}
/* Individual Tables XXX rm!! */
.wiretransfer {
grid-template-columns: 5fr 4fr 3fr 2fr 1fr;
}
.error-list {
grid-template-columns: 2fr 2fr 5fr 1fr;
}

View File

@ -74,16 +74,21 @@
@gdt-text: #a27824;
/* NOTIFICATION */
@info: grey;
@info-border: gray;
@success: green;
@success-background: lightcyan;
@success-background-hover: lightgreen;
@alert-color: #fff;
@info-background: #80808026;
@info-background-icon: #80808026;
@error: red;
@error-border: rgba(255, 0, 0, 0.5);
@success: #047006;
@success-border: #04700675;
@success-background: rgba(4, 112, 6, 0.2);
@success-background-icon: rgba(4, 112, 6, 0.2);
@success-background-hover: lightgreen;
@alert: #ff5f66;
@alert-color: #fff;
@alert-background: #ff5f669e;
@alert-background-icon: #ff5f662e;
@alert-blink: #ff5f669e;
@notify: #525c5d;
@notify-blink: #525c5d82;
@ -93,14 +98,55 @@
@light: #F5F5F5;
@verylight: #fbfbfb;
.alert-color {
color: @alert;
.info-color {
color: @info;
}
.success-color {
color: @success;
}
.alert-color {
color: @alert;
}
.orange-color {
color: @orange
}
.unobtrusive {
color: @unobtrusive;
}
.info-icon {
color: @info;
background-color: @info-background-icon;
}
.success-icon {
color: @success;
background-color: @success-background-icon;
}
.alert-icon {
color: @alert;
background-color: @alert-background-icon;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: @gdt-text;
}
.grd_clickable {
cursor: pointer;
}

View File

@ -8,25 +8,23 @@
Copyright : Gradio
============================================================*/
@body-fs: 100%;
@body-lh: 27px;
@content-lh: 1.5em;
@content-letter-spacing: .03rem;
@nav-fs: .8em;
@nav-bottom-fs: .9em;
@nav-btn-large-fs: 35px;
@nav-icon-fs: 1.2em;
@nav-icons-fs: 18px;
@nav-icon-main-fs: 32px;
@footer-fs: 70%;
@sidebar1-header-fs: .75em;
@sidebar1-lh: 2.5em;
@link-title-lh: normal;
@devinfo-fs: smaller;
.small-font {
font-size: .75em;
font-weight: 300;
}

View File

@ -140,24 +140,6 @@
color: @unobtrusive;
}
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
/* Gradido Transform */
.gdt-text-color {
color: @gdt-text;
}
.grd_clickable {
cursor: pointer;
}
}
/* Ende @media screen */

View File

@ -69,6 +69,12 @@
margin: 1em .25em;
}
/* Block Container Above Main */
.block-container {
width: 100%;
display: flex;
}
/* Top Info Above Main */
.info-container {
max-width: 70%;
@ -86,6 +92,33 @@
padding: 1em;
}
/* Content Block */
.content-block {
width: 170px;
padding: 20px 25px 20px;
border: 1px dashed grey;
border-radius: 16px;
margin: 1em;
display: flex;
flex-direction: column;
justify-content: center;
justify-items: center;
align-items: center;
}
.block-img {
width: 40px;
height: 40px;
line-height: 20px;
font-size: 24px;
padding: 8px;
border-radius: 20px;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
overflow: hidden;
border-style: none;
box-sizing: border-box;
}
/* Generic Content */
.content-region {
border-bottom: 1px dashed @light;

View File

@ -109,10 +109,6 @@
}
/* Individual Tables XXX rm!! */
.wiretransfer {
grid-template-columns: 5fr 4fr 3fr 2fr 1fr;
}
.error-list {
grid-template-columns: 2fr 2fr 5fr 1fr;
}