kazu2012 / get-simple-cms

Automatically exported from code.google.com/p/get-simple-cms
GNU General Public License v3.0
0 stars 0 forks source link

Template files aren't sorted in drop-down #358

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In theme-edit.php, V2 used to sort the theme files in the drop-down list by 
name, but in V3 I've noticed that they don't seem to be sorted any more. Not a 
huge bug, but mildly irritating (to me, anyway ;-).

I've attached a patch file which adds a snippet of code to theme-edit.php to 
sort the files in alphabetical order, but forcing Default Template to the top 
of the list.

Original issue reported on code.google.com by chris.li...@blackpepper.co.uk on 10 Oct 2012 at 12:37

Attachments:

GoogleCodeExporter commented 9 years ago
Yeah I have noticed this as well, its very annoying.

Original comment by tablatronics on 12 Oct 2012 at 4:21

GoogleCodeExporter commented 9 years ago
Nice patch, although I think it would be better to sort by path depth.
So ALL templates are at top, and then sort by subdepths ( count 
directory_seprators )

Original comment by tablatronics on 12 Oct 2012 at 4:32

GoogleCodeExporter commented 9 years ago
Or maybe just add subpath grouping to the combo, that might help clean up the 
list also.

Original comment by tablatronics on 12 Oct 2012 at 4:33

GoogleCodeExporter commented 9 years ago
Here's another patch that sorts the files with subpath grouping so that 
templates sort to the top, with the default template at the top of that list, 
and files in subdirectories come after that.

Original comment by chris.li...@blackpepper.co.uk on 15 Oct 2012 at 10:56

Attachments: