Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_jobs
Commits
b42ae910
Commit
b42ae910
authored
3 years ago
by
Kevin von Spiczak
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] better error messages for no results
parent
0e33b327
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!27
[FEATURE] save filters in session
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Controller/BackendController.php
+1
-3
1 addition, 3 deletions
Classes/Controller/BackendController.php
Resources/Private/Backend/Templates/Index.html
+35
-26
35 additions, 26 deletions
Resources/Private/Backend/Templates/Index.html
with
36 additions
and
29 deletions
Classes/Controller/BackendController.php
+
1
−
3
View file @
b42ae910
...
...
@@ -85,6 +85,7 @@ class BackendController extends ActionController {
*
* @param array $filters
* @return void
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException
*/
public
function
indexAction
(
array
$filters
=
[]):
void
{
$pageUid
=
(
int
)
GeneralUtility
::
_GP
(
'id'
);
...
...
@@ -145,9 +146,6 @@ class BackendController extends ActionController {
$this
->
view
->
assign
(
'filters'
,
$filters
);
$this
->
view
->
assign
(
'jobs'
,
$jobs
);
if
(
!
$totalJobCount
&&
$pageUid
)
{
// clear previously set filters again,
// without this, the user would be stuck without filters and just the flash message
$backendUser
->
pushModuleData
(
'tools_beuser/index.php/web_SgJobsBackend_filters'
,
[]);
$this
->
addFlashMessage
(
LocalizationUtility
::
translate
(
'backend.notice.noRecords'
,
'SgJobs'
),
''
,
FlashMessage
::
INFO
);
...
...
This diff is collapsed.
Click to expand it.
Resources/Private/Backend/Templates/Index.html
+
35
−
26
View file @
b42ae910
...
...
@@ -12,7 +12,7 @@
<f:section
name=
"main"
>
<f:flashMessages
/>
<f:if
condition=
"{
jobs
}"
>
<f:if
condition=
"{
pageUid
}"
>
<f:then>
<f:render
partial=
"Filter"
arguments=
"{_all}"
/>
<f:render
partial=
"CreateJob"
arguments=
"{_all}"
/>
...
...
@@ -27,31 +27,40 @@
</h2>
</f:if>
<div
class=
"panel panel-default recordlist"
>
<div
class=
"table-fit"
>
<table
data-table=
"tx_sgjobs_domain_model_job"
class=
"table table-striped table-hover"
>
<sg:backend.widget.paginate
objects=
"{jobs}"
as=
"paginatedJobs"
configuration=
"{insertAbove: 1, itemsPerPage: 20}"
>
<tbody>
<f:for
each=
"{paginatedJobs}"
as=
"job"
>
<tr
data-uid=
"{job.uid}"
>
<td
nowrap=
"nowrap"
class=
"col-icon"
>
<f:format.raw><sg:backend.icon
table=
"tx_sgjobs_domain_model_job"
row=
"{job}"
/></f:format.raw>
</td>
<td
style=
"white-space: normal;"
>
<be:link.editRecord
uid=
"{job.uid}"
table=
"tx_sgjobs_domain_model_job"
>
<span>
{job.title} - {job.company.name}, {job.company.city}
</span>
</be:link.editRecord>
</td>
<td
nowrap=
"nowrap"
class=
"col-control"
>
<f:format.raw><sg:backend.control
table=
"tx_sgjobs_domain_model_job"
row=
"{job}"
/></f:format.raw>
</td>
</tr>
</f:for>
</tbody>
</sg:backend.widget.paginate>
</table>
</div>
</div>
<f:if
condition=
"{jobs}"
>
<f:then>
<div
class=
"panel panel-default recordlist"
>
<div
class=
"table-fit"
>
<table
data-table=
"tx_sgjobs_domain_model_job"
class=
"table table-striped table-hover"
>
<sg:backend.widget.paginate
objects=
"{jobs}"
as=
"paginatedJobs"
configuration=
"{insertAbove: 1, itemsPerPage: 20}"
>
<tbody>
<f:for
each=
"{paginatedJobs}"
as=
"job"
>
<tr
data-uid=
"{job.uid}"
>
<td
nowrap=
"nowrap"
class=
"col-icon"
>
<f:format.raw><sg:backend.icon
table=
"tx_sgjobs_domain_model_job"
row=
"{job}"
/></f:format.raw>
</td>
<td
style=
"white-space: normal;"
>
<be:link.editRecord
uid=
"{job.uid}"
table=
"tx_sgjobs_domain_model_job"
>
<span>
{job.title} - {job.company.name}, {job.company.city}
</span>
</be:link.editRecord>
</td>
<td
nowrap=
"nowrap"
class=
"col-control"
>
<f:format.raw><sg:backend.control
table=
"tx_sgjobs_domain_model_job"
row=
"{job}"
/></f:format.raw>
</td>
</tr>
</f:for>
</tbody>
</sg:backend.widget.paginate>
</table>
</div>
</div>
</f:then>
<f:else>
<p>
<f:translate
key=
"backend.noJobsMessage"
/>
</p>
</f:else>
</f:if>
</f:then>
<f:else>
<f:render
partial=
"SelectRoot"
arguments=
"{pages: pages}"
/>
...
...
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