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
a1df3c52
Commit
a1df3c52
authored
Nov 21, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил названия категорий таблицы
parent
b8ea7962
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
Cabinet.php
src/src/App/Action/User/Cabinet.php
+14
-4
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+3
-3
No files found.
src/src/App/Action/User/Cabinet.php
View file @
a1df3c52
...
...
@@ -110,7 +110,14 @@ class Cabinet extends Common
//$stats = $statsDaysModel->findAll(['FeedID' => $feed_id_list])->toArray();
$periodStats
=
$statsDaysModel
->
getStatsByDate
(
$feed_id_list
,
$dates
);
$campaignStats
=
$statsDaysModel
->
getStatsByFeeds
(
$feed_id_list
,
$dates
);
$cats
=
[
'shows'
,
'clicks'
,
'transactions'
,
'salemoney'
,
'admoney'
];
$cats
=
[
'shows'
=>
'Показы'
,
'clicks'
=>
'Клики'
,
'transactions'
=>
'Транзакции'
,
'salemoney'
=>
'salemoney'
,
'admoney'
=>
'admoney'
];
if
(
$campaignStats
||
count
(
$campaignStats
[
'period'
])
>
0
)
{
$feeds_names
=
[];
...
...
@@ -126,12 +133,15 @@ class Cabinet extends Common
/** @var \App\Model\Feeds $transactionsModel */
$transactionsModel
=
$this
->
container
->
get
(
Transactions
::
class
);
$transactionStats
=
$transactionsModel
->
getStatsByTransactions
(
$feed_id_list
,
$dates
);
$cats
=
[
'localmoney'
,
'usdollarmoney'
];
$cats
=
[
'localmoney'
=>
'localmoney'
,
'usdollarmoney'
=>
'usdollarmoney'
];
if
(
$transactionStats
||
count
(
$transactionStats
[
'period'
])
>
0
)
{
$transactions_names
=
[];
foreach
(
$transactionStats
[
'period'
]
as
$transaction_id
)
{
$transactions_names
[]
=
'
transaction
#'
.
$transaction_id
;
$transactions_names
[]
=
'
транзакция
#'
.
$transaction_id
;
}
$transactionStats
[
'period'
]
=
$transactions_names
;
}
...
...
@@ -277,7 +287,7 @@ class Cabinet extends Common
if
(
$transactionStats
||
count
(
$transactionStats
[
'period'
])
>
0
)
{
$transactions_names
=
[];
foreach
(
$transactionStats
[
'period'
]
as
$transaction_id
)
{
$transactions_names
[]
=
'
transaction
#'
.
$transaction_id
;
$transactions_names
[]
=
'
транзакция
#'
.
$transaction_id
;
}
$transactionStats
[
'period'
]
=
$transactions_names
;
}
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
a1df3c52
...
...
@@ -94,7 +94,7 @@ $system_link = $this->url('adm.system.actions');
<?php
else
:
?>
<textarea
id=
"period-stats"
>
<?=
(
$periodStats
?
json_encode
(
$periodStats
)
:
''
)
?>
</textarea>
<textarea
id=
"period-stats"
>
<?=
(
$periodStats
?
json_encode
(
$periodStats
,
JSON_UNESCAPED_UNICODE
)
:
''
)
?>
</textarea>
<textarea
id=
"campaign-stats"
>
<?=
(
$campaignStats
?
json_encode
(
$campaignStats
)
:
''
)
?>
</textarea>
<section
class=
"b-content__work"
>
...
...
@@ -166,14 +166,14 @@ $system_link = $this->url('adm.system.actions');
<?php
endif
;
?>
</th>
<?php
foreach
(
$cats
as
$name
)
:
?>
<?php
foreach
(
$cats
as
$name
=>
$title
)
:
?>
<th>
<?php
if
(
$report
==
'common'
)
:
?>
<span
style=
"border-color:
<?=
$colors_active_lines
[
$name
]
?>
;"
>
<input
type=
"checkbox"
data-field=
"
<?=
$name
?>
"
checked
/>
</span>
<?php
endif
;
?>
<b
class=
"cat"
id=
"
<?=
$name
?>
"
>
<?=
_t
(
$
nam
e
)
?>
<!--<b class="arrow asc">∧</b><b class="arrow desc">∨</b>-->
</b>
<b
class=
"cat"
id=
"
<?=
$name
?>
"
>
<?=
_t
(
$
titl
e
)
?>
<!--<b class="arrow asc">∧</b><b class="arrow desc">∨</b>-->
</b>
</th>
<?php
endforeach
;
?>
</tr>
...
...
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