Changeset 697 for trunk/cgi-bin/main.cgi
- Timestamp:
- 02/18/15 17:16:21 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r695 r697 74 74 my $header = HTML::Template->new(filename => "header.tmpl"); 75 75 my $footer = HTML::Template->new(filename => "footer.tmpl"); 76 my $utilbar = HTML::Template->new(filename => "utilbar.tmpl", loop_context_vars => 1, global_vars => 1); 77 78 print "Content-type: text/html\n\n"; 76 79 77 80 $header->param(version => $IPDB::VERSION); 78 81 $header->param(addperm => $IPDBacl{$authuser} =~ /a/); 79 82 $header->param(webpath => $IPDB::webpath); 80 print "Content-type: text/html\n\n", $header->output; 83 84 $utilbar->param(webpath => $IPDB::webpath); 85 86 print $header->output; 81 87 82 88 … … 221 227 #print "Content-type: text/html\n\n", $header->output; 222 228 $page->param(webpath => $IPDB::webpath); 229 print $utilbar->output; 223 230 print $page->output; 224 231 … … 278 285 #$page->param(editme => 1) unless $pinfo->{type} ne 'mm'; 279 286 287 my $crumbs = getBreadCrumbs($ip_dbh, $pinfo->{parent_id}); 288 my @rcrumbs = reverse (@$crumbs); 289 $utilbar->param(breadcrumb => \@rcrumbs); 290 280 291 $page->param(self_id => $webvar{parent}); 281 292 $page->param(block => $pinfo->{block}); … … 292 303 my $poolinfo = getBlockData($ip_dbh, $webvar{pool}); 293 304 my $cidr = new NetAddr::IP $poolinfo->{block}; 305 306 # Tree navigation 307 my $crumbs = getBreadCrumbs($ip_dbh, $poolinfo->{parent_id}); 308 my @rcrumbs = reverse (@$crumbs); 309 $utilbar->param(breadcrumb => \@rcrumbs); 294 310 295 311 $page->param(block => $cidr); … … 348 364 # seems reasonable that a new allocation would share a VRF with its parent 349 365 $page->param(pvrf => $pinfo->{vrf}); 366 367 # Tree navigation 368 my $crumbs = getBreadCrumbs($ip_dbh, $webvar{parent}); 369 my @rcrumbs = reverse (@$crumbs); 370 $utilbar->param(breadcrumb => \@rcrumbs); 350 371 351 372 $webvar{fbtype} = '' if !$webvar{fbtype}; … … 441 462 442 463 if ($webvar{fbassign} && $webvar{fbassign} eq 'y') { 464 465 # Tree navigation 466 my $crumbs = getBreadCrumbs($ip_dbh, $webvar{parent}); 467 my @rcrumbs = reverse (@$crumbs); 468 $utilbar->param(breadcrumb => \@rcrumbs); 469 443 470 $cidr = new NetAddr::IP $webvar{block}; 444 471 $alloc_from = new NetAddr::IP $webvar{allocfrom}; … … 685 712 $page->param(alloctype => $disp_alloctypes{$webvar{alloctype}}); 686 713 $page->param(custid => $webvar{custid}); 714 687 715 # breadcrumbs lite! provide at least a link to the parent of the block we just allocated. 688 716 my $binfo = getBlockData($ip_dbh, $webvar{parent}); 689 717 $page->param(parentid => $webvar{parent}); 690 718 $page->param(parentblock => $binfo->{block}); 719 720 # Full breadcrumbs 721 my $crumbs = getBreadCrumbs($ip_dbh, $webvar{parent}); 722 my @rcrumbs = reverse (@$crumbs); 723 $utilbar->param(breadcrumb => \@rcrumbs); 724 691 725 if ($webvar{alloctype} eq 'pr' && $webvar{billinguser}) { 692 726 $page->param(billinguser => $webvar{billinguser}); … … 829 863 $page->param(id => $webvar{id}); 830 864 $page->param(basetype => $webvar{basetype}); 865 866 # Tree navigation 867 my $crumbs = getBreadCrumbs($ip_dbh, $blockinfo->{parent_id}); 868 my @rcrumbs = reverse (@$crumbs); 869 $utilbar->param(breadcrumb => \@rcrumbs); 831 870 832 871 # Clean up extra whitespace on alloc type. Mainly a legacy-data cleanup.
Note:
See TracChangeset
for help on using the changeset viewer.