diff options
Diffstat (limited to 'httemplate/search/sector.html')
| -rw-r--r-- | httemplate/search/sector.html | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/httemplate/search/sector.html b/httemplate/search/sector.html new file mode 100644 index 000000000..037df10ea --- /dev/null +++ b/httemplate/search/sector.html @@ -0,0 +1,104 @@ +<& /elements/header.html, { + 'title' => 'Sector coverage maps', + } +&> +<style> + a.createmap { + font-weight: bold; + color: blue; + } + a.viewmap { + font-weight: bold; + color: green; + } + .grid th { + padding-left: 3px; + padding-right: 3px; + padding-bottom: 2px; + border: none; + empty-cells: show; + font-size:90%; + border-bottom: 1px solid #999999; + } + .grid td { + padding-left: 3px; + padding-right: 3px; + padding-bottom: 2px; + border: none; + empty-cells: show; + } +</style> +<table class="grid" style="border-spacing: 0px"> + <thead> + <tr> + <th>Tower / sector</th> + <th colspan=3> + </tr> + </thead> + <tbody> +% my $row = 0; +% foreach my $sector (@sectors) { +% my $sectornum = $sector->sectornum; + <tr class="row<% $row % 2 %>"> + <td> + <a href="<% $fsurl %>edit/tower.html?<% $sector->towernum |h %>"> + <% $sector->description |h %> + </a> + </td> + +% my @need_fields = $sector->need_fields_for_coverage; +% if ( @need_fields ) { + <td>Need fields:</td> + <td> + <% join('<br>', @need_fields) %> + </td> +% } else { + <td colspan="2" style="text-align: center"> +% my $text = 'Create map'; +% if ( length($sector->image) > 0 ) { +% $text = 'Reprocess'; +% } + <form name="create_<% $sectornum |h %>"> + <input type="hidden" name="sectornum" value="<% $sectornum |h %>"> + <& /elements/progress-init.html, + 'create_'.$sectornum, + [ 'sectornum' ], + $fsurl.'misc/sector-create_map.html', + { 'message' => 'Map generated', + 'url' => $cgi->self_url }, + "sector$sectornum" + &> + <a class="createmap" href="#" onclick="sector<% $sectornum %>process()"> + <% $text %> + </a> +% } + </td> + <td> +% if ( length($sector->image) > 0 ) { + <a class="viewmap" href="<% $fsurl %>search/svc_broadband-map.html?sectornum=<% $sectornum %>"> + View map—<% $sector->margin %>dB margin + </a> +% } + </td> + </tr> +% $row++; +% } # foreach $sector + </tbody> +</table> +<& /elements/footer.html &> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $query = { + table => 'tower_sector', + select => 'tower_sector.*, + tower.latitude, tower.longitude, tower.color, tower.towername', + extra_sql => ' WHERE tower.disabled is null', + addl_from => ' JOIN tower USING (towernum)', + order_by => ' ORDER BY towername, sectorname', +}; + +my @sectors = qsearch($query); +</%init> |
