1 <& elements/browse.html,
2 'title' => 'Address Ranges',
3 'name_singular' => 'address range',
4 'html_init' => $html_init,
5 'html_foot' => $html_foot,
6 'query' => { 'table' => 'addr_range',
7 'order_by' => $order_by,
9 'count_query' => "SELECT count(*) from addr_range",
14 # would be nice to show whether any addresses in the
15 # range are assigned, but that's ugly
17 'fields' => [ 'start',
27 'link_onclicks' => [ $edit_link,
36 unless $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
37 # addr_ranges are ALWAYS global, else there will be chaos
39 my $order_by = "ORDER BY inet(start)"; # Pg-ism
40 # though we could also make the field itself inet-type...
41 # this would simplify a lot of things.
43 my $html_init = include('/elements/error.html');
46 my $addr_range = shift;
47 include('/elements/popup_link_onclick.html',
48 action => $p.'edit/addr_range.html?rangenum='.
49 $addr_range->rangenum,
50 actionlabel => 'Edit address range',
56 my $add_link = include('/elements/popup_link_onclick.html',
57 action => $p.'edit/addr_range.html',
58 actionlabel => 'Edit address range',
63 my $html_foot = qq!<A HREF="#" onclick="$add_link">
64 <I>Add a new address range</I></A>!;