Enh Req - Search/Sort People List
Page: 1
chris.miller
on Jun 11. 2008. 2:12 pm
It would be nice:
1) to be able to search for a person across companies, or even within just 1 company. Since everything is paginated it makes it potentially time-consuming to search for a user.
2) to have the people list for a company alphabetized. Right now it's just ordered by the order the users were added to the database for a company.
1) to be able to search for a person across companies, or even within just 1 company. Since everything is paginated it makes it potentially time-consuming to search for a user.
2) to have the people list for a company alphabetized. Right now it's just ordered by the order the users were added to the database for a company.
chris.miller
on Jun 11. 2008. 2:18 pm
FYI - I updated /application/modules/system/models/users/Users.class.php in the findByCompanyAndIds() function around line 74. I simply added another argument to the arguments array to order by last_name and then first_name. I'm not sure if this will mess up any other views, but it gives me what I want as far as I can tell. Here's the new findByCompanyAndIds function in case you want it:
function findByCompanyAndIds($company, $ids) {
return Users::find(array(
'conditions' => array('company_id = ? AND id IN (?)', $company->getId(), $ids),
'order' => 'last_name, first_name'
));
} // findByCompanyAndIds
chris.miller
on Jun 11. 2008. 2:40 pm
Ilija,
You're quick! Thanks for reply and confirmation. I like your idea about the email address field too - I'll add that as well.
Thanks!
You're quick! Thanks for reply and confirmation. I like your idea about the email address field too - I'll add that as well.
Thanks!



