Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Need to Filter what a grid displays. 21 Aug 2013 23:44 #10880

Hello, im having a little problem. In a front end interface I display a collection of objects (projects) that my users have access to. The thing is that I cant filter the projects and everyone sees all the projects and not just the ones they are asigned to.
Any Idea how I can controll that on the Cook builder?
I started using this builder today and im impressed. It is GREAT and im sure this small problem has a solution. Thank you!

Please Log in or Create an account to join the conversation.

Need to Filter what a grid displays. 22 Aug 2013 10:42 #10881

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Instance the auhoring wizard.

If you want to attribute (as admin) an item to a user, then change the created_by value to the user of your choice.

Then also the item must be published (published = 0).
A published item is visible to everybody.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Need to Filter what a grid displays. 22 Aug 2013 20:41 #10890

admin wrote: Instance the auhoring wizard.

If you want to attribute (as admin) an item to a user, then change the created_by value to the user of your choice.

Then also the item must be published (published = 0).
A published item is visible to everybody.


Is there a way to test this in the sand box?
I tried to make it work but it never does what I need, or nobody sees the data or everyones sees it.

This is what i am building. Its a tool for managing bug reports from different clients i have.
I have users (more than one for each client) who have access to several projects. They can create bug reports for those projects. The problem is that i only want those users to see the projects they can see. for that I have this structure:

In the file I show the datastructure.
Usuarios = users from joomla
Proyectos = Projects
PROY_USUARIOS = relationship between projects and users

Uploaded with ImageShack.us

Please Log in or Create an account to join the conversation.

Last edit: by dburone.

Need to Filter what a grid displays. 23 Aug 2013 15:08 #10899

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Because this functionality is not crossing multiple FK's.

This will work for Proy_usario, but not for proyectos.
Keep this wizard it is working.

Now you need now to add some lines in your Proyectos model (list model) function : prepareQuery()
Add a filter, based on the same you can find in Proj_usario for created_by key.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.061 seconds

Amazing Tool !
And only tool I know that allows complete Scaffolding in terms of component creation. It really saves loads of time (actually much more than that). Simple architecture enables quick and painless changes at any time. Code is clean and consintent. It's just... what's the word... neat! :) Great work! You should definetely try this one!

pi_wo (JED)
         

Get Started