Jump to content

Client listing first_name, last_name rather than Name


Recommended Posts

If you have a number of clients, it would be nice to be able to sort by first_name or last_name when looking for a client.

If I manually edit the url to: /admin/clients/index/active/?sort=last_name&order=asc the client list is sorted by last name, so it seems like this would be an "easy" change.

I am populating the company field with last_name, first_name; it would be better if we had two columns.


Link to comment
Share on other sites

As a work-around, I changed one line in:  /app/views/admin/default/admin_clients.pdt

<td><span><a href="<?php echo $this->Html->safe($this->base_uri . 'clients/index/' . $this->Html->ifSet($status) . '/?sort=first_name&order=' . ($sort == 'first_name' ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == 'first_name' ? ' ' . $order : '');?>"><?php $this->_('AdminClients.index.heading_name');?></a></span></td>

<td><span><a href="<?php echo $this->Html->safe($this->base_uri . 'clients/index/' . $this->Html->ifSet($status) . '/?sort=last_name&order=' . ($sort == 'last_name' ? $negate_order : $order));?>" class="ajax<?php echo $this->Html->safe($sort == 'last_name' ? ' ' . $order : '');?>"><?php $this->_('AdminClients.index.heading_name');?></a></span></td>

Hopefully I didn't break something :-)

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...