This commit is contained in:
Christine Slotty 2020-05-29 18:03:23 +02:00
parent c9bb7e9057
commit 628d3ddde2
24 changed files with 388 additions and 552 deletions

View File

@ -29,7 +29,7 @@ class DashboardController extends AppController
public function index()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
if($result !== true) {

View File

@ -34,7 +34,7 @@ class ElopageBuysController extends AppController
public function statistics()
{
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$connection = ConnectionManager::get('loginServer');
$dates = $connection->execute('SELECT success_date FROM elopage_buys group by CAST(success_date as DATE)')->fetchAll('assoc');

View File

@ -13,7 +13,7 @@ use App\Controller\AppController;
*/
class StateBalancesController extends AppController
{
public function initialize()
{
parent::initialize();
@ -35,11 +35,11 @@ class StateBalancesController extends AppController
$this->set(compact('stateBalances'));
}
public function overview()
public function overview()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
if($result !== true) {
@ -48,7 +48,7 @@ class StateBalancesController extends AppController
$user = $session->read('StateUser');
// sendRequestGDT
// listPerEmailApi
//var_dump($user);
$gdtSum = 0;
if('admin' === $user['role']) {
@ -60,21 +60,21 @@ class StateBalancesController extends AppController
}
//
//
$creationsTable = TableRegistry::getTableLocator()->get('TransactionCreations');
$creationTransactions = $creationsTable
->find('all')
->where(['state_user_id' => $user['id']])
->contain(['Transactions']);
$transferTable = TableRegistry::getTableLocator()->get('TransactionSendCoins');
$transferTransactions = $transferTable
->find('all')
->where(['OR' => ['state_user_id' => $user['id'], 'receiver_user_id' => $user['id']]])
->contain(['Transactions']);
$involvedUserIds = [];
foreach($transferTransactions as $sendCoins) {
//var_dump($sendCoins);
if($sendCoins->state_user_id != $user['id']) {
@ -83,7 +83,7 @@ class StateBalancesController extends AppController
array_push($involvedUserIds, intval($sendCoins->receiver_user_id));
}
}
/*echo "state user from sendCoins: $sendCoins->state_user_id<br>";
echo "receiver user from sendCoins: $sendCoins->receiver_user_id<br>";
echo "user id from logged in user: ".$user['id']. '<br>';
@ -95,7 +95,7 @@ class StateBalancesController extends AppController
$involvedUserIds = array_flip($involvedUser_temp);
$userTable = TableRegistry::getTableLocator()->get('StateUsers');
$involvedUser = $userTable->find('all', [
'contain' => false,
'contain' => false,
'where' => ['id IN' => $involvedUserIds],
'fields' => ['id', 'first_name', 'last_name', 'email']
]);
@ -104,27 +104,27 @@ class StateBalancesController extends AppController
foreach($involvedUser as $involvedUser) {
$involvedUserIndices[$involvedUser->id] = $involvedUser;
}
// sender or receiver when user has sended money
// group name if creation
// type: gesendet / empfangen / geschöpft
// transaktion nr / id
// date
// balance
$transactions = [];
foreach($creationTransactions as $creation) {
//var_dump($creation);
array_push($transactions, [
'name' => 'Gradido Akademie',
'type' => 'creation',
'transaction_id' => $creation->transaction_id,
'date' => $creation->transaction->received,
'name' => 'Gradido Akademie',
'type' => 'creation',
'transaction_id' => $creation->transaction_id,
'date' => $creation->transaction->received,
'balance' => $creation->amount,
'memo' => $creation->transaction->memo
]);
}
foreach($transferTransactions as $sendCoins) {
$type = '';
$otherUser = null;
@ -145,18 +145,18 @@ class StateBalancesController extends AppController
'memo' => $sendCoins->transaction->memo
]);
}
uasort($transactions, array($this, 'sortTransactions'));
uasort($transactions, array($this, 'sortTransactions'));
$this->set('transactions', $transactions);
$this->set('transactionExecutingCount', $session->read('Transaction.executing'));
$this->set('balance', $session->read('StateUser.balance'));
$this->set('timeUsed', microtime(true) - $startTime);
$this->set('gdtSum', $gdtSum);
}
public function overviewGdt()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
if($result !== true) {
@ -167,33 +167,33 @@ class StateBalancesController extends AppController
if('success' === $requestResult['state'] && 'success' === $requestResult['data']['state']) {
//var_dump(array_keys($requestResult['data']));
$ownEntries = $requestResult['data']['ownEntries'];
//$gdtEntries = $requestResult['data']['entries'];
$gdtSum = 0;
foreach($ownEntries as $i => $gdtEntry) {
$gdtSum += $gdtEntry['gdt'];
//echo "index: $i<br>";
//var_dump($gdtEntry);
}
if(isset($requestResult['data']['connectEntrys'])) {
$connectEntries = $requestResult['data']['connectEntrys'];
foreach($connectEntries as $entry) {
//if(!$count) var_dump($entry);
//$count++;
$gdtSum += $entry['connect']['gdt_entry']['gdt'];
$gdtSum += $entry['connect']['gdt_entry']['gdt'];
}
$this->set('connectEntries', $connectEntries);
}
//echo "gdtSum: $gdtSum<br>";
$this->set('gdtSum', $gdtSum);
$this->set('ownEntries', $ownEntries);
if(isset($requestResult['data']['publishers'])) {
$publishers = $requestResult['data']['publishers'];
$this->set('publishers', $publishers);
@ -201,15 +201,15 @@ class StateBalancesController extends AppController
} else {
$this->Flash->error(__('Fehler beim GDT Server, bitte abwarten oder den Admin benachrichtigen!'));
}
}
public function sortTransactions($a, $b) {
if ($a['date'] == $b['date']) {
return 0;
}
return ($a['date'] > $b['date']) ? -1 : 1;
}
/**

View File

@ -73,7 +73,7 @@ class StateUsersController extends AppController
{
$startTime = microtime(true);
I18n::setLocale('de_DE');
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$session = $this->getRequest()->getSession();
$result = $this->requestLogin();
if($result !== true) {

View File

@ -124,7 +124,7 @@ class TransactionSendCoinsController extends AppController
echo "locale: $locale, default locale: $defaultLocale<br>";
* */
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$session = $this->getRequest()->getSession();
$user = $session->read('StateUser');
// var_dump($user);
@ -266,7 +266,7 @@ class TransactionSendCoinsController extends AppController
public function createRaw()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$transferRawForm = new TransferRawForm();
$this->set('transferRawForm', $transferRawForm);

View File

@ -29,7 +29,7 @@ class UsersController extends AppController
public function statistics()
{
$startTime = microtime(true);
$this->viewBuilder()->setLayout('frontend_ripple');
$this->viewBuilder()->setLayout('frontend');
$users = $this->Users->find('all')->select(['id']);
//$newUsersThisMonth

View File

@ -13,14 +13,18 @@ $this->assign(
'title',
__('Willkommen') . ', ' . $user['first_name'] . '&nbsp;' . $user['last_name'] . '!'
);
$this->assign(
'header',
'<h1>'.__('Willkommen') . ', ' . $user['first_name'] . '&nbsp;' . $user['last_name'] . '!</h1>'
);
?>
<?php if(isset($requestTime)) : ?>
<span><?= round($requestTime * 1000.0) ?> ms</span>
<?php endif; ?>
<div class="content-region">
<h3>Gradido ...</h3>
<div class="horizontal-collection">
<div class="action-button">
<div class="content-collection">
<div class="content-item action-button">
<i class="material-icons-outlined">account_balance_wallet</i>
<?= $this->Html->link(
__('Kontoübersicht'),
@ -28,7 +32,7 @@ $this->assign(
['class' => 'action-button-link']
);?>
</div>
<div class="action-button">
<div class="content-item action-button">
<i class="material-icons-outlined">account_balance</i>
<?= $this->Html->link(
__('Überweisung'),
@ -45,11 +49,9 @@ $this->assign(
<?php if($serverUser != null || $user['role'] == 'admin') : ?>
<div class="content-region">
<h2><?= __('Adminbereich'); ?></h2>
<?php endif; ?>
<?php if($serverUser != null) : ?>
<h3>Gradido ...</h3>
<div class="horizontal-collection">
<div class="action-button">
<div class="content-collection">
<div class="content-item action-button">
<i class="material-icons-outlined">add_box</i>
<?= $this->Html->link(
__('einzeln schöpfen'),
@ -57,7 +59,7 @@ $this->assign(
['class' => 'action-button-link']
);?>
</div>
<div class="action-button">
<div class="content-item action-button">
<i class="material-icons-outlined">library_add</i>
<?= $this->Html->link(
__('viele schöpfen'),
@ -69,8 +71,8 @@ $this->assign(
</div>
<div class="content-region">
<legend>Statistik</legend>
<div class="horizontal-collection">
<div class="info-item">
<div class="content-collection">
<div class="content-item info-item">
<i class="material-icons-outlined">cached</i>
<?= $this->Html->link(
__('Anmeldungen'),
@ -78,32 +80,42 @@ $this->assign(
['class' => 'info-item-link']
);?>
</div>
<div class="info-item">
<?php if($serverUser != null) : ?>
<div class="content-item info-item">
<i class="material-icons-outlined">error_outline</i>
<?= $this->Html->link(
__('Fehler') . ' (' . $adminErrorCount . ')',
['controller' => 'AdminErrors'], ['class' => 'info-item-link']);
?>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if($user['role'] == 'admin') : ?>
<div class="content-region">
<h3>Benutzer ...</h3>
<i class="material-icons-outlined">search</i>
<?= $this->Html->link(
__('suchen'),
['controller' => 'StateUsers', 'action' => 'search'],
['class' => 'action-button']
); ?>
<i class="material-icons-outlined">how_to_reg</i>
<a href="<?= Router::url('./', true) ?>account/adminRegister" class="action-button">
<?= __("hinzufügen") ?>
</a>
<i class="material-icons-outlined">enhanced_encryption</i>
<a href="<?= Router::url('./', true) ?>account/adminUserPasswordReset" class="action-button">
<?= __("hat sein Passwort und Passphrase vergessen") ?>
</a>
<div class="content-collection">
<div class="content-item action-button">
<i class="material-icons-outlined">search</i>
<?= $this->Html->link(
__('suchen'),
['controller' => 'StateUsers', 'action' => 'search'],
['class' => 'info-item-link']
); ?>
</div>
<div class="content-item action-button">
<i class="material-icons-outlined">how_to_reg</i>
<a href="<?= Router::url('./', true) ?>account/adminRegister" class="info-item-link">
<?= __("hinzufügen") ?>
</a>
</div>
<div class="content-item action-button">
<i class="material-icons-outlined">enhanced_encryption</i>
<a href="<?= Router::url('./', true) ?>account/adminUserPasswordReset" class="info-item-link">
<?= __("hat sein Passwort und Passphrase vergessen") ?>
</a>
</div>
</div>
</div>
<?php endif; ?>

View File

@ -48,5 +48,5 @@ if(intval($transactionPendings) > 0) {
?>
<ul>
<?php foreach($navi as $n) echo $n; ?>
</ul>
<?php foreach($navi as $n) echo $n; ?>
</ul>

View File

@ -1,4 +1,4 @@
<?php
<?php
use Cake\Routing\Router;
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
@ -14,13 +14,10 @@ use Cake\Routing\Router;
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
$cakeDescription = 'Gradido';
$session = $this->getRequest()->getSession();
$transactionPendings = $session->read('Transactions.pending');
$errorCount = intval($session->read('StateUser.errorCount'));
$balance = $session->read('StateUser.balance');
if(!isset($balance)) {
$balance = 0;
}
$GLOBALS["self"] = $this;
//echo "balance: $balance<br>";
//echo "transactions pending: " . $transactionPendings;
?>
<!DOCTYPE html>
<html>
@ -32,103 +29,72 @@ if(!isset($balance)) {
<?= $this->fetch('title') ?>
</title>
<?= $this->Html->meta('icon') ?>
<?= $this->Html->css('main.css') ?>
<?= $this->Html->script('fa-all.min.js') ?>
<?= $this->Html->css(['main.css']) ?>
<?= $this->Html->script(['basic']) ?>
<?= $this->fetch('meta') ?>
<?= $this->fetch('css') ?>
<?= $this->fetch('script') ?>
</head>
<body>
<div class="layout">
<div class="header">
<?= $this->Html->image(
'logo_schrift.png',
['alt' => 'Gradido'],
['class' => 'logo']
)
?>
<h1><?= $this->fetch('title') ?></h1>
<nav class="nav-top nav-horizontal">
<ul>
<li>Mein Profil XXX</li>
</ul>
</nav>
</div>
<div class="sidebar1">
<!-- TODO save last state so that it remains unchanged, on reload! -->
<div class="sidebar1 nav-menu initial">
<a href="/">
<picture class="logo big visible">
<source srcset="/img/logo_schrift_half.webp" type="image/webp">
<source srcset="/img/logo_schrift_half.png" type="image/png">
<img src="/img/logo_schrift_half.png" class="logo big visible" alt="Logo">
</picture>
<picture class="logo small">
<source srcset="/img/logo_half.webp" type="image/webp">
<source srcset="/img/logo_half.png" type="image/png">
<img src="/img/logo_half.png" class="logo small" alt="Logo">
</picture>
</a>
<div>
<div class="sidebar1-header">
Navigation
</div>
<div class="nav-vertical">
<ul>
<?php if($errorCount > 0) : ?>
<li>
<?= $this->Html->Link(
__('Fehler '). "($errorCount)",
['controller' => 'StateErrors',
'action' => 'showForUser'],
['class' => 'grd-nav-bn grd-nav-bn-discard']) ?>
</li>
<?php endif; ?>
<?php if(isset($balance)) : ?>
<li><i class="fa fa-list nav-icon"></i>
<?= $this->Html->link(
$this->element('printGradido', ['number' => $balance]),
['controller' => 'StateBalances', 'action' => 'overview'],
['class' => 'grd-nav-bn', 'escape' => false])
?>
</li>
<?php endif; ?>
<li><i class="fa fa-home nav-icon"></i>
<?= $this->Html->link(
__('Startseite'),
['controller' => 'Dashboard', 'action' => 'index'],
['class' => 'grd-nav-bn'])?>
</li>
<li><i class="fa fa-user-friends nav-icon"></i>
<a href="https://elopage.com/s/gradido/sign_in" target="_blank" class="grd-nav-bn">
<?= __("Mitgliederbereich") ?>
</a>
</li>
<?php if(intval($transactionPendings) > 0) : ?>
<li>
<a href="<?= Router::url('./', true) ?>account/checkTransactions" class="grd-nav-bn">
<?= __("Transaktionen unterzeichnen") . '&nbsp;(' . intval($transactionPendings) . ')'?>
</a>
</li>
<?php else: ?>
<li><i class="fa fa-sign-out-alt nav-icon"></i>
<a href="<?= Router::url('./', true) ?>account/logout" class="grd-nav-bn"><?= __("Logout"); ?></a>
</li>
<?php endif; ?>
</ul>
</div>
<i class="material-icons-outlined nav-main-button">menu</i>
</div>
<!-- XXX -->
<div class="flash-messages">
<?= $this->Flash->render() ?>
</div>
<?= $this->element('navi_header'); ?>
<!-- XXX -->
<div class="nav-vertical">
<?= $this->element('navi'); ?>
</div>
</div>
<div class="content">
<div class="flash-messages"><?= $this->Flash->render() ?></div>
<?= $this->fetch('content') ?>
<div class="nav-content">
<?= $this->Html->link(__('Startseite'), ['controller' => 'Dashboard']); ?>
</div>
<?php if ($this->fetch('header')): ?>
<div class="content-container info-container">
<?= $this->fetch('header') ?>
</div>
<?php endif;?>
<div class="content-container main-container">
<?= $this->fetch('content') ?>
</div>
</div>
<div class="sidebar2">
<p><?= __("Community Server in Entwicklung") ?></p>
<p>Alpha 0.21.KW21.05</p>
</div>
<div class="bottomleft">
<?php if(isset($timeUsed)) : ?>
<p>
<?=round($timeUsed * 1000.0, 4)?> ms
</p>
<?php endif; ?>
</div>
<div class="nav-bottom">
<small class="">Copyright © 2020 Gradido</small>
</div>
<div class="footer nav-horizontal">
<ul>
<div class="footer">
<ul class="nav-horizontal">
<li><a href="https://gradido.net/de/datenschutz/" target="_blank"><?= __("Datenschutzerklärung") ?></a></li>
<li><a href="https://gradido.net/de/impressum/" target="_blank"><?= __("Impressum") ?></a></li>
</ul>
</div>
<div class="nav-bottom">
<small class="">Copyright © 2020 Gradido</small>
</div>
<div class="bottomleft">
<?php if(isset($timeUsed)) : ?>
<?=round($timeUsed * 1000.0, 4)?> ms
<?php endif; ?>
</div>
<div class="bottomright">
<p><?= __("Community Server in Entwicklung") ?></p>
<p>Alpha 0.21.KW21.05</p>
</div>
</div>
</body>
</html>
</html>

View File

@ -1,98 +0,0 @@
<?php
use Cake\Routing\Router;
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
$cakeDescription = 'Gradido';
$GLOBALS["self"] = $this;
//echo "balance: $balance<br>";
//echo "transactions pending: " . $transactionPendings;
?>
<!DOCTYPE html>
<html>
<head>
<?= $this->Html->charset() ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
<?= $cakeDescription ?>:
<?= $this->fetch('title') ?>
</title>
<?= $this->Html->meta('icon') ?>
<?= $this->Html->css(['main.css']) ?>
<?= $this->Html->script(['basic']) ?>
<?= $this->fetch('meta') ?>
<?= $this->fetch('css') ?>
<?= $this->fetch('script') ?>
</head>
<body>
<div class="layout">
<!-- TODO save last state so that it remains unchanged, on reload! -->
<div class="sidebar1 nav-menu initial">
<a href="/">
<picture class="logo big visible">
<source srcset="/img/logo_schrift_half.webp" type="image/webp">
<source srcset="/img/logo_schrift_half.png" type="image/png">
<img src="/img/logo_schrift_half.png" class="logo big visible" alt="Logo">
</picture>
<picture class="logo small">
<source srcset="/img/logo_half.webp" type="image/webp">
<source srcset="/img/logo_half.png" type="image/png">
<img src="/img/logo_half.png" class="logo small" alt="Logo">
</picture>
</a>
<div>
<i class="material-icons-outlined nav-main-button">menu</i>
</div>
<!-- XXX -->
<div class="flash-messages">
<?= $this->Flash->render() ?>
</div>
<?= $this->element('navi_header'); ?>
<!-- XXX -->
<div class="nav-vertical">
<?= $this->element('navi'); ?>
</div>
</div>
<div class="content">
<div class="nav-content">
<?= $this->Html->link(__('Startseite'), ['controller' => 'Dashboard']); ?>
</div>
<div class="content-container info-container">
<h1><?= $this->fetch('title') ?></h1>
</div>
<div class="content-container main-container">
<?= $this->fetch('content') ?>
</div>
</div>
<div class="footer">
<ul class="nav-horizontal">
<li><a href="https://gradido.net/de/datenschutz/" target="_blank"><?= __("Datenschutzerklärung") ?></a></li>
<li><a href="https://gradido.net/de/impressum/" target="_blank"><?= __("Impressum") ?></a></li>
</ul>
</div>
<div class="nav-bottom">
<small class="">Copyright © 2020 Gradido</small>
</div>
<div class="bottomleft">
<?php if(isset($timeUsed)) : ?>
<?=round($timeUsed * 1000.0, 4)?> ms
<?php endif; ?>
</div>
<div class="bottomright">
<p><?= __("Community Server in Entwicklung") ?></p>
<p>Alpha 0.21.KW21.05</p>
</div>
</div>
</body>
</html>

View File

@ -14,6 +14,7 @@
</nav>
<div class="stateBalances form large-9 medium-8 columns content">
<?= $this->Form->create($stateBalance) ?>
add
<fieldset>
<legend><?= __('Add State Balance') ?></legend>
<?php

View File

@ -20,6 +20,7 @@
</nav>
<div class="stateBalances form large-9 medium-8 columns content">
<?= $this->Form->create($stateBalance) ?>
edit
<fieldset>
<legend><?= __('Edit State Balance') ?></legend>
<?php

View File

@ -14,6 +14,7 @@
</nav>
<div class="stateBalances index large-9 medium-8 columns content">
<h3><?= __('State Balances') ?></h3>
index
<table cellpadding="0" cellspacing="0">
<thead>
<tr>

View File

@ -1,120 +1,104 @@
<?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.
*/
$this->assign('title', __('Kontoübersicht'));
$header = '<h1>' . __('Aktueller Kontostand: ') . '</h1>' .
'<h1>' . $this->element('printGradido', ['number' => $balance]) . '</h1>';
if($gdtSum > 0) {
$header .= '<h1>'.$this->Html->link(
$this->element('printGDT', ['number' => $gdtSum]),
['action' => 'overview_gdt'],
['escape' => false]
).'</h1>';
}
$this->assign('header', $header);
//var_dump($transactions);
?>
<div class="row">
<div class="col-md-8 equel-grid">
<div class="grid">
<div class="grid-body py-3">
<h3><?= __('Aktueller Kontostand: ') ?></h3>
<h2><?= $this->element('printGradido', ['number' => $balance]) ?></h2>
<?php if($gdtSum > 0) : ?>
<h2><?= $this->Html->link($this->element('printGDT', ['number' => $gdtSum]), ['action' => 'overview_gdt'], ['escape' => false]) ?></h2>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php if($transactionExecutingCount > 0) : ?>
<div class="row">
<div class="col-md-8 equel-grid">
<div class="grid">
<div id="transaction-execute-display" class="grid-body py-3" style="color:grey">
</div>
</div>
</div>
<div id="transaction-execute-display" class="">
</div>
<?php endif; ?>
<div class="row">
<div class="col-md-12 equel-grid">
<div class="grid">
<div class="grid-body py-3">
<p class="card-title ml-n1">Überweisungen</p>
</div>
<div class="table-responsive">
<table class="table table-hover table-sm">
<thead>
<tr class="solid-header">
<th colspan="2" class="pl-4"><?= __('Absender') . ' / ' . ('Empfänger') ?></th>
<th><?= __('Verwendungszweck') ?></th>
<th><?= __('Datum') ?></th>
<th><?= __('Betrag') ?></th>
<th title="<?= __('Transaktions Nr.') ?>"><?= __('Nr') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($transactions as $transaction):
$send = $transaction['type'] == 'send';
$balance = $transaction['balance'];
$memoShort = $transaction['memo'];
if(strlen($memoShort) > 30) {
$memoShort = substr($memoShort, 0, 30) . '...';
}
$cellColorClass = 'grd-success-color';
if($send) {
$balance = -$balance;
$cellColorClass = 'grd-alert-color';
} else if($transaction['type'] == 'creation') {
$cellColorClass = 'grd-orange-color';
}
?>
<tr>
<td class="pr-0 pl-4">
<?= $this->Html->image('50x50.png', ['class' => 'profile-img img-sm', 'alt' => 'profile image']) ?>
</td>
<td class="pl-md-0">
<?php if(isset($transaction['email']) && $transaction['email'] != ''): ?>
<a href="mailto:<?= $transaction['email'] ?>" title="<?= $transaction['email'] ?>">
<small class="text-black font-weight-medium d-block"><?= $transaction['name'] ?></small>
</a>
<?php else : ?>
<small class="text-black font-weight-medium d-block"><?= $transaction['name'] ?></small>
<?php endif; ?>
<span class=" <?= $cellColorClass ?>">
<?php if($transaction['type'] == 'creation') : ?>
<i class="mdi mdi-creation grd-orange-color"></i>&nbsp;<?= __('Geschöpft')?>
<?php elseif($transaction['type'] == 'send') : ?>
<i class="mdi mdi-arrow-right-bold"></i>&nbsp;<?= __('Gesendet') ?>
<?php elseif($transaction['type'] == 'receive') : ?>
<i class="mdi mdi-arrow-left-bold"></i>&nbsp;<?= __('Empfangen') ?>
<?php endif; ?>
</span>
</td>
<td><span data-toggle="tooltip" data-placement="bottom" title="<?= $transaction['memo'] ?>">
<?php if(strlen($transaction['memo']) > 30): ?>
<?= substr($memoShort, 0, 30) . '...' ?>
<?php else : ?>
<?= $transaction['memo'] ?>
<?php endif;?>
</span>
</td>
<td> <?= $transaction['date']->nice() ?> </td>
<td><?= $this->element('printGradido', ['number' => $balance]) ?></td>
<td>
<small><?= $transaction['transaction_id'] ?></small>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!--<a class="border-top px-3 py-2 d-block text-gray" href="#"><small class="font-weight-medium"><i class="mdi mdi-chevron-down mr-2"></i>View All Order History</small></a>-->
</div>
</div>
<div class="content-region">
<p class="">Überweisungen</p>
<table class="table table-hover table-sm">
<thead>
<tr class="solid-header">
<th colspan="2" class="pl-4"><?= __('Absender') . ' / ' . ('Empfänger') ?></th>
<th><?= __('Verwendungszweck') ?></th>
<th><?= __('Datum') ?></th>
<th><?= __('Betrag') ?></th>
<th title="<?= __('Transaktions Nr.') ?>"><?= __('Nr') ?></th>
</tr>
</thead>
<tbody>
<?php foreach($transactions as $transaction):
$send = $transaction['type'] == 'send';
$balance = $transaction['balance'];
$memoShort = $transaction['memo'];
if(strlen($memoShort) > 30) {
$memoShort = substr($memoShort, 0, 30) . '...';
}
$cellColorClass = 'grd-success-color';
if($send) {
$balance = -$balance;
$cellColorClass = 'grd-alert-color';
} else if($transaction['type'] == 'creation') {
$cellColorClass = 'grd-orange-color';
}
?>
<tr>
<td class="pr-0 pl-4">
<?= $this->Html->image('50x50.png', ['class' => 'profile-img img-sm', 'alt' => 'profile image']) ?>
</td>
<td class="pl-md-0">
<?php if(isset($transaction['email']) && $transaction['email'] != ''): ?>
<a href="mailto:<?= $transaction['email'] ?>" title="<?= $transaction['email'] ?>">
<small class="text-black font-weight-medium d-block"><?= $transaction['name'] ?></small>
</a>
<?php else : ?>
<small class="text-black font-weight-medium d-block"><?= $transaction['name'] ?></small>
<?php endif; ?>
<span class=" <?= $cellColorClass ?>">
<?php if($transaction['type'] == 'creation') : ?>
<i class="mdi mdi-creation grd-orange-color"></i>&nbsp;<?= __('Geschöpft')?>
<?php elseif($transaction['type'] == 'send') : ?>
<i class="mdi mdi-arrow-right-bold"></i>&nbsp;<?= __('Gesendet') ?>
<?php elseif($transaction['type'] == 'receive') : ?>
<i class="mdi mdi-arrow-left-bold"></i>&nbsp;<?= __('Empfangen') ?>
<?php endif; ?>
</span>
</td>
<td><span data-toggle="tooltip" data-placement="bottom" title="<?= $transaction['memo'] ?>">
<?php if(strlen($transaction['memo']) > 30): ?>
<?= substr($memoShort, 0, 30) . '...' ?>
<?php else : ?>
<?= $transaction['memo'] ?>
<?php endif;?>
</span>
</td>
<td> <?= $transaction['date']->nice() ?> </td>
<td><?= $this->element('printGradido', ['number' => $balance]) ?></td>
<td>
<small><?= $transaction['transaction_id'] ?></small>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?= $this->Html->css(['gdt.css']) ?>
<!--<a class="border-top px-3 py-2 d-block text-gray" href="#"><small class="font-weight-medium"><i class="mdi mdi-chevron-down mr-2"></i>View All Order History</small></a>-->
<!--?= $this->Html->css(['gdt.css']) ?-->
<?php if($transactionExecutingCount > 0) : ?>
<script type="text/javascript">
//function getJson(basisUrl, method, successFunction, errorFunction, timeoutFunction)
g_transactionExecutionCount = <?= $transactionExecutingCount ?>;
function updateTransactionExecutingDisplay(count) {
var display = document.getElementById('transaction-execute-display');
display.innerHTML = count + " ";
@ -125,10 +109,8 @@ $this->assign('title', __('Kontoübersicht'));
}
display.innerHTML += '&nbsp;<div class="spinner-border text-light spinner-border-sm" role="status"><span class="sr-only">Loading...</span></div>';
}
function checkTransactionExecuting() {
getJson('<?= $this->Url->build(["controller" => "JsonRequestHandler"]);?>', 'getRunningUserTasks',
// success
function(json) {
@ -152,7 +134,7 @@ $this->assign('title', __('Kontoübersicht'));
}
)
}
(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.
@ -29,6 +29,7 @@ $this->assign('title', __('GDT Kontoübersicht'));
<div class="col-md-8 equel-grid">
<div class="grid">
<div class="grid-body py-3">
overview
<h3><?= __('Zur Verfügung: ') ?></h3>
<?php if($gdtSum > 0) : ?>
<h2><?= $this->element('printGDT', ['number' => $gdtSum]) ?></h2>
@ -67,8 +68,8 @@ $this->assign('title', __('GDT Kontoübersicht'));
<?php if($entry['amount2']) echo ' + ' . $this->element('printEuro', ['number' => $entry['amount2']]) ?>
</td>
<td>
<?= $this->Number->format($entry['factor']) ?>
<?php if($entry['factor2'] != '1') : ?> x
<?= $this->Number->format($entry['factor']) ?>
<?php if($entry['factor2'] != '1') : ?> x
<?= $this->Number->format($entry['factor2']) ?>
<?php endif; ?>
</td>
@ -101,14 +102,14 @@ $this->assign('title', __('GDT Kontoübersicht'));
</tr>
</thead>
<tbody>
<?php foreach($connectEntries as $entry) :
<?php foreach($connectEntries as $entry) :
$elopageTransaction = $entry['connect']['elopage_transaction'];
$gdtEntry = $entry['connect']['gdt_entry'];
?>
<tr><td colspan="5">
<?= $elopageTransaction['email'] ?>
<?php foreach($entry['publishersPath'] as $c => $publisher) : ?>
->
->
<?= publisherLink($publisher, $this) ?>
<?php endforeach; ?>
</td>
@ -121,8 +122,8 @@ $this->assign('title', __('GDT Kontoübersicht'));
<?php if($gdtEntry['amount2']) echo ' + ' . $this->element('printEuro', ['number' => $gdtEntry['amount2']]) ?>
</td>
<td>
<?= $this->Number->format($gdtEntry['factor']) ?>
<?php if($gdtEntry['factor2'] != '1') : ?> x
<?= $this->Number->format($gdtEntry['factor']) ?>
<?php if($gdtEntry['factor2'] != '1') : ?> x
<?= $this->Number->format($gdtEntry['factor2']) ?>
<?php endif; ?>
</td>

View File

@ -17,6 +17,7 @@
</nav>
<div class="stateBalances view large-9 medium-8 columns content">
<h3><?= h($stateBalance->id) ?></h3>
view
<table class="vertical-table">
<tr>
<th scope="row"><?= __('State User') ?></th>

View File

@ -5,6 +5,7 @@
*/
?>
<nav class="large-3 medium-4 columns" id="actions-sidebar">
index.ctp
<ul class="side-nav">
<li class="heading"><?= __('Actions') ?></li>
<li><?= $this->Html->link(__('New Transaction Send Coin'), ['action' => 'add']) ?></li>

View File

@ -28,12 +28,18 @@
}
.content {
grid-area: center;
grid-row-start: line2;
grid-row-end: footer1;
}
.footer {
grid-area: footer;
grid-row-start: footer1;
grid-row-end: footer2;
}
.nav-bottom {
grid-area: bottom;
grid-row-start: footer2;
grid-row-end: end;
}
/* ============================================================
@ -48,7 +54,8 @@
/* MAIN */
/* MENU */
/* CONTENT */
/* */
/* CONTENT-ITEMS */
/* XXX TODO XXX */
/*rgba(0, 0, 0, 0.5) ??? */
/* https://www.w3schools.com/colors/colors_shades.asp */
/* ============================================================
@ -151,13 +158,6 @@
line-height: 1.125em;
padding-left: 0.25em;
}
/* =======================
Gradido
=======================*/
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
/* =======================
Sonstige
=======================*/
@ -193,32 +193,20 @@
a.grd_invisible_link:hover {
color: grey;
}
/* layout helper */
.grd_margin_5 {
margin: 5px;
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
.grd-margin-top-10 {
margin-top: 10px;
}
.grd-width-200 {
width: 200px;
}
.grd_margin-bottom {
margin-bottom: 5px;
}
.grd_right {
float: right;
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
.grd-no-style {
list-style: none;
}
.grd_small {
margin-top: 2px;
margin-bottom: 2px;
}
}
/* Ende @media screen */
/* ============================================================
@ -265,7 +253,7 @@
margin: 0.3em;
}
.nav-menu {
width: 210px;
width: 280px;
height: 100%;
}
.nav-menu-maximized {
@ -281,7 +269,7 @@
}
.nav-menu-minimized .nav-icon,
.nav-menu-minimized .nav-main-button {
padding-left: 154px;
padding-left: 224px;
}
/**
* ----------------------------------------
@ -296,8 +284,8 @@
opacity: 0;
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
}
@ -308,16 +296,16 @@
opacity: 0;
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
}
/* slide-out */
@-webkit-keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {
-webkit-transform: translateX(0);
@ -326,8 +314,8 @@
}
@keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {
-webkit-transform: translateX(0);
@ -432,7 +420,7 @@
display: block !important;
}
.logo.small.visible {
padding-left: 83px;
padding-left: 118px;
}
}
@media screen and (max-width:639px) {
@ -467,6 +455,7 @@
font-weight: 500;
font-size: 1rem;
padding-top: 6em;
padding-right: 10em;
}
/* content container */
.nav-content {
@ -488,34 +477,32 @@
.main-container {
max-width: 100%;
}
.horizontal-collection {
display: flex;
}
.content-region {
border-bottom: 1px dashed #F5F5F5;
padding: 1em;
}
.content-collection {
display: flex;
flex-direction: column;
}
.content-item {
margin: 0.5em 0;
width: 150px;
padding: 1em 2em;
}
.action-button {
background: #f9fafb;
border-left: 3px solid #047006;
}
.info-item {
border-left: 2px solid grey;
}
.info-item i,
.info-item-link,
.action-button i,
.action-button-link {
vertical-align: middle;
}
.action-button {
margin: 0 0.75em;
background: green;
width: 150px;
padding: 1em;
text-align: center;
border-radius: 16px;
color: white;
}
.info-item {
margin: 0 0.75em;
width: 150px;
padding: 1em;
text-align: center;
}
}
@media screen and (max-width:639px) {
.content {

View File

@ -28,12 +28,18 @@
}
.content {
grid-area: center;
grid-row-start: line2;
grid-row-end: footer1;
}
.footer {
grid-area: footer;
grid-row-start: footer1;
grid-row-end: footer2;
}
.nav-bottom {
grid-area: bottom;
grid-row-start: footer2;
grid-row-end: end;
}
/* ============================================================
@ -48,7 +54,8 @@
/* MAIN */
/* MENU */
/* CONTENT */
/* */
/* CONTENT-ITEMS */
/* XXX TODO XXX */
/*rgba(0, 0, 0, 0.5) ??? */
/* https://www.w3schools.com/colors/colors_shades.asp */
/* ============================================================
@ -151,13 +158,6 @@
line-height: 1.125em;
padding-left: 0.25em;
}
/* =======================
Gradido
=======================*/
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
/* =======================
Sonstige
=======================*/
@ -193,32 +193,20 @@
a.grd_invisible_link:hover {
color: grey;
}
/* layout helper */
.grd_margin_5 {
margin: 5px;
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
.grd-margin-top-10 {
margin-top: 10px;
}
.grd-width-200 {
width: 200px;
}
.grd_margin-bottom {
margin-bottom: 5px;
}
.grd_right {
float: right;
/* Gradido Transform */
.gdt-text-color {
color: #a27824;
}
.grd_clickable {
cursor: pointer;
}
.grd-no-style {
list-style: none;
}
.grd_small {
margin-top: 2px;
margin-bottom: 2px;
}
}
/* Ende @media screen */
/* ============================================================
@ -265,7 +253,7 @@
margin: 0.3em;
}
.nav-menu {
width: 210px;
width: 280px;
height: 100%;
}
.nav-menu-maximized {
@ -281,7 +269,7 @@
}
.nav-menu-minimized .nav-icon,
.nav-menu-minimized .nav-main-button {
padding-left: 154px;
padding-left: 224px;
}
/**
* ----------------------------------------
@ -296,8 +284,8 @@
opacity: 0;
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
}
@ -308,16 +296,16 @@
opacity: 0;
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
}
/* slide-out */
@-webkit-keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {
-webkit-transform: translateX(0);
@ -326,8 +314,8 @@
}
@keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {
-webkit-transform: translateX(0);
@ -432,7 +420,7 @@
display: block !important;
}
.logo.small.visible {
padding-left: 83px;
padding-left: 118px;
}
}
@media screen and (max-width:639px) {
@ -467,6 +455,7 @@
font-weight: 500;
font-size: 1rem;
padding-top: 6em;
padding-right: 10em;
}
/* content container */
.nav-content {
@ -488,34 +477,32 @@
.main-container {
max-width: 100%;
}
.horizontal-collection {
display: flex;
}
.content-region {
border-bottom: 1px dashed #F5F5F5;
padding: 1em;
}
.content-collection {
display: flex;
flex-direction: column;
}
.content-item {
margin: 0.5em 0;
width: 150px;
padding: 1em 2em;
}
.action-button {
background: #f9fafb;
border-left: 3px solid #047006;
}
.info-item {
border-left: 2px solid grey;
}
.info-item i,
.info-item-link,
.action-button i,
.action-button-link {
vertical-align: middle;
}
.action-button {
margin: 0 0.75em;
background: green;
width: 150px;
padding: 1em;
text-align: center;
border-radius: 16px;
color: white;
}
.info-item {
margin: 0 0.75em;
width: 150px;
padding: 1em;
text-align: center;
}
}
@media screen and (max-width:639px) {
.content {

View File

@ -38,12 +38,18 @@
.content {
grid-area: center;
grid-row-start: line2;
grid-row-end: footer1;
}
.footer {
grid-area: footer;
grid-row-start: footer1;
grid-row-end: footer2;
}
.nav-bottom {
grid-area: bottom;
grid-row-start: footer2;
grid-row-end: end;
}

View File

@ -26,7 +26,15 @@
@container-shadow: rgba(183,192,206,.2);
@container-border: rgba(238,238,238,.75);
/* */
/* CONTENT-ITEMS */
@action-button-border: #047006;
@action-button-background: #f9fafb;
@info-item-border: grey;
@form-header-border: #047006;
@form-header-background: #f9fafb;
/* XXX TODO XXX */
@dialog-background: #fff;
/*rgba(0, 0, 0, 0.5) ??? */
@dialog-text: #000;
@ -56,4 +64,5 @@
/* https://www.w3schools.com/colors/colors_shades.asp */
@unobtrusive: grey;
@verylight: #F5F5F5;
@light: #F5F5F5;
@verylight: #fbfbfb;

View File

@ -96,15 +96,6 @@
padding-left: 0.25em;
}
/* =======================
Gradido
=======================*/
/* Gradido Transform */
.gdt-text-color {
color: @gdt-text;
}
/* =======================
Sonstige
=======================*/
@ -149,40 +140,24 @@
color: @unobtrusive;
}
/* layout helper */
.grd_margin_5 {
margin: 5px;
/* =======================
Gradido
=======================*/
/* Gradido */
.grd-negative-currency {
color: red;
}
.grd-margin-top-10 {
margin-top: 10px;
}
.grd-width-200 {
width: 200px;
}
.grd_margin-bottom {
margin-bottom: 5px;
}
.grd_right {
float: right;
/* Gradido Transform */
.gdt-text-color {
color: @gdt-text;
}
.grd_clickable {
cursor: pointer;
}
.grd-no-style {
list-style: none;
}
.grd_small {
margin-top: 2px;
margin-bottom: 2px;
}
}
/* Ende @media screen */

View File

@ -23,7 +23,7 @@
}
.logo.small.visible {
padding-left: 83px;
padding-left: 118px;
}
}
@ -77,7 +77,7 @@
}
.nav-menu {
width: 210px;
width: 280px;
height: 100%;
}
@ -97,7 +97,7 @@
.nav-menu-minimized .nav-icon,
.nav-menu-minimized .nav-main-button {
padding-left: 154px;
padding-left: 224px;
}
/**
@ -115,8 +115,8 @@
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
@ -130,8 +130,8 @@
}
100% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
opacity: 1;
}
@ -140,8 +140,8 @@
/* slide-out */
@-webkit-keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {
@ -153,8 +153,8 @@
@keyframes slide-out {
0% {
-webkit-transform: translateX(-154px);
transform: translateX(-154px);
-webkit-transform: translateX(-224px);
transform: translateX(-224px);
}
100% {

View File

@ -22,6 +22,7 @@
font-weight: 500;
font-size: 1rem;
padding-top: 6em;
padding-right: 10em;
}
@media @maxMobile {
@ -55,13 +56,33 @@
max-width: 100%;
}
.horizontal-collection {
display: flex;
.content-region {
border-bottom: 1px dashed @light;
padding: 1em;
}
.content-region {
border-bottom: 1px dashed @verylight;
padding: 1em;
.content-collection {
display: flex;
flex-direction: column;
}
.content-item {
margin: .5em 0;
width: 150px;
padding: 1em 2em;
}
.action-button {
background: @action-button-background;
border-left: 3px solid @action-button-border;
}
.info-item {
border-left: 2px solid @info-item-border;
}
.action-form {
}
.info-item i,
@ -71,23 +92,6 @@
vertical-align: middle;
}
.action-button {
margin: 0 .75em;
background: green;
width: 150px;
padding: 1em;
text-align: center;
border-radius: 16px;
color: white;
}
.info-item {
margin: 0 .75em;
width: 150px;
padding: 1em;
text-align: center;
}
}
/* Ende @media screen */