DataQube VIP
Total posts: 16
23 Jan 2017 10:14

I am creating an exhibition portal based on Joomlart Events II Template and Cobalt 8 Visitors can list exhibitors, products, make filters etc. Every exhibitor can insert and modify profile information and insert, modify and delete products Authenticated users are the exhibitors and exhibition organizer (super admins)

  1. Every exhibitor should access only his data. I tried to accomplish that with User Articles menu module. With some change on the markup template I removed the "All records" button. However since filter links are enabled on some fields, if an exhibitor clicks on a filter he can view products from other exhibitors Is there is a way to restrict filter links only for lists and remove them from forms ?

  2. The workflow that the exhibition organizer requires is that when an exhibitor enters or changes product data the record should be marked as changed. The organizer can review the record and change it. My thought is to do that with a boolean field so that the organizer can filter and see the records that require review. Then I need to automatically change the field value to TRUE when exhibitor save the form and to FALSE when organizer save the form How can I do that ?

Last Modified: 01 Feb 2017


Sergey
Total posts: 13,748
24 Jan 2017 05:55

DataQube Every exhibitor should access only his data. I tried to accomplish that with User Articles menu module. With some change on the markup template I removed the "All records" button. However since filter links are enabled on some fields, if an exhibitor clicks on a filter he can view products from other exhibitors Is there is a way to restrict filter links only for lists and remove them from forms ?

2 keypoints here

  1. In type parameters set default article access "Who can view" to special. In this parametr special includes article autors.
  2. In section parameters set parameter Who can see restricted records in the list to noone.

This is it.

But how are you gonna make it so that other users can see profiles of exhibitors?


DataQube VIP
Total posts: 16
25 Jan 2017 00:47

Dear Sergey,

Thanks for your answer. See the project on my devel vps on http://www.2bf.gr/oenorama.

Please note that I had some conficting problems with bootstrao on JA Template and Cobalt. For this reason for all management operations I have create a different menu and used the beez template which I modified to my needs. Exhibitors who are logged in are redirected to that menu and see available only management operations. This is also helps me to apply different page css classes to hide and show stuff as needed.

The only reason I want every exbhibitor to see only his records is to not to confuse him during data entry by displaying records from other exhibitors when he is managing his profile and products.

My type settings are set such as special can add (exhibitors group), ony article author can change (super admin such as exhibition organizer can moderate) and public can view since I want site visitors to view/search/filter exhibitors and products.

Everything is working fine for public users. Searching and filtering is brilliant and filter links helps so I used them extensively. BUT For exhibitors who logged in to manage their profile/products there NO NEED for filtering. I can hide the filter area for them using css for the management page but what I cannot do yet and probably will need some php modification is to deactive the filter links on the manageent area.

If you can provide me some guidance which php files are responsible for displaying the filter links I can probably modify or override them.

A better suggestion is to apply somehow a default and non-removable filter (except for super admins) by userid (article owner) on management menu. Remember I am using the User Article menu module for the management page. Probably you can guide me on that direction.

Please also review my initial second question for the edited record flag. I just make a thought that for this I might need to create a custom field. This field will change to TRUE when exhibitor saves a form and to FALSE when a super admin saves a form. Do you think that is possible ?

Thanks and Best Regards Vangelis


DataQube VIP
Total posts: 16
25 Jan 2017 06:02

Dear Sergey,

Just ignore my second question for edited record flag field I solve it by creating a custom field and works nice. I also used css to hide it from for public lists and user filters as only super admins should see it

Regards Vangelis


pepperstreet VIP
Total posts: 3,837
31 Jan 2017 00:11

DataQube BUT For exhibitors who logged in to manage their profile/products there NO NEED for filtering. I can hide the filter area for them using css for the management page but what I cannot do yet and probably will need some php modification is to deactive the filter links on the manageent area.

A different markup template and/or list template for User's Homepage would solve this easily...
Unfortunately this is a drawback and missing feature in Cobalt 8. Here is a related topic and discussion about possible solutions and workarounds... hence the comments part. Might be of interest for you.

PHP

If you work with the user's homepage you can check the URL parameter and/or J!application for that context. Then use the infos for conditional display in your custom template code.

CSS

Besides, you already have contextual CSS classes on your HTML element. So you might also use those infos to control your management page display. For instance, all filter links can be targeted and disabled by:

a.filter-link {
    pointer-events: none;
    cursor: default;
    color: initial;
}

If you pre-pend a certain HTML class or a pageClassSuffix, you should be able to target your specific management page only! For instance:

.com_cobalt.view-records.itemid-999 a.filter-link {
    pointer-events: none;
    cursor: default;
    color: initial;
}

I guess, you got the idea. Please, check your management page's HTML element, and what is available.


Sergey
Total posts: 13,748
01 Feb 2017 12:23

If you have personalization on then user will be able to enter mode where he see only his own articles. Or you can create a link to user article in user menu. This link also will redicretc user to this mode.

Powered by Cobalt