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
689e62f7
Commit
689e62f7
authored
Nov 20, 2018
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Вынес в конфиг список периодов и цветов категорий
parent
bee57d75
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
21 deletions
+23
-21
feeds.global.php
src/config/autoload/feeds.global.php
+16
-0
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+2
-2
Cabinet.php
src/src/App/Action/User/Cabinet.php
+2
-0
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+3
-19
No files found.
src/config/autoload/feeds.global.php
View file @
689e62f7
...
...
@@ -3,5 +3,21 @@
return
[
'feed_conf'
=>
[
'formats'
=>
[
'yml'
,
'gfeed'
],
'periods_list'
=>
[
'today'
=>
'сегодня'
,
'yesterday'
=>
'вчера'
,
'7days'
=>
'7 дней'
,
'30days'
=>
'30 дней'
,
'current_month'
=>
'текущий месяц'
,
'prev_month'
=>
'прошлый месяц'
,
'year'
=>
'год'
,
],
'colors_active_lines'
=>
[
'shows'
=>
'#2CA02C'
,
'clicks'
=>
'#D62728'
,
'transactions'
=>
'#1F77B4'
,
'salemoney'
=>
'#FF7F0E'
,
'admoney'
=>
'#9467BD'
,
]
]
];
src/public/js/script-feeds-stat-table.js
View file @
689e62f7
...
...
@@ -52,8 +52,8 @@ $(document).ready(function(){
if
(
sortField
)
{
console
.
log
(
'AAA sortField = '
,
sortField
);
console
.
log
(
'AAA dataTable = '
,
dataTable
);
//
console.log('AAA sortField = ', sortField);
//
console.log('AAA dataTable = ', dataTable);
var
dataTableForSort
=
[];
...
...
src/src/App/Action/User/Cabinet.php
View file @
689e62f7
...
...
@@ -158,6 +158,8 @@ class Cabinet extends Common
$data
[
'periodStats'
]
=
$periodStats
;
$data
[
'campaignStats'
]
=
$campaignStats
;
$data
[
'cats'
]
=
$cats
;
$data
[
'periods_list'
]
=
$this
->
container
->
get
(
'config'
)[
'feed_conf'
][
'periods_list'
];
$data
[
'colors_active_lines'
]
=
$this
->
container
->
get
(
'config'
)[
'feed_conf'
][
'colors_active_lines'
];
/*
$response = new HtmlResponse($this->template->render('app::user/feeds', [
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
689e62f7
...
...
@@ -60,24 +60,8 @@ $current_period = $this->current_period;
$dates
=
$this
->
dates
;
$cats
=
$this
->
cats
;
$report
=
$this
->
report
;
$periods_conf
=
array
(
'today'
=>
'сегодня'
,
'yesterday'
=>
'вчера'
,
'7days'
=>
'7 дней'
,
'30days'
=>
'30 дней'
,
'current_month'
=>
'текущий месяц'
,
'prev_month'
=>
'прошлый месяц'
,
'year'
=>
'год'
,
);
$colors_active_lines
=
array
(
'shows'
=>
'#2CA02C'
,
'clicks'
=>
'#D62728'
,
'transactions'
=>
'#1F77B4'
,
'salemoney'
=>
'#FF7F0E'
,
'admoney'
=>
'#9467BD'
,
);
$periods_list
=
$this
->
periods_list
;
$colors_active_lines
=
$this
->
colors_active_lines
;
$data_request_link
=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
$report
]);
$system_link
=
$this
->
url
(
'adm.system.actions'
);
...
...
@@ -148,7 +132,7 @@ $system_link = $this->url('adm.system.actions');
<span>
период:
</span>
<select
class=
"form-control stat-period"
name=
"period"
data-link=
"
<?=
$data_request_link
?>
"
>
<option
value=
""
disabled
>
--
</option>
<?php
foreach
(
$periods_
conf
as
$period
=>
$title
)
:
?>
<?php
foreach
(
$periods_
list
as
$period
=>
$title
)
:
?>
<option
value=
"
<?=
$period
?>
"
<?php
if
(
$period
==
$current_period
)
:
?>
selected
<?php
endif
;
?>
>
<?=
$title
?>
</option>
<?php
endforeach
;
?>
</select>
...
...
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