5 basic_platform_info.mas
6 Mason component to show a list of templates for platform web page.
18 Mason component to show a list of templates for platform web page.
20 - Mason root page = platform_detail.mas
21 - Perl controller = platform.pl
28 Aureliano Bombarely (ab782@cornell.edu)
43 use CXGN::GEM::Schema;
44 use CXGN::Metadata::Dbiref;
45 use CXGN::Metadata::Dbipath;
46 use CXGN::Page::FormattingHelpers qw/ info_section_html info_table_html columnar_table_html page_title_html html_break_string /;
52 my $template_comp_content;
54 my $default_message = '<span class="ghosted">data not available</span>';
56 ## If there aren't any experiment that comes from experimental design it will do nothing.
57 ## The error message will returned by basic information
60 my $template_composition_html;
62 my @template_row_list = @{ $template_list };
66 if (scalar(@template_row_list) > 0) {
68 foreach my $template_row (@template_row_list) {
69 my %template_data = $template_row->get_columns();
70 my $template_id = $template_data{'template_id'};
71 my $template_name = $template_data{'template_name'};
72 my $template_link = '/gem/template.pl?id='.$template_id;
73 my $template_html = "<a href=$template_link>$template_name</a>";
75 push @data, [$template_html];
78 ## Use columnar table to give the html format. If don't exists any data, print message.
80 $template_composition_html = columnar_table_html( headings => [ 'Template'],
85 my $templ_n = scalar(@data);
86 $template_comp_content = info_section_html( title => "Templates (".$templ_n.")",
87 contents => $template_composition_html,
96 <% $template_comp_content %>
100 /util/import_javascript.mas,
101 classes => 'CXGN.Effects'