1 <& /elements/header.html, 'Deployment zones' &>
2 <& /elements/menubar.html,
3 'Add a new fixed broadband zone' => $p.'edit/deploy_zone-fixed.html',
4 'Add a new mobile zone' => $p.'edit/deploy_zone-mobile.html',
6 <P><FONT SIZE="+1"><B>Fixed Broadband Zones</B></FONT></P>
7 <& elements/browse.html,
8 name_singular => 'zone',
9 query => { table => 'deploy_zone',
10 hashref => { zonetype => 'B' },
12 count_query => "SELECT COUNT(*) FROM deploy_zone WHERE zonetype = 'B'",
34 '<A HREF="'. $fixed_shp. '">download</A>',
35 '<A HREF="'. $fixed_kmz. '">download</A>',
36 '<A HREF="'. $fixed_json. '">download</A>',
38 fields => [ 'zonenum',
40 sub { my $self = shift;
41 $tech_label->{$self->technology} },
42 sub { my $self = shift;
44 $self->is_consumer ? 'consumer' : (),
45 $self->is_business ? 'business' : ()
48 sub { my $self = shift;
50 $self->adv_speed_down,
54 sub { my $self = shift;
56 $self->cir_speed_down,
60 sub { my $self = shift;
61 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
63 sub { my $self = shift;
64 FS::deploy_zone_block->count('zonenum = '.$self->zonenum)
66 sub { my $self = shift;
67 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
70 sub { my $self = shift;
71 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
74 sub { my $self = shift;
75 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
79 sort_fields => [ 'zonenum',
82 '(is_consumer is not null, is_business is not null)',
83 '(adv_speed_down, adv_speed_up)',
84 '(cir_speed_down, cir_speed_up)',
86 links => [ $link_fixed, $link_fixed, '', '', '', '', '', '', $link_shp, $link_kmz, $link_json, ],
89 disable_maxselect => 1,
92 disabled_statuspos => 2,
94 <P><FONT SIZE="+1"><B>Mobile Zones</B></FONT></P>
95 <& elements/browse.html,
96 name_singular => 'zone',
97 query => { table => 'deploy_zone',
98 hashref => { zonetype => 'P' },
100 count_query => "SELECT COUNT(*) FROM deploy_zone WHERE zonetype = 'P'",
108 'Vertices', # number of vertices? not so useful
113 fields => [ 'zonenum',
115 sub { my $self = shift;
116 $tech_label->{$self->technology} },
117 sub { my $self = shift;
118 $spec_label->{$self->spectrum} },
119 sub { my $self = shift;
121 $self->is_voice ? 'voice' : (),
122 $self->is_broadband ? 'broadband' : (),
125 sub { my $self = shift;
126 join( ' / ', grep $_,
127 $self->adv_speed_down,
131 sub { my $self = shift;
132 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
134 sub { my $self = shift;
135 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
138 sub { my $self = shift;
139 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
142 sub { my $self = shift;
143 FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
147 sort_fields => [ 'zonenum',
151 '(is_voice is not null, is_broadband is not null)',
152 '(adv_speed_down, adv_speed_up)',
154 links => [ $link_mobile, $link_mobile, '', '', '', '', '', $link_shp, $link_kmz, $link_json, ],
157 disable_maxselect => 1,
160 disabled_statuspos => 2,
163 <& /elements/footer.html &>
166 my $curuser = $FS::CurrentUser::CurrentUser;
167 my $acl_edit = $curuser->access_right('Edit FCC report configuration');
168 my $acl_edit_global = $curuser->access_right('Edit FCC report configuration for all agents');
170 unless $acl_edit or $acl_edit_global;
172 my $link_fixed = [ $p.'edit/deploy_zone-fixed.html?', 'zonenum' ];
173 my $link_mobile = [ $p.'edit/deploy_zone-mobile.html?', 'zonenum' ];
174 my $link_shp = [ $p.'view/deploy_zone-shp.cgi?', 'zonenum' ];
175 my $link_kmz = [ $p.'view/deploy_zone-kmz.cgi?', 'zonenum' ];
176 my $link_json = [ $p.'view/deploy_zone-geojson.cgi?', 'zonenum' ];
178 my $fixed_shp = $p.'view/deploy_zone-shp.cgi?zonetype=B';
179 my $fixed_kmz = $p.'view/deploy_zone-kmz.cgi?zonetype=B';
180 my $fixed_json = $p.'view/deploy_zone-geojson.cgi?zonetype=B';
182 my $tech_label = FS::part_pkg_fcc_option->technology_labels;
183 my $spec_label = FS::part_pkg_fcc_option->spectrum_labels;