From: Brian O'Connor Date: Mon, 13 Oct 2003 22:22:17 +0000 (+0000) Subject: Kinda has sorting woring on the column labels for a focus item. Since the sort happe... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6bb8884edef5cdb15360a2208a8c660fee541656;p=dbsrgits%2FSQL-Translator.git Kinda has sorting woring on the column labels for a focus item. Since the sort happens in the template layer and, since it's a bit difficult to work with, sorting happens on two different structures. Hence one-to-one links appear sorted at the bottom of a focus panel while the field data is sorted above. I think I'm going to tear out the atom render code soon to give it more flexibility and enhance sorting. --- diff --git a/lib/SQL/Translator/Producer/Turnkey.pm b/lib/SQL/Translator/Producer/Turnkey.pm index 89f9043..a1747d5 100644 --- a/lib/SQL/Translator/Producer/Turnkey.pm +++ b/lib/SQL/Translator/Producer/Turnkey.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::Turnkey; # ------------------------------------------------------------------- -# $Id: Turnkey.pm,v 1.1.2.7 2003-10-13 22:05:44 allenday Exp $ +# $Id: Turnkey.pm,v 1.1.2.8 2003-10-13 22:22:17 boconnor Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Allen Day , # Ying Zhang @@ -23,7 +23,7 @@ package SQL::Translator::Producer::Turnkey; use strict; use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.1.2.7 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.1.2.8 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Schema::Constants; @@ -603,7 +603,7 @@ my $turnkey_template_tt2 = <<'EOF'; [- pkey = "Turnkey::Model::${pname}" -] [% id = record.id %] [- first = 1 -] - [- FOREACH field = packages.$pkey.columns_essential -] + [- FOREACH field = packages.$pkey.columns_essential.sort -] [- IF first -] [- field -][% obj2link(field.[- field -]) %] [- first = 0 -] @@ -611,7 +611,7 @@ my $turnkey_template_tt2 = <<'EOF'; [- field -][% obj2link(field.[- field -]) %] [- END -] [- END -] - [- FOREACH field = packages.$pkey.columns_others -] + [- FOREACH field = packages.$pkey.columns_others.sort -] [- field -][% obj2link(field.[- field -]) %] [- END -] [% IF (rowcount > 1) %]
[% END %]