Changeset 12132


Ignore:
Timestamp:
2006-07-11T11:48:44+12:00 (18 years ago)
Author:
mdewsnip
Message:

Changed the way the states page is generated and removed newlines from static macros, for the "search institutions by state" page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/perllib/plugins/CICPlug.pm

    r11978 r12132  
    166166    };
    167167
     168my %state_name_to_abbr_mapping = reverse(%{$state_abbr_to_name_mapping});
     169
    168170my $state_abbr_to_area_mapping = {
    169171    "AL" => "Southeast",
     
    11291131    my $id_to_extra_mapping = shift(@_);
    11301132
    1131     print BROWSER_MACROFILE "<tr><td width=\"50%\"><br /><a name=\"$chunk_title\"/><span style=\"color: black;\"><b>$chunk_title</b></span></td><td width=\"50%\"></td></tr>\n";
     1133    print BROWSER_MACROFILE "<tr><td width=\"50%\"><br /><a name=\"$chunk_title\"/><span style=\"color: black;\"><b>$chunk_title</b></span></td><td width=\"50%\"></td></tr>";
    11321134
    11331135    my %full_name_to_id_mapping;
     
    11591161    print BROWSER_MACROFILE "</td>";
    11601162
    1161     print BROWSER_MACROFILE "</tr>\n";
     1163    print BROWSER_MACROFILE "</tr>";
    11621164    }
    11631165}
     
    12041206    print BROWSER_MACROFILE "<table cellpadding=\"0\" cellspacing=\"0\" width=\"_pagewidth_\">\n";
    12051207    foreach my $state (sort(keys(%{$state_to_ids_mapping}))) {
     1208    my $state_abbr = $state_name_to_abbr_mapping{$state};
     1209    print BROWSER_MACROFILE "_cicstate" . $state_abbr . "_\n";
     1210    }
     1211    print BROWSER_MACROFILE "</table>\n";
     1212    print BROWSER_MACROFILE "}\n";
     1213
     1214    foreach my $state (sort(keys(%{$state_to_ids_mapping}))) {
     1215    my $state_abbr = $state_name_to_abbr_mapping{$state};
     1216    print BROWSER_MACROFILE "\n_cicstate" . $state_abbr . "_ {";
    12061217    my @state_ids = @{$state_to_ids_mapping->{$state}};
    12071218    &write_static_browser_macros_chunk($state, \@state_ids, $id_to_name_mapping, undef);
    1208     }
    1209     print BROWSER_MACROFILE "</table>\n";
    1210 
    1211     print BROWSER_MACROFILE "}\n";
     1219    print BROWSER_MACROFILE "}\n";
     1220    }
     1221
    12121222    close(BROWSER_MACROFILE);
    12131223}
Note: See TracChangeset for help on using the changeset viewer.