Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
51ce35ac
Verified
Commit
51ce35ac
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #8956 Resources list back
parent
1f97cfc7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/resource/controllers/ResController.php
+2
-5
2 additions, 5 deletions
src/app/resource/controllers/ResController.php
src/app/resource/models/ResModelAbstract.php
+4
-10
4 additions, 10 deletions
src/app/resource/models/ResModelAbstract.php
with
6 additions
and
15 deletions
src/app/resource/controllers/ResController.php
+
2
−
5
View file @
51ce35ac
...
...
@@ -491,12 +491,9 @@ class ResController
'offset'
=>
(
int
)
$data
[
'offset'
],
'limit'
=>
(
int
)
$data
[
'limit'
],
]);
$allResources
=
ResModel
::
getOnView
([
'select'
=>
[
1
],
'where'
=>
[
$whereClause
],
]);
$count
=
empty
(
$resources
[
0
][
'count'
])
?
0
:
$resources
[
0
][
'count'
];
return
$response
->
withJson
([
'resources'
=>
$resources
,
'
number
'
=>
count
(
$allResources
)
]);
return
$response
->
withJson
([
'resources'
=>
$resources
,
'
count
'
=>
$
count
]);
}
public
function
updateExternalInfos
(
Request
$request
,
Response
$response
)
...
...
This diff is collapsed.
Click to expand it.
src/app/resource/models/ResModelAbstract.php
+
4
−
10
View file @
51ce35ac
...
...
@@ -45,11 +45,12 @@ abstract class ResModelAbstract
ValidatorModel
::
stringType
(
$aArgs
,
[
'clause'
]);
ValidatorModel
::
intType
(
$aArgs
,
[
'limit'
,
'offset'
]);
$where
=
[
'res_view_letterbox.priority = priorities.id'
,
'res_view_letterbox.status = status.id'
,
'res_view_letterbox.dest_user = users.user_id'
];
$where
=
[
'res_view_letterbox.priority = priorities.id'
];
$where
[]
=
$aArgs
[
'clause'
];
$aResources
=
DatabaseModel
::
select
([
'select'
=>
[
'count(1) OVER()'
,
'alt_identifier'
,
'category_id'
,
'case_label'
,
...
...
@@ -64,17 +65,10 @@ abstract class ResModelAbstract
'priorities.label as priority_label'
,
'process_limit_date'
,
'res_id'
,
'status.img_filename as status_icon'
,
'status.label_status as status_label'
,
'status.id as status_id'
,
'subject'
,
'type_label as doctype_label'
,
'user_lastname'
,
'user_firstname'
,
'users.lastname as user_dest_lastname'
,
'users.firstname as user_dest_firstname'
,
'type_label as doctype_label'
],
'table'
=>
[
'res_view_letterbox, priorities
, status, users
'
],
'table'
=>
[
'res_view_letterbox, priorities'
],
'where'
=>
$where
,
'data'
=>
[],
'order_by'
=>
empty
(
$aArgs
[
'orderBy'
])
?
[]
:
$aArgs
[
'orderBy'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment