mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
WIP Profil / Suche
This commit is contained in:
parent
ceffc923f2
commit
91592f9437
44
src/Controller/ProfileController.php
Normal file
44
src/Controller/ProfileController.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Controller\AppController;
|
||||
use Model\Navigation\NaviHierarchy;
|
||||
use Model\Navigation\NaviHierarchyEntry;
|
||||
|
||||
/**
|
||||
* Profile Controller
|
||||
*/
|
||||
class ProfileController extends AppController
|
||||
{
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
$this->Auth->allow(['index']);
|
||||
$this->set(
|
||||
'naviHierarchy',
|
||||
(new NaviHierarchy())->
|
||||
add(new NaviHierarchyEntry(__('Startseite'), 'Dashboard', 'index', false))->
|
||||
add(new NaviHierarchyEntry(__('Mein Profil'), 'Profile', 'index', true))
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Index method
|
||||
*
|
||||
* @return \Cake\Http\Response|null
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$startTime = microtime(true);
|
||||
$this->viewBuilder()->setLayout('frontend');
|
||||
$session = $this->getRequest()->getSession();
|
||||
$result = $this->requestLogin();
|
||||
if ($result !== true) {
|
||||
return $result;
|
||||
}
|
||||
$user = $session->read('StateUser');
|
||||
|
||||
$this->set('user', $user);
|
||||
$this->set('timeUsed', microtime(true) - $startTime);
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,9 @@
|
||||
<?php
|
||||
use Model\Navigation\NaviEntry;
|
||||
use Model\Navigation\NaviEntrySub;
|
||||
use Model\Navigation\NaviEntryAbsoluteLink;
|
||||
use Model\Navigation\NaviEntryExternLink;
|
||||
|
||||
$session = $this->getRequest()->getSession();
|
||||
$transactionPendings = $session->read('Transactions.pending');
|
||||
$errorCount = intval($session->read('StateUser.errorCount'));
|
||||
$balance = $session->read('StateUser.balance');
|
||||
//echo "balance: $balance<br>";
|
||||
@ -36,15 +34,5 @@ array_push($navi, new NaviEntry(__('Startseite'), 'home', 'Dashboard', 'index'))
|
||||
array_push($navi, new NaviEntry(__('Überweisung'), 'account_balance', 'TransactionSendCoins', 'create'));
|
||||
array_push($navi, new NaviEntryExternLink(__('Mitgliederbereich'), 'people_alt', 'https://elopage.com/s/gradido/sign_in'));
|
||||
|
||||
if(intval($transactionPendings) > 0) {
|
||||
/* array_push($navi, new NaviEntryAbsoluteLink(
|
||||
__("Transaktionen unterzeichnen") . ' (' . intval($transactionPendings) . ')',
|
||||
'mdi-signature-freehand', 'account/checkTransactions'
|
||||
));*/
|
||||
} else {
|
||||
array_push($navi, new NaviEntryAbsoluteLink(__('Abmelden'), 'exit_to_app', 'account/logout'));
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?php foreach($navi as $n) echo $n; ?>
|
||||
|
||||
@ -5,19 +5,39 @@
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
use Model\Navigation\NaviEntry;
|
||||
use Model\Navigation\NaviEntryAbsoluteLink;
|
||||
|
||||
$session = $this->getRequest()->getSession();
|
||||
$user = $session->read('StateUser');
|
||||
$transactionPendings = $session->read('Transactions.pending');
|
||||
$this->set('user', $user);
|
||||
$navi = [];
|
||||
array_push($navi, new NaviEntry(__('Startseite'), 'home', 'Dashboard', 'index'));
|
||||
array_push($navi, new NaviEntry(__('Startseite'), 'home', 'Dashboard', 'index'));
|
||||
array_push($navi, new NaviEntry(__('Mein Profil'), 'build', 'Profile', 'index'));
|
||||
if(intval($transactionPendings) > 0) {
|
||||
/* array_push($navi, new NaviEntryAbsoluteLink(
|
||||
__("Transaktionen unterzeichnen") . ' (' . intval($transactionPendings) . ')',
|
||||
'mdi-signature-freehand', 'account/checkTransactions'
|
||||
));*/
|
||||
} else {
|
||||
array_push($navi, new NaviEntryAbsoluteLink(__('Abmelden'), 'exit_to_app', 'account/logout'));
|
||||
}
|
||||
?>
|
||||
<span class="user-name">
|
||||
<?=$user['first_name'].' '.$user['last_name']?>
|
||||
</span>
|
||||
<i class="material-icons-outlined user-icon">account_circle</i>
|
||||
<div id="user-menu-id" class="nav-vertical user-menu">
|
||||
<i class="material-icons-outlined user-icon" onclick="toggleUserMenu()">account_circle</i>
|
||||
<div class="nav-vertical user-menu">
|
||||
<ul>
|
||||
<?php foreach($navi as $n) echo $n; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function toggleUserMenu() {
|
||||
let a = document.getElementsByClassName("user-menu");
|
||||
if(a.length > 0) {
|
||||
let menu = a[0];
|
||||
console.log('click icon');
|
||||
menu.classList.toggle("visible");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
72
src/Template/Profile/index.ctp
Normal file
72
src/Template/Profile/index.ctp
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
use Cake\Routing\Router;
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
if(isset($user)) {
|
||||
//var_dump($user);
|
||||
}
|
||||
$this->assign('title', __('Mein Profil'));
|
||||
$this->assign(
|
||||
'header',
|
||||
'<h1>'.__('Profil') . ' von: ' . $user['first_name'] . ' ' . $user['last_name'] . '</h1>'
|
||||
);
|
||||
?>
|
||||
<?php if(isset($requestTime)) : ?>
|
||||
<span><?= round($requestTime * 1000.0) ?> ms</span>
|
||||
<?php endif; ?>
|
||||
<div class="content-region">
|
||||
<h3>
|
||||
<i class="material-icons-outlined user-info">assignment_ind</i>
|
||||
Meine Daten
|
||||
</h3>
|
||||
<div class="content-collection">
|
||||
<ul class="fact-list">
|
||||
<li class="fact">
|
||||
<span class="fact label">E-Mail Adresse:</span>
|
||||
<span class="fact"><?=$user['email']?></span>
|
||||
</li>
|
||||
<li class="fact">
|
||||
<span class="fact label">Vorname:</span>
|
||||
<span class="fact"><?=$user['first_name']?></span>
|
||||
</li>
|
||||
<li class="fact">
|
||||
<span class="fact label">Nachname:</span>
|
||||
<span class="fact"><?=$user['last_name']?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>
|
||||
<i class="material-icons-outlined user-info success">check_circle</i>
|
||||
Zustand meines Kontos
|
||||
</h3>
|
||||
<div class="content-collection">
|
||||
<ul class="fact-list">
|
||||
<li class="fact">
|
||||
<span class="fact label">Konto auf dem Login Server:</span>
|
||||
<span class="fact">???</span>
|
||||
</li>
|
||||
<li class="fact">
|
||||
<span class="fact label">??? :</span>
|
||||
<span class="fact"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3>
|
||||
<i class="material-icons-outlined user-info">vpn_key</i>
|
||||
Passwort ändern
|
||||
</h3>
|
||||
<div class="content-collection">
|
||||
<ul class="fact-list">
|
||||
<li class="fact">
|
||||
<span class="fact label">Passwort ändern:</span>
|
||||
<span class="fact">
|
||||
<a href="/account/updateUserPassword" target="_blank">zum Ändern anklicken! (öffnet in neuem Tab)</a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -387,6 +387,7 @@ and open the template in the editor.
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
background-color: #fff;
|
||||
border: 1px solid #f2f4f5;
|
||||
padding: 0.75em;
|
||||
border-radius: 0 0 0 18px;
|
||||
z-index: 2;
|
||||
@ -401,20 +402,30 @@ and open the template in the editor.
|
||||
}
|
||||
.user-icon {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
.nav-vertical.user-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 33px;
|
||||
display: none;
|
||||
top: 25px;
|
||||
right: 0;
|
||||
background-color: #fff;
|
||||
margin-top: 1em;
|
||||
z-index: -1;
|
||||
font-size: 0.9em;
|
||||
border-left: 1px solid #f2f4f5;
|
||||
border-bottom: 1px solid #f2f4f5;
|
||||
border-radius: 0 0 16px 16px;
|
||||
z-index: -1;
|
||||
margin-top: 1em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.nav-vertical.user-menu.visible {
|
||||
display: inherit;
|
||||
}
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 2em;
|
||||
padding: 2em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 1em;
|
||||
margin-block-end: 0;
|
||||
margin-block-start: 0;
|
||||
}
|
||||
.nav-vertical.user-menu li {
|
||||
padding: 0.0125em;
|
||||
@ -423,6 +434,12 @@ and open the template in the editor.
|
||||
padding: 0;
|
||||
padding-right: 2em;
|
||||
}
|
||||
.material-icons-outlined.user-info {
|
||||
color: grey;
|
||||
}
|
||||
.material-icons-outlined.user-info.success {
|
||||
color: #047006;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.header-user {
|
||||
@ -439,13 +456,12 @@ and open the template in the editor.
|
||||
margin-top: 55px;
|
||||
}
|
||||
.nav-vertical.user-menu {
|
||||
top: 0;
|
||||
right: 3px;
|
||||
top: 1px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 1em;
|
||||
padding-top: 2em;
|
||||
padding-top: 3em;
|
||||
}
|
||||
}
|
||||
/* ============================================================
|
||||
@ -1099,6 +1115,9 @@ and open the template in the editor.
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.content-region {
|
||||
padding-left: 5px;
|
||||
}
|
||||
.content-collection {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -1111,6 +1130,59 @@ and open the template in the editor.
|
||||
}
|
||||
}
|
||||
/* Ende @media screen */
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
/* ============================================================
|
||||
|
||||
Screen styles for plain facts.
|
||||
|
||||
Datei : facts.css
|
||||
Datum : 08.07.2020
|
||||
Autor : Christine Slotty
|
||||
Copyright : Gradio
|
||||
|
||||
============================================================*/
|
||||
@media screen {
|
||||
.fact-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style-type: none;
|
||||
width: 100%;
|
||||
padding-inline-start: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
.fact {
|
||||
display: inline-block;
|
||||
padding-left: 1em;
|
||||
}
|
||||
.label {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.fact-list {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
}
|
||||
li.fact {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.fact {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.label {
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
/* ============================================================
|
||||
|
||||
Screen styles for lists.
|
||||
|
||||
@ -387,6 +387,7 @@ and open the template in the editor.
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
background-color: #fff;
|
||||
border: 1px solid #f2f4f5;
|
||||
padding: 0.75em;
|
||||
border-radius: 0 0 0 18px;
|
||||
z-index: 2;
|
||||
@ -401,20 +402,30 @@ and open the template in the editor.
|
||||
}
|
||||
.user-icon {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
.nav-vertical.user-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 33px;
|
||||
display: none;
|
||||
top: 25px;
|
||||
right: 0;
|
||||
background-color: #fff;
|
||||
margin-top: 1em;
|
||||
z-index: -1;
|
||||
font-size: 0.9em;
|
||||
border-left: 1px solid #f2f4f5;
|
||||
border-bottom: 1px solid #f2f4f5;
|
||||
border-radius: 0 0 16px 16px;
|
||||
z-index: -1;
|
||||
margin-top: 1em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.nav-vertical.user-menu.visible {
|
||||
display: inherit;
|
||||
}
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 2em;
|
||||
padding: 2em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 1em;
|
||||
margin-block-end: 0;
|
||||
margin-block-start: 0;
|
||||
}
|
||||
.nav-vertical.user-menu li {
|
||||
padding: 0.0125em;
|
||||
@ -423,6 +434,12 @@ and open the template in the editor.
|
||||
padding: 0;
|
||||
padding-right: 2em;
|
||||
}
|
||||
.material-icons-outlined.user-info {
|
||||
color: grey;
|
||||
}
|
||||
.material-icons-outlined.user-info.success {
|
||||
color: #047006;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.header-user {
|
||||
@ -439,13 +456,12 @@ and open the template in the editor.
|
||||
margin-top: 55px;
|
||||
}
|
||||
.nav-vertical.user-menu {
|
||||
top: 0;
|
||||
right: 3px;
|
||||
top: 1px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 1em;
|
||||
padding-top: 2em;
|
||||
padding-top: 3em;
|
||||
}
|
||||
}
|
||||
/* ============================================================
|
||||
@ -1099,6 +1115,9 @@ and open the template in the editor.
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.content-region {
|
||||
padding-left: 5px;
|
||||
}
|
||||
.content-collection {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -1111,6 +1130,59 @@ and open the template in the editor.
|
||||
}
|
||||
}
|
||||
/* Ende @media screen */
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
/* ============================================================
|
||||
|
||||
Screen styles for plain facts.
|
||||
|
||||
Datei : facts.css
|
||||
Datum : 08.07.2020
|
||||
Autor : Christine Slotty
|
||||
Copyright : Gradio
|
||||
|
||||
============================================================*/
|
||||
@media screen {
|
||||
.fact-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style-type: none;
|
||||
width: 100%;
|
||||
padding-inline-start: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
.fact {
|
||||
display: inline-block;
|
||||
padding-left: 1em;
|
||||
}
|
||||
.label {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width:767px) {
|
||||
.fact-list {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
}
|
||||
li.fact {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.fact {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.label {
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
/* ============================================================
|
||||
|
||||
Screen styles for lists.
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
background-color: @container-background;
|
||||
border: 1px solid @menu-border-color;
|
||||
padding: .75em;
|
||||
border-radius: 0 0 0 18px;
|
||||
z-index: 2;
|
||||
@ -31,22 +32,33 @@
|
||||
|
||||
.user-icon {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 33px;
|
||||
display: none;
|
||||
top: 25px;
|
||||
right: 0;
|
||||
background-color: @container-background;
|
||||
margin-top: 1em;
|
||||
z-index: -1;
|
||||
font-size: .9em;
|
||||
border-left: 1px solid @menu-border-color;
|
||||
border-bottom: 1px solid @menu-border-color;
|
||||
border-radius: 0 0 16px 16px;
|
||||
z-index: -1;
|
||||
margin-top: 1em;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu.visible {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 2em;
|
||||
padding: 2em;
|
||||
padding-top: .5em;
|
||||
padding-bottom: 1em;
|
||||
margin-block-end: 0;
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu li {
|
||||
@ -58,6 +70,13 @@
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
.material-icons-outlined.user-info {
|
||||
color: @unobtrusive;
|
||||
}
|
||||
.material-icons-outlined.user-info.success {
|
||||
color: @success;
|
||||
}
|
||||
|
||||
@media @tablet-down {
|
||||
.header-user {
|
||||
align-items: flex-start;
|
||||
@ -76,14 +95,13 @@
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu {
|
||||
top: 0;
|
||||
right: 3px;
|
||||
top: 1px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.nav-vertical.user-menu > ul {
|
||||
padding: 1em 1em;
|
||||
padding-top: 2em;
|
||||
padding-top: 3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -173,6 +173,10 @@
|
||||
}
|
||||
|
||||
@media @tablet-down {
|
||||
.content-region {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.content-collection {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
62
websrc/src/less/15-facts.less
Normal file
62
websrc/src/less/15-facts.less
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
/* ============================================================
|
||||
|
||||
Screen styles for plain facts.
|
||||
|
||||
Datei : facts.css
|
||||
Datum : 08.07.2020
|
||||
Autor : Christine Slotty
|
||||
Copyright : Gradio
|
||||
|
||||
============================================================*/
|
||||
@media screen {
|
||||
.fact-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
list-style-type: none;
|
||||
width: 100%;
|
||||
padding-inline-start: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.fact {
|
||||
display: inline-block;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 150px;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media @tablet-down {
|
||||
.fact-list {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
li.fact {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.fact {
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
font-size: .9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user