Skip to content

Commit

Permalink
Categories: Allow sorting by Associations (#19821)
Browse files Browse the repository at this point in the history
* Categories: Allow sorting by Associations

* moving assoc sorting after access
  • Loading branch information
infograf768 authored and Michael Babker committed Mar 17, 2018
1 parent 777a670 commit a6cea4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions administrator/components/com_categories/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public function __construct($config = array())
);
}

if (JLanguageAssociations::isEnabled())
{
$config['filter_fields'][] = 'association';
}

parent::__construct($config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<option value="a.title DESC">JGLOBAL_TITLE_DESC</option>
<option value="access_level ASC">JGRID_HEADING_ACCESS_ASC</option>
<option value="access_level DESC">JGRID_HEADING_ACCESS_DESC</option>
<option value="association ASC" requires="associations">JASSOCIATIONS_ASC</option>
<option value="association DESC" requires="associations">JASSOCIATIONS_DESC</option>
<option value="language_title ASC">JGRID_HEADING_LANGUAGE_ASC</option>
<option value="language_title DESC">JGRID_HEADING_LANGUAGE_DESC</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
Expand Down

0 comments on commit a6cea4a

Please sign in to comment.