Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


Issue information

  • #000440

  • 0 - None Assigned

  • Fixed

  • 3.0.3

  • 3.1.1


Issue Confirmations

  • Yes (0)No (0)
Photo

suggestion: garage list by column headers

Posted by Babailiica on 27 May 2011 - 06:53 AM

I wanted to be able to order the garage listing by clicking the column headers...
So I have modified my template
ACP -> Look & Feel -> Template -> skin_garage -> itemList
I have replaced the "<tr class='header'>...</tr>" with the next code:

<tr class='header'>
<th scope='col' class='short' style='width:1%;'>{$this->lang->words['thumbnail']}</th>
<th scope='col'>
<if test="$this->request['orderby'] == 'make_name'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=make_name&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_name']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_name']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=make_name&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_name']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_name']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=make_name&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_name']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_name']}</a>
</if>

&nbsp;&nbsp;&nbsp;

<if test="$this->request['orderby'] == 'year'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=year&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['year']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['year']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=year&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['year']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['year']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=year&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['year']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['year']}</a>
</if>

&nbsp;&nbsp;&nbsp;

<if test="$this->request['orderby'] == 'rating'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=rating&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['rating']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['rating']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=rating&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['rating']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['rating']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=rating&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['rating']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['rating']}</a>
</if>

&nbsp;&nbsp;&nbsp;

<if test="$this->request['orderby'] == 'member_name'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=member_name&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_owner']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_owner']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=member_name&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_owner']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_owner']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=member_name&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['vehicle_owner']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['vehicle_owner']}</a>
</if>
</th>

<if test="showPriceFieldTh:|:$this->settings['gs_enable_vehicle_price']">
<th scope='col' class='short'>
<if test="$this->request['orderby'] == 'price'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=price&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['price']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['price']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=price&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['price']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['price']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=price&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['price']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['price']}</a>
</if>
</th>
</if>

<if test="showOdometerFieldTh:|:$this->settings['gs_enable_vehicle_odometer']">
<th scope='col' class='short'>
<if test="$this->request['orderby'] == 'odometer'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=odometer&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['odometer']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['odometer']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=odometer&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['odometer']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['odometer']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=odometer&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['odometer']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['odometer']}</a>
</if>
</th>
</if>

<th scope='col' class='short'>
<if test="$this->request['orderby'] == 'views'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=views&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['views']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['views']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=views&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['views']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['views']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=views&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['views']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['views']}</a>
</if>
</th>

<th scope='col' class='short'>
<if test="$this->request['orderby'] == 'date_added'">
<if test="$this->request['orderhow'] == 'desc'">
<a href='{parse url="do=item_list&amp;orderby=date_added&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['date_added']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['date_added']} {parse replacement="sort_up"}</a>
<else />
<a href='{parse url="do=item_list&amp;orderby=date_added&amp;orderhow=desc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['date_added']} {$this->lang->words['in']} {$this->lang->words['descending_order']}' style='text-decoration: none;'>{$this->lang->words['date_added']} {parse replacement="sort_down"}</a>
</if>
<else />
<a href='{parse url="do=item_list&amp;orderby=date_added&amp;orderhow=asc" base="publicWithApp"}' title='{$this->lang->words['order_by']} {$this->lang->words['date_added']} {$this->lang->words['in']} {$this->lang->words['ascending_order']}' style='text-decoration: none;'>{$this->lang->words['date_added']}</a>
</if>
</th>							
</tr>

You may include it in the next version :)

Updating severity to: 0 - None Assigned
Updating status to: Confirmed
Updating version to: 3.0.3
Issue fixed in: None

Thank you very much. :)


changed status to: Fixed
changed fixed-in version to: 3.1.1





1 user(s) are reading this issue

0 members, 1 guests, 0 anonymous users