From b6eb6e75c842ae7249533e60267c4ebb14639488 Mon Sep 17 00:00:00 2001 From: Pasqualino Ferrentino Date: Tue, 4 Sep 2007 11:57:19 +0200 Subject: [PATCH] I can list the ads list --- .../lib/breadcrumbs/Controller/AnPages.pm | 3 ++ .../breadcrumbs/root/src/an_pages_view_ads_list.tt | 34 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) rewrite web-site/breadcrumbs/root/src/an_pages_view_ads_list.tt (98%) diff --git a/web-site/breadcrumbs/lib/breadcrumbs/Controller/AnPages.pm b/web-site/breadcrumbs/lib/breadcrumbs/Controller/AnPages.pm index b0a2126..20615ff 100644 --- a/web-site/breadcrumbs/lib/breadcrumbs/Controller/AnPages.pm +++ b/web-site/breadcrumbs/lib/breadcrumbs/Controller/AnPages.pm @@ -121,6 +121,9 @@ sub _add_trails{ sub view_act_ads : LocalRegex('^view_act_ads_(\d+)$') { my ( $self, $c) = @_; + #I must process the sorting + $self->_process_table_sorting_orders($c); + $c->session->{hold_the_sack} = 1; my $act_to_serve = $c->req->captures->[0]; diff --git a/web-site/breadcrumbs/root/src/an_pages_view_ads_list.tt b/web-site/breadcrumbs/root/src/an_pages_view_ads_list.tt dissimilarity index 98% index f4a25dd..3310de9 100644 --- a/web-site/breadcrumbs/root/src/an_pages_view_ads_list.tt +++ b/web-site/breadcrumbs/root/src/an_pages_view_ads_list.tt @@ -1,2 +1,32 @@ - -bene ecco qui la lista degli annunci per questa attività. \ No newline at end of file +[% META title="Le Bricioline, bricio pagine" %] +[% page_title = "Annunci relativi a " _ Catalyst.session.sack.act_name %] + +[% + tb_name = "view_ads_list"; + + + + fields = [ + { + db_name => 'nick', + out_name => "Possessore:", + }, + { + db_name => 'ad_text', + out_name => "Testo annuncio:", + }, + { + db_name => 'p_min', + out_name => 'Prezzo:', + numeric_sort => 1, + }, + ]; + + dataset = ads; +%] + +[% IF sorted_tables.$tb_name == "" %] +[% sorted_tables.$tb_name = "nick" %] +[% END %] + +[% PROCESS sortable_dataset_table.tt %] \ No newline at end of file -- 2.11.4.GIT