is there a way to hide some element info in list view in fabrik admin UI?

jarri

New Member
i wanted to keep some information private in the list view but still show the column. to achieve this, i modified components\com_fabrik\views\list\tmpl\bootstrap\default_row.php (line 20) to this:

Code:
$user =& JFactory::getUser();
if ($this->cellClass[$heading]['class']=="list1___email fabrik_element fabrik_list_3_group_2") {
    if ($user->username!=("admin" or "admin2" or "admin3")){
        echo "for admin's eyes only...";
    }else{
        echo @$this->_row->data->$heading;
    }
}else{
    echo @$this->_row->data->$heading;
}
basically i checked out the css class the column i wanted to target gets and change the information there for non-admins.

is there way to do this within the fabrik UI without needing to edit a source file? (edit: now that i think about it i guess it is doable with template override.) i think it could be done with list pre-filter but i couldn't figure it out so i resorted to this ugly php bit.
 
1. In principle:
Don't modify the templates coming with fabrik (this will be overridden with the next update), create your own template (copy a template folder, rename, edit as you like, select as list template)
http://fabrikar.com/forums/index.php?wiki/creating-a-custom-list-template/

If you want to show the column header but hide content I think your template mod is the correct way

2.You can hide/show columns to different users by setting element acces "List view".

3. Yes, ou can hide/show rows to different users by setting a prefilter (you'll need an element holding something like userid, access level... you can use in prefilter)
http://fabrikar.com/forums/index.php?wiki/pre-filters/
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top