Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
41d481a8
Commit
41d481a8
authored
Mar 10, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix redmine search
parent
2d5f1eca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
44 deletions
+60
-44
common/modules/support/controllers/SupportController.php
common/modules/support/controllers/SupportController.php
+13
-2
common/modules/support/models/redmine/IssueHelper.php
common/modules/support/models/redmine/IssueHelper.php
+37
-33
common/modules/support/views/support/index.php
common/modules/support/views/support/index.php
+10
-9
No files found.
common/modules/support/controllers/SupportController.php
View file @
41d481a8
...
...
@@ -52,9 +52,20 @@ class SupportController extends Controller
$user
=
$client
->
user
->
getCurrentUser
();
$
models
=
$client
->
issue
->
all
(
[
$
params
=
[
'author_id'
=>
$user
[
'user'
][
'id'
],
]);
];
if
(
Yii
::
$app
->
request
->
get
(
's'
))
{
$params
=
ArrayHelper
::
merge
(
$params
,
[
'f[]'
=>
'subject'
,
'op[subject]'
=>
'~'
,
'v[subject][]'
=>
Yii
::
$app
->
request
->
get
(
's'
),
]);
}
$models
=
$client
->
issue
->
all
(
$params
);
return
$this
->
render
(
'index'
,
[
'models'
=>
$models
,
...
...
common/modules/support/models/redmine/IssueHelper.php
View file @
41d481a8
...
...
@@ -6,46 +6,50 @@ use common\models\Settings;
class
IssueHelper
{
public
static
function
sort
(
$issues
)
public
static
function
sort
(
$issues
=
null
)
{
$settings
=
[
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-work'
)),
'title'
=>
'Задачи в работе'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-new'
)),
'title'
=>
'Задачи на оценке'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-test'
)),
'title'
=>
'Задачи на тестировании'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-approve'
)),
'title'
=>
'Задачи ожидающие проверки'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-accepted'
)),
'title'
=>
'Закрытые задачи'
,
'close'
=>
true
],
];
foreach
(
$issues
as
$issue
)
if
(
$issues
)
{
foreach
(
$settings
as
&
$setting
)
$settings
=
[
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-work'
)),
'title'
=>
'Задачи в работе'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-new'
)),
'title'
=>
'Задачи на оценке'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-test'
)),
'title'
=>
'Задачи на тестировании'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-approve'
)),
'title'
=>
'Задачи ожидающие проверки'
,
],
[
'statuses'
=>
explode
(
','
,
Settings
::
getValue
(
'support-status-accepted'
)),
'title'
=>
'Закрытые задачи'
,
'close'
=>
true
],
];
foreach
(
$issues
as
$issue
)
{
if
(
in_array
(
$issue
[
'status'
][
'id'
],
$setting
[
'statuses'
]))
foreach
(
$settings
as
&
$setting
)
{
$setting
[
'models'
][]
=
$issue
;
if
(
in_array
(
$issue
[
'status'
][
'id'
],
$setting
[
'statuses'
]))
{
$setting
[
'models'
][]
=
$issue
;
}
}
}
}
unset
(
$setting
);
unset
(
$setting
);
return
$settings
;
}
return
$settings
;
return
null
;
}
}
\ No newline at end of file
common/modules/support/views/support/index.php
View file @
41d481a8
...
...
@@ -64,17 +64,18 @@ use common\modules\support\models\redmine\IssueHelper;
<td
class=
"no_pad"
>
<?php
$issues
=
IssueHelper
::
sort
(
$models
[
'issues'
]);
foreach
(
$issues
as
$issue
)
if
(
$issues
=
IssueHelper
::
sort
(
$models
[
'issues'
]))
{
if
(
!
isset
(
$issue
[
'close'
]))
{
echo
$this
->
render
(
'_loop'
,
[
'output'
=>
$issue
[
'models'
],
'title'
=>
$issue
[
'title'
]]);
}
else
foreach
(
$issues
as
$issue
)
{
$accepteds
=
$issue
[
'models'
];
if
(
!
isset
(
$issue
[
'close'
]))
{
echo
$this
->
render
(
'_loop'
,
[
'output'
=>
$issue
[
'models'
],
'title'
=>
$issue
[
'title'
]]);
}
else
{
$accepteds
=
$issue
[
'models'
];
}
}
}
?>
...
...
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