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
388e38f1
Commit
388e38f1
authored
Mar 22, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Логика работы стр. категорий
parent
58125b54
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
22 deletions
+97
-22
common-styles.css
src/public/css/common-styles.css
+12
-0
styles-feeds-system.css
src/public/css/styles-feeds-system.css
+0
-0
RobotoCondensed-Bold.ttf
src/public/fonts/RobotoCondensed-Bold.ttf
+0
-0
RobotoCondensed-Light.ttf
src/public/fonts/RobotoCondensed-Light.ttf
+0
-0
RobotoCondensed-Regular.ttf
src/public/fonts/RobotoCondensed-Regular.ttf
+0
-0
feed-cats.js
src/public/js/feed-cats.js
+0
-0
cabinet-cats.phtml
src/templates/app/user/cabinet-cats.phtml
+85
-22
No files found.
src/public/css/common-styles.css
View file @
388e38f1
...
@@ -35,6 +35,18 @@
...
@@ -35,6 +35,18 @@
url('../fonts/RalewayRegular.ttf')
format
(
'truetype'
),
url('../fonts/RalewayRegular.ttf')
format
(
'truetype'
),
url('../fonts/RalewayRegular.svg#RalewayRegular')
format
(
'svg'
);
url('../fonts/RalewayRegular.svg#RalewayRegular')
format
(
'svg'
);
}
}
@font-face
{
font-family
:
'RobotoCondensed-Regular'
;
src
:
url('../fonts/RobotoCondensed-Regular.ttf')
;
}
@font-face
{
font-family
:
'RobotoCondensed-Light'
;
src
:
url('../fonts/RobotoCondensed-Light.ttf')
;
}
@font-face
{
font-family
:
'RobotoCondensed-Bold'
;
src
:
url('../fonts/RobotoCondensed-Bold.ttf')
;
}
html
{
html
{
font-size
:
20px
;
font-size
:
20px
;
...
...
src/public/css/styles-feeds-system.css
View file @
388e38f1
This diff is collapsed.
Click to expand it.
src/public/fonts/RobotoCondensed-Bold.ttf
0 → 100644
View file @
388e38f1
File added
src/public/fonts/RobotoCondensed-Light.ttf
0 → 100644
View file @
388e38f1
File added
src/public/fonts/RobotoCondensed-Regular.ttf
0 → 100644
View file @
388e38f1
File added
src/public/js/feed-cats.js
0 → 100644
View file @
388e38f1
This diff is collapsed.
Click to expand it.
src/templates/app/user/cabinet-cats.phtml
View file @
388e38f1
...
@@ -26,38 +26,22 @@
...
@@ -26,38 +26,22 @@
/** @var $this \Zend\View\Renderer\PhpRenderer */
/** @var $this \Zend\View\Renderer\PhpRenderer */
$this
->
headScript
()
$this
->
headScript
()
->
appendFile
(
'/js/jquery.cookie.js'
)
->
appendFile
(
'/js/feed-cats.js'
)
->
appendFile
(
'/js/bootstrap.min.js'
)
;
;
$this
->
headLink
()
$this
->
headLink
()
->
appendStylesheet
(
'/css/styles-feeds-stat.css'
)
->
appendStylesheet
(
'/css/styles-feeds-stat.css'
)
->
appendStylesheet
(
'/css/styles-feeds-system.css'
)
;
;
/** @var \App\Entity\IdentityInterface $identity */
$identity
=
$this
->
identity
();
$gravatar
=
$this
->
gravatar
(
$identity
->
getEmail
());
$gravatar
->
setDefaultImg
(
\Zend\View\Helper\Gravatar
::
DEFAULT_IDENTICON
);
$sxml
=
new
SimpleXMLElement
(
substr
(
$gravatar
,
0
,
-
1
)
.
'/>'
);
$src
=
$sxml
[
'src'
];
$error
=
$this
->
error
;
$error
=
$this
->
error
;
$lang
=
$this
->
lang
;
if
(
!
$error
)
{
$feeds_cats
=
$this
->
feeds_cats
;
/*
$current_report = $this->current_report;
$report_conf = $this->report_conf;
$reports_list = $this->reports_list;
$data_request_link = $this->url('user.cabinet', ['lang' => $this->lang, 'report' => $current_report]);
$system_link = $this->url('adm.system.actions');
*/
}
?>
?>
<?php
if
(
$error
)
:
?>
<?php
if
(
$error
)
:
?>
<section
class=
"b-content__work"
>
<section
class=
"b-content__work"
>
...
@@ -72,7 +56,6 @@ if (!$error) {
...
@@ -72,7 +56,6 @@ if (!$error) {
<div
class=
"wrapp"
style=
"position: relative;"
>
<div
class=
"wrapp"
style=
"position: relative;"
>
<div
class=
"b-feeds-stat_controls form-group"
>
<div
class=
"b-feeds-stat_controls form-group"
>
<?php
/* Переключатель страниц */
?>
<?php
/* Переключатель страниц */
?>
<div
class=
"b-filter__switch display"
>
<div
class=
"b-filter__switch display"
>
<span
class=
"b-filter__switch-item text"
><a
href=
"
<?=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
'common'
])
?>
"
>
<?=
_t
(
'Сводный отчет'
)
?>
</a></span>
<span
class=
"b-filter__switch-item text"
><a
href=
"
<?=
$this
->
url
(
'user.cabinet'
,
[
'lang'
=>
$this
->
lang
,
'report'
=>
'common'
])
?>
"
>
<?=
_t
(
'Сводный отчет'
)
?>
</a></span>
...
@@ -81,6 +64,86 @@ if (!$error) {
...
@@ -81,6 +64,86 @@ if (!$error) {
</div>
</div>
</div>
</div>
<?php
function
render_cat
(
$i
,
$cat
)
{
$i
++
;
$symb
=
(
count
(
$cat
[
'sub_cats'
])
>
0
)
?
'<span class="group"><b class="closed">+</b><b class="open">–</b></span>'
:
'<span class="group"></span>'
;
?>
<tr
class=
"feed-cat"
style=
"font-size:
<?=
16
-
$i
+
1
?>
px;"
data-id=
"
<?=
$cat
[
'id'
]
?>
"
data-parent=
"
<?=
$cat
[
'parentid'
]
?>
"
>
<td>
<span
class=
"cat-title"
style=
"padding-left:
<?=
(
$i
-
1
)
*
40
?>
px;"
>
<?=
$symb
?><?=
$cat
[
'title'
]
?>
<span
class=
"foreign-id"
data-id=
"
<?=
$cat
[
'foreignid'
]
?>
"
>
[
<?=
$cat
[
'foreignid'
]
?>
]
</span></span>
</td>
<td
class=
"percent
<?=
(
$cat
[
'own'
])
?
'own'
:
'inherited'
?>
"
data-old-type=
"
<?=
(
$cat
[
'own'
])
?
'own'
:
'inherited'
?>
"
>
<span
class=
"edited"
data-old-value=
"
<?=
$cat
[
'percent'
]
?>
"
><span
class=
"percent-value"
>
<?=
$cat
[
'percent'
]
?>
</span>
%
</span>
<span
class=
"editing-wrap"
><input
class=
"percent-input editing"
value=
"
<?=
$cat
[
'percent'
]
?>
"
>
%
</span>
<br
/><span
class=
"old-value"
>
<?=
$cat
[
'percent'
]
?>
%
</span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<?php
if
(
count
(
$cat
[
'sub_cats'
])
>
0
)
:
?>
<?php
foreach
(
$cat
[
'sub_cats'
]
as
$sub_cat
)
:
?>
<?=
render_cat
(
$i
,
$sub_cat
)
?>
<?php
endforeach
;
?>
<?php
endif
;
?>
<?php
}
?>
<?php
foreach
(
$feeds_cats
as
$feeds_cat
)
:
?>
<div
class=
"feed-title"
>
категории фида
<b>
<?=
$feeds_cat
[
'title'
]
?>
</b>
:
</div>
<table
class=
"table table-striped feeds-cats"
data-content=
"cats"
data-feed-id=
"
<?=
$feeds_cat
[
'id'
]
?>
"
data-feed-percent=
"
<?=
$feeds_cat
[
'percent'
]
?>
"
>
<thead>
<tr>
<th>
<span
class=
"cat-title-main"
>
<span
class=
"group"
><b
class=
"closed"
>
+
</b><b
class=
"open"
>
–
</b></span>
Название категории
</span>
<!-- Сохранить / Отмена -->
<span
class=
"form-actions"
>
<a
class=
"btn btn-primary submit-action"
href=
"#"
action=
"
<?=
$form_link
?>
"
method=
"post"
>
<?=
_t
(
'Сохранить'
)
?>
</a>
<a
class=
"btn btn-default cancel-action"
href=
"
<?=
$link_cancel
?>
"
>
<?=
_t
(
'Отмена'
)
?>
</a>
</span>
</th>
<th
class=
"data"
><span>
Процент
</span></th>
<th
class=
"data"
><span>
Показы
</span></th>
<th
class=
"data"
><span>
Клики
</span></th>
<th
class=
"data"
><span>
Заказы
</span></th>
<th
class=
"data"
><span>
Стоимость
</span></th>
<th
class=
"data"
><span>
Комиссия
</span></th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$feeds_cat
[
'cats'
]
as
$cat
)
:
?>
<?=
render_cat
(
0
,
$cat
)
?>
<?php
endforeach
;
?>
</tbody>
</table>
<?php
endforeach
;
?>
<!-- Сохранить / Отмена -->
<div
class=
"form-actions"
>
<a
class=
"btn btn-primary submit-action"
href=
"#"
action=
"
<?=
$form_link
?>
"
method=
"post"
>
<?=
_t
(
'Сохранить'
)
?>
</a>
<a
class=
"btn btn-default cancel-action"
href=
"
<?=
$link_cancel
?>
"
>
<?=
_t
(
'Отмена'
)
?>
</a>
</div>
</div>
</div>
</section>
</section>
...
...
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