Date: 4/13/2007 1:14 pm · Subject: Re: Reverse alphabetical order for folder assets.
I have implemented this in my own webgui installation. This might not be the best way to implement this functionality. i.e. having an additional radio button, which then permits users to select yes for both, which would get confusing. Here is what i added to my webgui installation. Could someone please commit this to the branch. i18n/English/Asset_Folder.pm add to our $I18N = { 'reverse sort alphabetically' => { message => q|Sort reverse alphabetical order?|, lastUpdated => 0 },
'reverse sort alphabetically help' => { message => q|Do you want to sort the items in this folder in reverse alphabetical order? If you select no then it will sort according to rank.|, lastUpdated => 0 }, 'reverseSort' => { message => q|A conditional that indicates that subfolders and files will be sorted in reverse alphabetical order.|, lastUpdated => 1167416930 },
} Asset/Wobject/Folder.pm in sub definition { properties => { reverseSort => { fieldType => "yesNo", defaultValue => 0, tab => 'display', label => $i18n->get('reverse sort alphabetically'), hoverHelp => $i18n->get('reverse sort alphabetically help'), },
and then further down in Folder.pm in sub view { $rules{orderByClause} = 'assetData.title DESC' if ($self->get("reverseSort")); add that just below the other $rules{orderByClause} Finally modify the Folder table. alter table Folder ADD reverseSort int(11) NOT NULL default 0; I dont really like how this turned out. This interface is not very intuitive. A drop down box would work better...
|