- Timestamp:
- 07/04/14 13:18:11 (10 years ago)
- Location:
- branches/stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/ipdb.psql
r598 r621 73 73 ); 74 74 75 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid, allocations.vrf FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid, poolips.vrfFROM poolips;75 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.circuitid, allocations.vrf, 'n' AS available FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.circuitid, poolips.vrf, poolips.available FROM poolips; 76 76 77 77 CREATE TABLE "alloctypes" ( -
branches/stable/cgi-bin/search.cgi
r620 r621 148 148 # Columns actually returned. Slightly better than hardcoding it 149 149 # in each (sub)select 150 my $cols = "cidr,custid,type,city,description,vrf ";150 my $cols = "cidr,custid,type,city,description,vrf,available"; 151 151 152 152 # hack fix for undefined variables … … 351 351 # which probably shouldn't be for reasons of sanity. 352 352 353 my $cols = "cidr,custid,type,city,description,vrf ";353 my $cols = "cidr,custid,type,city,description,vrf,available"; 354 354 355 355 if ($category eq 'all') { … … 478 478 desc => $desc, 479 479 vrf => $vrf, 480 avail => $avail eq 'y',480 avail => ($avail eq 'y' ? 1 : 0), 481 481 ); 482 482 push @sresults, \%row; -
branches/stable/templates/search/sresults.tmpl
r620 r621 17 17 <TMPL_LOOP NAME=sresults> 18 18 <tr class="row<TMPL_VAR NAME=rowclass>"> 19 <td><TMPL_IF issub>Sub </TMPL_IF><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?<TMPL_IF avail>action= edit&block=<TMPL_VAR NAME=block><TMPL_ELSE>action=assign&block=<TMPL_VAR NAME=block>&fbtype=i</TMPL_IF>"><TMPL_VAR NAME=block></a><TMPL_IF ispool> <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&pool=<TMPL_VAR NAME=block>">List IPs</a></TMPL_IF></td>19 <td><TMPL_IF issub>Sub </TMPL_IF><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?<TMPL_IF avail>action=assign&block=<TMPL_VAR NAME=block>&fbtype=i<TMPL_ELSE>action=edit&block=<TMPL_VAR NAME=block></TMPL_IF>"><TMPL_VAR NAME=block></a><TMPL_IF ispool> <a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&pool=<TMPL_VAR NAME=block>">List IPs</a></TMPL_IF></td> 20 20 <td><TMPL_VAR NAME=custid></td> 21 21 <td><TMPL_VAR NAME=disptype></td>
Note:
See TracChangeset
for help on using the changeset viewer.