Hello,
is it possible to add a filter to the records that are shown as child-records in the sub-table view?
Example, a location has many objects.
But if an object is not working, this object's status-field will be changed to "OUT OF ORDER".
So I just want to show al objects in the sub-table at the bottom of the Location's detailview that are "WORKING".
Sub-table filter
Re: Sub-table filter
I got the right php-file, parent-children.php, but there is no hook-file for this one.
I'm testing some changes in the query it is running from this php-file...
I'm testing some changes in the query it is running from this php-file...
Re: Sub-table filter
Hi,
maybe you can use this approach:
Use php and a hook to check if the object is working. If yes - everything is fine.
If now, you probably find yourself at the same problem I found myself ( viewtopic.php?f=2&t=3104&p=10381#p10381 ) i.e. the sub-table is not rendered at the beginning, but by ajax "later".
Take a look at the post I linked to. Using an idea from jsetzer ( viewtopic.php?f=2&t=3104&p=10381#p10375 ), I was able to create a function that checks - using a timer - every 1 second. You could also do this, and if some variable you set after your object check (working/out of order) you can manipulate the output in the sub-table.
Just a suggestion.
Oh, did you mean you want to check in the subtable if there is something working?
Maybe create a view in your database and use that as subtable?
Also you might use my suggestion and use jquery to check the column in the subtable for working/not working. If working - fine, if not, hide that line from view like this maybe:
In the hook for your table, function ...._footer:
Let me explain:
If the logged in user is not in the admins group, he will not see the #ID_ContainerBauform-container (in the main table though). You might be able to adjust/rework that code for your needs.
Olaf
maybe you can use this approach:
Use php and a hook to check if the object is working. If yes - everything is fine.
If now, you probably find yourself at the same problem I found myself ( viewtopic.php?f=2&t=3104&p=10381#p10381 ) i.e. the sub-table is not rendered at the beginning, but by ajax "later".
Take a look at the post I linked to. Using an idea from jsetzer ( viewtopic.php?f=2&t=3104&p=10381#p10375 ), I was able to create a function that checks - using a timer - every 1 second. You could also do this, and if some variable you set after your object check (working/out of order) you can manipulate the output in the sub-table.
Just a suggestion.
Oh, did you mean you want to check in the subtable if there is something working?
Maybe create a view in your database and use that as subtable?
Also you might use my suggestion and use jquery to check the column in the subtable for working/not working. If working - fine, if not, hide that line from view like this maybe:
In the hook for your table, function ...._footer:
Code: Select all
if ($memberInfo['group'] != 'Admins' ) {
$FuerMitarbeiter = "<script>\$j('#ID_ContainerBauform-container').closest('.form-group').hide()</script>";
}
$footer= $FuerMitarbeiter . '<%%FOOTER%%>';
break;
If the logged in user is not in the admins group, he will not see the #ID_ContainerBauform-container (in the main table though). You might be able to adjust/rework that code for your needs.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view