Sort styles by layout name instead of theme name in "Base Layouts" view.
Patch by afuna.
diffs (25 lines):
diff -r 44c88962b307 -r afe078bf7458 cgi-bin/LJ/Widget/ThemeChooser.pm
--- a/cgi-bin/LJ/Widget/ThemeChooser.pm Sun Nov 01 13:44:57 2009 -0600
+++ b/cgi-bin/LJ/Widget/ThemeChooser.pm Sun Nov 01 14:25:47 2009 -0600
@@ -74,10 +74,17 @@ sub render_body {
@themes = LJ::Customize->remove_duplicate_themes(@themes);
- # sort themes with custom at the end, then alphabetically
- @themes =
- sort { $a->is_custom <=> $b->is_custom }
- sort { lc $a->name cmp lc $b->name } @themes;
+ if ( $cat eq "base" ) {
+ # sort themes with custom at the end, then alphabetically by layout
+ @themes =
+ sort { $a->is_custom <=> $b->is_custom }
+ sort { lc $a->layout_name cmp lc $b->layout_name } @themes;
+ } else {
+ # sort themes with custom at the end, then alphabetically by theme
+ @themes =
+ sort { $a->is_custom <=> $b->is_custom }
+ sort { lc $a->name cmp lc $b->name } @themes;
+ }
LJ::run_hooks("modify_theme_list", \...@themes, user => $u, cat => $cat);
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog