Can any one tell be where I can find the "Show All" button. I have some filtered record that I don't want the end user to be able to see. Changing the permissions won't help as the end user is not the owner of these records. The record is filtered based on an id from another table. If I can remove the SHOW ALL Button, it will eliminate the end user from seeing records that they don't need to see.
I have looked through all the files and I can't seem to determine which line presents the SHOW ALL button.
Thanks in advance for any help you can previde.
Need to disable the Show All button
Re: Need to disable the Show All button
Hello
Go to your datalist.php file and comment out the following lines
// display Show All icon
if(($this->AllowFilters || ($this->QuickSearch>=1 && $this->QuickSearch<=3)) && $Print_x==''){
$this->HTML .= '<button onClick="document.myform.NoDV.value=1; '.$resetSelection.'" type="submit" name="NoFilter_x" id="NoFilter" value="1"><img src="cancel_search.gif" /> ' . $Translation['Reset Filters'] . '</button>';
$buttonsCount++;
}
This will then turn off the Show All button from now on. If you wish to have admin or others still have the Show All button there you will have to write a condition to allow it to show when the group is admin or whomever you wish. I would write the code as part of the if statement to look for what group the current user is in and allow/disallow based upon group.
Hope this helps.
Alan
Go to your datalist.php file and comment out the following lines
// display Show All icon
if(($this->AllowFilters || ($this->QuickSearch>=1 && $this->QuickSearch<=3)) && $Print_x==''){
$this->HTML .= '<button onClick="document.myform.NoDV.value=1; '.$resetSelection.'" type="submit" name="NoFilter_x" id="NoFilter" value="1"><img src="cancel_search.gif" /> ' . $Translation['Reset Filters'] . '</button>';
$buttonsCount++;
}
This will then turn off the Show All button from now on. If you wish to have admin or others still have the Show All button there you will have to write a condition to allow it to show when the group is admin or whomever you wish. I would write the code as part of the if statement to look for what group the current user is in and allow/disallow based upon group.
Hope this helps.
Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -
Re: Need to disable the Show All button
Alan,
Thank you so much for your help! It worked Great!! I hope in the coming weeks and months I will be able to pay forward so to speak and help someone else that is stuck..
One last question, I am still pretty new with PHP, and I am not quite sure of the correct syntax adding the if statement to allow different groups to see the Show All button. If you have an opportunity to share that with Me I would greatly appreciate it.
Thanks,
Michael
Thank you so much for your help! It worked Great!! I hope in the coming weeks and months I will be able to pay forward so to speak and help someone else that is stuck..
One last question, I am still pretty new with PHP, and I am not quite sure of the correct syntax adding the if statement to allow different groups to see the Show All button. If you have an opportunity to share that with Me I would greatly appreciate it.
Thanks,
Michael
Re: Need to disable the Show All button
Whilst I haven't actually tried it, I think you could also achieve the desired result using the tablename_init() hook of the particular table concerned
see: http://bigprof.com/appgini/help/advance ... ename_init for how it is used. The example provided is exactly what you're after.
The DataList object concerned would be AllowFilters
see here: http://bigprof.com/appgini/help/advance ... s/DataList
So, this is what you'd need to enter to your tablename.php hook
Hope that helps.
see: http://bigprof.com/appgini/help/advance ... ename_init for how it is used. The example provided is exactly what you're after.
The DataList object concerned would be AllowFilters
see here: http://bigprof.com/appgini/help/advance ... s/DataList
So, this is what you'd need to enter to your tablename.php hook
Code: Select all
function tablename_init(&$options, $memberInfo, &$args){
if($memberInfo['group']=='Admins'){
$options->AllowFilters=1;
}else{
$options->AllowFilters=0;
}
return TRUE;
}
Re: Need to disable the Show All button
Thank you for this information, I will try this also and see which works best for my purposes.
Best Regards,
Michael
Best Regards,
Michael