Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
52152268
Commit
52152268
authored
Nov 16, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Убрал смену языка, лоика редиректа вкабинет иформу авторизации, перенес плашку профиля
parent
cc66f538
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
259 additions
and
55 deletions
+259
-55
common-styles.css
src/public/css/common-styles.css
+3
-1
styles-feeds-stat.css
src/public/css/styles-feeds-stat.css
+1
-1
styles-set-prof.css
src/public/css/styles-set-prof.css
+224
-0
common.js
src/public/js/common.js
+4
-0
Profile.php
src/src/App/Action/User/Profile.php
+0
-29
Authorization.php
src/src/App/Middleware/Authorization.php
+2
-1
Transactions.php
src/src/App/Model/Feeds/Transactions.php
+4
-0
Locales.php
src/src/App/Model/Locales.php
+1
-1
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+2
-0
profile.phtml
src/templates/app/user/profile.phtml
+1
-0
layout-main.phtml
src/templates/layout/layout-main.phtml
+17
-22
No files found.
src/public/css/common-styles.css
View file @
52152268
...
@@ -882,7 +882,9 @@ footer {
...
@@ -882,7 +882,9 @@ footer {
.header-user
a
.annotation
{
.header-user
a
.annotation
{
color
:
#0071BC
;
color
:
#0071BC
;
}
}
.header-logout
a
.annotation
{
color
:
#0071BC
;
}
.header-user
ul
{
.header-user
ul
{
padding
:
5px
10px
5px
10px
;
padding
:
5px
10px
5px
10px
;
left
:
50px
;
left
:
50px
;
...
...
src/public/css/styles-feeds-stat.css
View file @
52152268
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.b-content__work
.b-content__work
{
{
padding-top
:
4
0px
;
padding-top
:
10
0px
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
}
}
...
...
src/public/css/styles-set-prof.css
0 → 100644
View file @
52152268
/* Таблица стилей к странице редактирования профиля */
main
{
transition
:
opacity
0.2s
ease
;
}
main
.show
{
pointer-events
:
none
;
opacity
:
0.7
;
}
.connection.b-popup__window
{
width
:
460px
;
}
.connection.b-popup__window
.form-wrapp
{
padding
:
150px
2rem
2rem
2rem
;
background-image
:
url('../img/icon-popup-connection.svg')
;
background-position
:
center
40px
;
background-repeat
:
no-repeat
;
background-size
:
auto
75px
;
}
.connection.b-popup__window
.form-wrapp
h1
{
margin-bottom
:
20px
;
text-align
:
center
;
}
.connection.b-popup__window
.form-wrapp
h1
+
p
.text
{
text-align
:
center
;
}
.l-content
{
padding-top
:
0
;
}
.b-content__title
{
padding-top
:
85px
;
height
:
33ex
;
background-color
:
#EAEFF1
;
}
.b-content__title
picture
{
display
:
block
;
margin
:
0
auto
;
width
:
90px
;
margin-bottom
:
5px
;
}
.b-content__title
picture
source
{
}
.b-content__title
picture
img
{
height
:
90px
;
width
:
90px
;
object-fit
:
cover
;
border-radius
:
50%
;
}
.b-content__title
p
.lead
{
margin-bottom
:
10px
;
text-align
:
center
;
}
.b-content__title-settings
{
text-align
:
center
;
}
.b-content__title-settings
.annotation
{
color
:
#0071BC
;
}
.b-content__title-settings
.annotation
:first-child
{
margin-right
:
30px
;
}
.b-content__form
{
}
.b-content__form
.wrapp
{
padding
:
40px
0
50px
;
}
.b-content__form-set
{
margin-left
:
25%
;
margin-right
:
25%
;
}
.b-content__form-set
.input__field
{
font-weight
:
normal
;
opacity
:
0.7
;
transition
:
opacity
0.2s
ease
;
}
.input-site
{
margin
:
1rem
0
1rem
;
}
.b-content__form-set
.input__field
:focus
{
opacity
:
1
;
}
.b-content__form-set-item-label
{
width
:
32%
;
font-size
:
0
;
}
.b-content__form-set-item-label
p
.text
{
display
:
inline-block
;
margin-top
:
1.5rem
;
line-height
:
normal
;
}
.b-content__form-set-item-label
p
.text
,
.wrapp-button.submit
{
width
:
32%
;
}
.b-content__form-set
span
.input
{
font-size
:
0
;
width
:
66.666666%
;
}
.b-content__form-set
.droplist-current
:after
{
width
:
10px
;
background-image
:
url('../img/icon-droplist-pointter-dark.svg')
;
}
.wrapp-button
{
display
:
inline-block
;
}
.show.wrapp-button
[
data-action
]
:after
{
position
:
fixed
;
top
:
100px
;
left
:
0
;
width
:
100%
;
display
:
block
;
height
:
auto
;
content
:
attr
(
data-action
);
background-color
:
#39B54A
;
padding
:
15px
0
;
font-family
:
'RalewayBold'
,
sans-serif
;
color
:
#FFFFFF
;
font-size
:
0.8rem
;
line-height
:
1.625em
;
text-align
:
center
;
box-shadow
:
1px
1px
15px
-2px
rgba
(
0
,
0
,
0
,
0.5
);
z-index
:
10000
;
}
.wrapp-button.submit
{
margin-left
:
32%
;
}
.wrapp-button.submit
,
.wrapp-button.reset
{
width
:
32%
;
}
.wrapp-button.reset
{
text-align
:
right
;
}
.b-content__form-set
input
[
type
=
'submit'
]
{
width
:
80%
;
}
.b-content__form-set
input
[
type
=
'reset'
]
{
border
:
none
;
outline
:
none
;
background
:
transparent
;
color
:
#B3B3B3
;
cursor
:
pointer
;
transition
:
color
0.2s
ease
;
}
.b-content__form-set
input
[
type
=
'reset'
]
:hover
{
color
:
#7F6363
;
}
.b-content__form-set
.wrapp-button.delete
{
margin-left
:
32%
;
display
:
block
;
margin-top
:
80px
;
line-height
:
46px
;
}
.b-content__form-set
.wrapp-button.delete
button
{
display
:
block
;
margin
:
0
auto
;
border
:
none
;
outline
:
none
;
background-color
:
transparent
;
color
:
#FF3B3B
;
cursor
:
pointer
;
}
.b-content__form-set
.wrapp-button.delete
button
:hover
{
color
:
#A51515
;
}
@media
(
max-width
:
1025px
)
{
section
.wrapp
{
padding-left
:
10px
;
padding-right
:
10px
;
}
}
@media
(
max-width
:
768px
)
{
.b-content__title
{
padding-top
:
120px
;
}
.b-content__form-set
{
margin-left
:
10%
;
margin-right
:
10%
;
}
.b-content__form-set
.wrapp-button.delete
{
margin-top
:
60px
;
}
.b-content__form-set
.wrapp-button.delete
button
{
margin
:
0
;
}
}
@media
(
max-width
:
550px
)
{
.b-content__title
{
padding-top
:
80px
;
}
.b-content__form
.wrapp
{
padding
:
10px
10px
30px
;
}
.b-content__form-set
{
margin-right
:
0
;
margin-left
:
0
;
}
.b-content__form-set-item-label
p
.text
{
display
:
block
;
width
:
100%
;
line-height
:
normal
;
margin-top
:
20px
;
}
.b-content__form-set
span
.input
{
margin-top
:
10px
;
width
:
100%
;
}
.wrapp-button.submit
{
margin-left
:
0
;
width
:
49%
;
}
.b-content__form-set
.wrapp-button.delete
{
margin-left
:
0
;
margin-top
:
50px
;
}
.b-content__form-set
.wrapp-button.delete
button
{
margin
:
0
auto
;
}
}
\ No newline at end of file
src/public/js/common.js
View file @
52152268
...
@@ -423,6 +423,9 @@ $(document).ready(function(){
...
@@ -423,6 +423,9 @@ $(document).ready(function(){
var
lang
=
$
(
'.header-lang'
).
attr
(
'lang'
);
var
lang
=
$
(
'.header-lang'
).
attr
(
'lang'
);
var
newLocation
=
'/cabinet/'
;
var
newLocation
=
'/cabinet/'
;
newLocation
=
'/'
+
'ru'
+
newLocation
;
/*
if (location.pathname == '/') {
if (location.pathname == '/') {
if(data.type == 'support') {
if(data.type == 'support') {
...
@@ -436,6 +439,7 @@ $(document).ready(function(){
...
@@ -436,6 +439,7 @@ $(document).ready(function(){
} else {
} else {
newLocation = location.pathname;
newLocation = location.pathname;
}
}
*/
document
.
cookie
=
data
.
token
;
document
.
cookie
=
data
.
token
;
location
.
href
=
newLocation
;
location
.
href
=
newLocation
;
...
...
src/src/App/Action/User/Profile.php
View file @
52152268
...
@@ -30,7 +30,6 @@ use App\Action\Common;
...
@@ -30,7 +30,6 @@ use App\Action\Common;
use
App\Authentication\UserService
;
use
App\Authentication\UserService
;
use
App\Entity\User
;
use
App\Entity\User
;
use
App\Model\Users
;
use
App\Model\Users
;
use
App\Model\Sites
;
use
Psr\Http\Message\ResponseInterface
;
use
Psr\Http\Message\ResponseInterface
;
use
Psr\Http\Message\ServerRequestInterface
;
use
Psr\Http\Message\ServerRequestInterface
;
use
Zend\Diactoros\Response\HtmlResponse
;
use
Zend\Diactoros\Response\HtmlResponse
;
...
@@ -55,8 +54,6 @@ class Profile extends Common
...
@@ -55,8 +54,6 @@ class Profile extends Common
/** @var Users $usersModel */
/** @var Users $usersModel */
$usersModel
=
$this
->
container
->
get
(
Users
::
class
);
$usersModel
=
$this
->
container
->
get
(
Users
::
class
);
$sitesModel
=
$this
->
container
->
get
(
Sites
::
class
);
/** @var UserService $auth */
/** @var UserService $auth */
$auth
=
$this
->
container
->
get
(
UserService
::
class
);
$auth
=
$this
->
container
->
get
(
UserService
::
class
);
...
@@ -73,30 +70,6 @@ class Profile extends Common
...
@@ -73,30 +70,6 @@ class Profile extends Common
if
(
isset
(
$data
[
'currency'
]))
{
if
(
isset
(
$data
[
'currency'
]))
{
$result
=
false
;
$result
=
false
;
/*
if (isset($data['currency']) && !$data['currency']) {
unset($data['currency']);
} else {
$userFromDb->setCurrencyCode($data['currency']);
}
*/
/** @var User $newUserData */
/*
$validator = new \App\Validator\User($hydrator);
if ($validator->isValid($userFromDb)) {
$result = $usersModel->save($userFromDb);
if ($result) {
$msg['text'] = 'success';
} else {
$msg['text'] = 'db error';
}
} else {
$result = false;
$msg['text'] = $validator->getMessages();
}
*/
}
}
else
else
{
{
...
@@ -137,7 +110,6 @@ class Profile extends Common
...
@@ -137,7 +110,6 @@ class Profile extends Common
$userId
=
$auth
->
getIdentity
()
->
getId
();
$userId
=
$auth
->
getIdentity
()
->
getId
();
$user
=
$usersModel
->
findById
(
$userId
);
$user
=
$usersModel
->
findById
(
$userId
);
$sites
=
$sitesModel
->
findByUserId
(
$userId
);
$currencyModel
=
$this
->
container
->
get
(
\App\Model\Currencies
::
class
);
$currencyModel
=
$this
->
container
->
get
(
\App\Model\Currencies
::
class
);
$currencies
=
array
();
$currencies
=
array
();
...
@@ -148,7 +120,6 @@ class Profile extends Common
...
@@ -148,7 +120,6 @@ class Profile extends Common
$response
=
new
HtmlResponse
(
$this
->
template
->
render
(
'app::user/profile'
,
[
$response
=
new
HtmlResponse
(
$this
->
template
->
render
(
'app::user/profile'
,
[
'user'
=>
$user
,
'user'
=>
$user
,
'sites'
=>
$sites
,
'lang'
=>
$request
->
getAttribute
(
'layoutInfo'
)
->
getLang
(),
'lang'
=>
$request
->
getAttribute
(
'layoutInfo'
)
->
getLang
(),
'currencies'
=>
$currencies
,
'currencies'
=>
$currencies
,
'currency'
=>
[
'code'
=>
$currentCurencyCode
,
'name'
=>
$currencies
[
$currentCurencyCode
]]
'currency'
=>
[
'code'
=>
$currentCurencyCode
,
'name'
=>
$currencies
[
$currentCurencyCode
]]
...
...
src/src/App/Middleware/Authorization.php
View file @
52152268
...
@@ -202,7 +202,8 @@ class Authorization
...
@@ -202,7 +202,8 @@ class Authorization
$this
->
layout
->
setTemplate
(
'layout/default'
);
$this
->
layout
->
setTemplate
(
'layout/default'
);
}
}
$body
=
$this
->
renderer
->
render
(
'error::unauthorized'
,
[
'lang'
=>
$request
->
getAttribute
(
'layoutInfo'
)
->
getLang
()]);
//$body = $this->renderer->render('error::unauthorized', ['lang' => $request->getAttribute('layoutInfo')->getLang()]);
$body
=
$this
->
renderer
->
render
(
'app::index'
,
[
'lang'
=>
$request
->
getAttribute
(
'layoutInfo'
)
->
getLang
()]);
$response
=
new
HtmlResponse
(
$body
);
$response
=
new
HtmlResponse
(
$body
);
}
}
...
...
src/src/App/Model/Feeds/Transactions.php
View file @
52152268
...
@@ -74,6 +74,10 @@ class Transactions extends Common
...
@@ -74,6 +74,10 @@ class Transactions extends Common
.
' ORDER BY EventDate desc'
;
.
' ORDER BY EventDate desc'
;
$res
=
$adapter
->
query
(
$sql
,
\Zend\Db\Adapter\Adapter
::
QUERY_MODE_EXECUTE
);
$res
=
$adapter
->
query
(
$sql
,
\Zend\Db\Adapter\Adapter
::
QUERY_MODE_EXECUTE
);
if
(
count
(
$res
)
==
0
)
{
return
null
;
}
$stats
=
array
(
$stats
=
array
(
'period'
=>
[],
'period'
=>
[],
'localmoney'
=>
[],
'localmoney'
=>
[],
...
...
src/src/App/Model/Locales.php
View file @
52152268
...
@@ -44,7 +44,7 @@ class Locales
...
@@ -44,7 +44,7 @@ class Locales
const
LOCALE_UA
=
'uk_UA'
;
const
LOCALE_UA
=
'uk_UA'
;
const
LOCALE_FR
=
'fr_FR'
;
const
LOCALE_FR
=
'fr_FR'
;
const
DEFAULT_LANG
=
self
::
LANG_
EN
;
const
DEFAULT_LANG
=
self
::
LANG_
RU
;
const
DEFAULT_LANG_ADMIN
=
self
::
LANG_RU
;
const
DEFAULT_LANG_ADMIN
=
self
::
LANG_RU
;
protected
$available
=
[
protected
$available
=
[
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
52152268
...
@@ -84,6 +84,7 @@ $system_link = $this->url('adm.system.actions');
...
@@ -84,6 +84,7 @@ $system_link = $this->url('adm.system.actions');
?>
?>
<?php
/* ?>
<section class="b-content__title">
<section class="b-content__title">
<div class="wrapp">
<div class="wrapp">
<!-- Вход произведен -->
<!-- Вход произведен -->
...
@@ -97,6 +98,7 @@ $system_link = $this->url('adm.system.actions');
...
@@ -97,6 +98,7 @@ $system_link = $this->url('adm.system.actions');
</p>
</p>
</div>
</div>
</section>
</section>
<?php */
?>
<?php
if
(
$error
)
:
?>
<?php
if
(
$error
)
:
?>
...
...
src/templates/app/user/profile.phtml
View file @
52152268
...
@@ -29,6 +29,7 @@ $this->headScript()
...
@@ -29,6 +29,7 @@ $this->headScript()
;
;
$this
->
headLink
()
$this
->
headLink
()
->
appendStylesheet
(
'/css/styles-feeds-stat.css'
)
->
appendStylesheet
(
'/css/styles-set-prof.css'
)
->
appendStylesheet
(
'/css/styles-set-prof.css'
)
;
;
...
...
src/templates/layout/layout-main.phtml
View file @
52152268
...
@@ -57,13 +57,8 @@ $lang = $layoutInfo ? $layoutInfo->getLang() : 'en';
...
@@ -57,13 +57,8 @@ $lang = $layoutInfo ? $layoutInfo->getLang() : 'en';
</head>
</head>
<body>
<body>
<?php
<?php
$urlHome
=
$this
->
url
(
//$urlHome = $this->url(in_array($identityRole, [\App\Acl\Roles::ROLE_ADMIN,\App\Acl\Roles::ROLE_MANAGER]) ?'adm.index' :'home',['lang' => $lang]);
in_array
(
$identityRole
,
[
//$urlHome = $this->url('user.cabinet',['lang' => $lang]);
\App\Acl\Roles
::
ROLE_ADMIN
,
\App\Acl\Roles
::
ROLE_MANAGER
])
?
'adm.index'
:
'home'
,
[
'lang'
=>
$lang
]);
?>
?>
...
@@ -96,35 +91,35 @@ $urlHome = $this->url(
...
@@ -96,35 +91,35 @@ $urlHome = $this->url(
<picture>
<picture>
<img
src=
"/img/bg-img-logo.svg"
alt=
"No logo"
>
<img
src=
"/img/bg-img-logo.svg"
alt=
"No logo"
>
</picture>
</picture>
<?php
<?php
/*
//$urlCabinet = $this->url(in_array($identityRole, [\App\Acl\Roles::ROLE_ADMIN,\App\Acl\Roles::ROLE_MANAGER]) ? 'adm.index' : 'user.cabinet', ['lang' => $lang]);
$urlCabinet = $this->url(
//$urlCabinet = $this->url('user.cabinet',['lang' => $lang]);
in_array($identityRole, [
$urlCabinet
=
$this
->
url
(
'user.cabinet.profile'
,[
'lang'
=>
$lang
]);
\App\Acl\Roles::ROLE_ADMIN,
\App\Acl\Roles::ROLE_MANAGER]) ?
'adm.index' :
'user.cabinet',
['lang' => $lang]);
*/
$urlCabinet
=
$this
->
url
(
'user.cabinet'
,[
'lang'
=>
$lang
]);
?>
?>
<a
href=
"
<?=
$urlCabinet
?>
"
class=
"annotation"
title=
"
<?=
_t
(
"Мой кабинет"
)
?>
"
>
<?=
$identity
->
getEmail
()
?>
</a>
<a
href=
"
<?=
$urlCabinet
?>
"
class=
"annotation"
title=
"
<?=
_t
(
"Мой кабинет"
)
?>
"
>
<?=
$identity
->
getEmail
()
?>
</a>
</div>
</div>
<?php
else
:
/* ?>
<div
class=
"header-logout col sm-2 order-xs-1"
>
<a
href=
"
<?=
$this
->
url
(
'logout'
,
[
'lang'
=>
$lang
])
?>
"
title=
"
<?=
_t
(
"Выход"
)
?>
"
class=
"annotation"
>
<?=
_t
(
"Выход"
)
?>
</a>
</div>
<?php
else
:
?>
<!-- Вход не был произведен -->
<!-- Вход не был произведен -->
<?php
/* ?>
<p class="header-register col sm-3 order-xs-4 xs-2">
<p class="header-register col sm-3 order-xs-4 xs-2">
<a href="#" title="<?= _t("Вход") ?>" class="text bold login-button button-open"><?= _t("Вход") ?></a>
<a href="#" title="<?= _t("Вход") ?>" class="text bold login-button button-open"><?= _t("Вход") ?></a>
</p>
</p>
<?php */
endif
;
?>
<?php */
?>
<div
class=
"col sm-2 order-xs-1"
></div>
<?php
endif
;
?>
<?php
/* ?>
<?= $this->partial('app::partial/language', [
<?= $this->partial('app::partial/language', [
'lang' => $lang,
'lang' => $lang,
'locales' => $layoutInfo->getLocales(),
'locales' => $layoutInfo->getLocales(),
'router' => $layoutInfo->getRouter(),
'router' => $layoutInfo->getRouter(),
'request' => $layoutInfo->getRequest()
'request' => $layoutInfo->getRequest()
]); ?>
]); ?>
<?php */
?>
</nav>
</nav>
</header>
</header>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment