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
ec1e813d
Commit
ec1e813d
authored
Jun 01, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Вывод инфы о статусе и коммента в карточке заказа
parent
a24b9a0c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
1 deletion
+63
-1
styles-feeds-stat.css
src/public/css/styles-feeds-stat.css
+27
-1
ViewId.php
src/src/App/Action/User/ViewId.php
+20
-0
cabinet-feed-click-history.phtml
src/templates/app/user/cabinet-feed-click-history.phtml
+16
-0
No files found.
src/public/css/styles-feeds-stat.css
View file @
ec1e813d
...
...
@@ -633,7 +633,32 @@ input[type="checkbox"]
resize
:
none
;
}
.b-popup-content
button
.b-order-status
{
margin-bottom
:
15px
;
}
.b-order-status_status
span
{
font-weight
:
bold
;
}
.b-order-status_status
span
.confirmed
{
color
:
#337ab7
;
}
.b-order-status_status
span
.rejected
{
color
:
#D9534F
;
}
.b-order-status_comment-inner
{
padding
:
5px
10px
;
width
:
100%
;
height
:
72px
;
border
:
1px
solid
#CCCCCC
;
border-radius
:
4px
;
resize
:
none
;
}
\ No newline at end of file
src/src/App/Action/User/ViewId.php
View file @
ec1e813d
...
...
@@ -32,6 +32,7 @@ use App\Model\Users;
use
App\Model\Statistics
;
use
App\Model\Providers
;
use
App\Model\Feeds\Feeds
;
use
App\Model\Feeds\OrdersStatus
;
use
Psr\Http\Message\ResponseInterface
;
use
Psr\Http\Message\ServerRequestInterface
;
use
Zend\Diactoros\Response\HtmlResponse
;
...
...
@@ -112,10 +113,29 @@ class ViewId extends Common
if
(
$feed_item
->
getClientid
()
==
$userId
){
$feed_id
=
$request
->
getAttribute
(
'feedid'
);
$order_id
=
$request
->
getAttribute
(
'id'
);
/** @var \App\Model\Feeds $ordersStatusModel */
$ordersStatusModel
=
$this
->
container
->
get
(
OrdersStatus
::
class
);
$ordersStatus
=
$ordersStatusModel
->
findOne
([
'feed_id'
=>
$feed_id
,
'order_id'
=>
$order_id
]);
if
(
$ordersStatus
)
{
$status
=
array
(
'confirmed'
=>
$ordersStatus
->
getConfirmed
(),
'comment'
=>
$ordersStatus
->
getComment
()
);
}
else
{
$status
=
array
(
'confirmed'
=>
1
,
'comment'
=>
null
);
}
// Статистика-история по клику:
$orderIdStats
=
$stats
->
getOrderIdStatData
(
$feed_id
,
$order_id
);
$data
[
'viewIdStats'
]
=
$orderIdStats
;
$data
[
'cats'
]
=
self
::
STAT_CATS_ORDER
;
$data
[
'status'
]
=
$status
;
}
else
{
$data
[
'error'
]
=
_t
(
'Извините, данный фид закреплен за другим пользователем'
);
...
...
src/templates/app/user/cabinet-feed-click-history.phtml
View file @
ec1e813d
...
...
@@ -47,6 +47,7 @@ $error = $this->error;
if
(
!
$error
)
{
$viewIdStats
=
$this
->
viewIdStats
;
$cats
=
$this
->
cats
;
$status
=
$status
;
}
?>
...
...
@@ -75,6 +76,21 @@ if (!$error) {
<?php
else
:
?>
<?php
/* Информация о статусе заказа: */
?>
<?php
if
(
$status
)
:
?>
<div
class=
"b-order-status"
>
<div
class=
"b-order-status_status"
>
<label>
Статус заказа:
</label>
<span
class=
"
<?=
(
$status
[
'confirmed'
])
?
'confirmed'
:
'rejected'
?>
"
>
<?=
(
$status
[
'confirmed'
])
?
_t
(
'подтвержден'
)
:
_t
(
'отклонен'
)
?>
</span>
</div>
<?php
if
(
$status
[
'comment'
])
:
?>
<div
class=
"b-order-status_comment"
>
<label>
Комментарий:
</label>
<textarea
class=
"b-order-status_comment-inner"
disabled
>
<?=
$status
[
'comment'
]
?>
</textarea>
</div>
<?php
endif
;
?>
</div>
<?php
endif
;
?>
<?php
/* Таблица */
?>
<div
id=
"table-stat"
class=
"b-table_wrapp"
>
<div
class=
"b-content__loading"
></div>
...
...
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