browse exhibits by user

Hello,

What i want to do is to browse exhibits by user, this is helpful because different users can see only their exhibits at the admin area.

Is there a way to do it?
I search but i didn't find a solution.

-Maybe there is an acl at exhibit_builder_setup_acl something like "browseSelf"?
-or maybe i can insert a $param at exhibit_controller at findBy?

I believe the way this works is that logged in users (contributors) can see everyone's exhibits in the browse section, but can only edit their own (except for admins and supers, who can edit anyone's).

Is this what you're talking about?

Hi,

what i want to do is logged in users(contributors) in the browse section, can see only the exhibits that can edit.
Because if there is too many exhibits it is dificult for someone to browse thrugh all exhibits and find his own that he can edit.

Thanks.

There is a helper function for exhibits called

exhibit_builder_user_can_edit($exhibit = null, $user = null)

In the exhibits admin browse view, you might be able to do something like (untested):

<?php foreach($exhibits as $key=>$exhibit): ?>
  <?php if( exhibit_builder_user_can_edit() ): ?> //add your new if statement here
    <tr class="exhibit <?php if($key%2==1) echo ' even'; else echo ' odd'; ?>">
 .....
    </tr>
  <?php endif; ?> //close your if statement after the <tr>...</tr>

Thank you for the reply!
I have already try something like this but with the function wasAddedBy :

'foreach($exhibits as $key=>$exhibit): ?>
<?php
$user = current_user();
if($exhibit->wasAddedBy(current_user())){ //if he has add the exhibit ?>
<tr class="exhibit <?php if($key%2==1) echo ' even'; else echo ' odd'; ?>">
'

but this has the problem that it does not work properly with the paginationlink, it brings one exhibit in the first page and the other in the third.
I believe that i have to put something in the query of the controller (maybe add a @params).

Thanks!