Changeset 687 for trunk


Ignore:
Timestamp:
01/29/15 17:02:06 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

CSS and layout cleanup, sort of. Convert tables with alternating row
colours to pure CSS (mainly to make addition of future fields, and future
*optional* or restricted-access fields, much easier). Play a little loose
with table structure to let headings and in-page "titles" continue to show
the main background colour instead of the "first line of the table" colour.

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r685 r687  
    331331  $webvar{block} = '' if !$webvar{block};
    332332
    333 # hmm.  TMPL_IF block and TMPL_ELSE block on these instead?
    334   $page->param(rowa => 'row'.($webvar{block} eq '' ? 1 : 0));
    335   $page->param(rowb => 'row'.($webvar{block} eq '' ? 0 : 1));
    336333  $page->param(allocfrom => $webvar{block});    # fb-assign flag, if block is set, we're in fb-assign
    337334
  • trunk/templates/addmaster.tmpl

    r582 r687  
    11<div class="indent">
    2 <div class="heading">Add new master IP block</div><br>
    32<form method="POST" action="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi">
    43<fieldset><legend class="noshow">&nbsp;</legend>
    5 <table class="regular" cellspacing="1" cellpadding="1">
    6 <tr class="row0">
     4<table class="regular altrows" cellspacing="1" cellpadding="1">
     5<tr class="heading"><td>Add new master IP block</td></tr>
     6<tr>
    77<td>Master block to add: (CIDR)</td>
    88<td><input type="text" name="cidr"></td>
    99</tr>
    10 <tr class="row1">
     10<tr>
    1111<td>Default VRF:</td>
    1212<td><input type="text" name="vrf"></td>
    1313</tr>
    14 <tr class="row0">
     14<tr>
    1515<td>Default rDNS pattern:</td>
    1616<td><input type="text" name="rdns"><input type="button" value=" ? " onclick="helpRDNS()" class="regular"></td>
    1717</tr>
    18 <tr class="row1">
     18<tr>
    1919<TMPL_IF loclist>
    2020<td>Default DNS scope:</td>
     
    2727</td>
    2828</tr>
    29 <tr class="row0">
     29<tr>
    3030<TMPL_ELSE>
    3131</TMPL_IF>
  • trunk/templates/assign.tmpl

    r675 r687  
    11<div class="indent">
    2 <div class="tblsubtitle">Assign IP<TMPL_UNLESS fbip>s</TMPL_UNLESS></div>
    3 <br>
    42
    53<form method="post" action="main.cgi" class="regular">
    64<fieldset><legend class="noshow">&nbsp;</legend>
    75
    8 <table class="regular" cellspacing="1" cellpadding="1">
     6<table class="regular altrows" cellspacing="1" cellpadding="1">
     7<tr class="tblsubtitle"><td>Assign IP<TMPL_UNLESS fbip>s</TMPL_UNLESS></td></tr>
    98
    109<TMPL_IF allocfrom>
    11 <tr class="row0">
     10<tr>
    1211<TMPL_IF fbip>
    1312<td>IP pool:</td>
     
    2019</td>
    2120</tr>
    22 <tr class="row1">
     21<tr>
    2322<TMPL_IF fbip>
    2423<td>IP:</td>
     
    3736</TMPL_IF>
    3837
    39 <tr class="row0">
     38<tr>
    4039<td>Customer location:</td>
    4140<td>
     
    4948</tr>
    5049
    51 <tr class="row1">
     50<tr>
    5251<td>Allocation type:</td>
    5352<td>
     
    6564
    6665<TMPL_UNLESS allocfrom>
    67 <tr class="row0">
     66<tr>
    6867<td>Subnet CIDR mask length:</td>
    6968<td valign="top">&nbsp;/&nbsp;<input type="text" name="maskbits" size="3" maxlength="3"></td>
     
    7170</TMPL_UNLESS>
    7271
    73 <tr class="<TMPL_VAR NAME=rowa>">
     72<tr>
    7473<td>Reverse DNS pattern:</td>
    7574<td>
     
    8079</tr>
    8180
    82 <tr class="<TMPL_VAR NAME=rowb>">
     81<tr>
    8382<td>Customer ID:</td>
    8483<td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td>
    8584</tr>
    8685
    87 <tr class="<TMPL_VAR NAME=rowa>">
     86<tr>
    8887<td>Layer-2/demarc node</td>
    8988<td>
     
    9897
    9998<TMPL_UNLESS allocfrom>
    100 <tr class="<TMPL_VAR NAME=rowb>">
     99<tr>
    101100<td>Allocate from blocks in this location:</td>
    102101<td>
     
    109108</tr>
    110109
    111 <tr class="<TMPL_VAR NAME=rowa>">
     110<tr>
    112111<td>Limit to blocks in this master:&nbsp;</td>
    113112<td>
     
    121120</TMPL_UNLESS>
    122121
    123 <tr class="<TMPL_VAR NAME=rowb>">
     122<tr>
    124123<td>Circuit ID:</td>
    125124<td><input name="circid" size="40"></td>
    126125</tr>
    127126
    128 <tr class="<TMPL_VAR NAME=rowa>">
     127<tr>
    129128<td>Description/Name:</td>
    130129<td><input name="desc" size="40"></td>
    131130</tr>
    132131
    133 <tr class="<TMPL_VAR NAME=rowb>">
     132<tr>
    134133<td>Notes:&nbsp;</td>
    135134<td><textarea name="notes" rows="3" cols="40"></textarea></td>
     
    137136
    138137<TMPL_IF privdata>
    139 <tr class="<TMPL_VAR NAME=rowa>">
     138<tr>
    140139<td>Restricted data:</td>
    141140<td><textarea rows="3" cols="64" name="privdata" class="regular"></textarea></td>
     
    143142</TMPL_IF>
    144143
    145 <tr class="<TMPL_IF privdata><TMPL_VAR NAME=rowb><TMPL_ELSE><TMPL_VAR NAME=rowa></TMPL_IF>">
     144<tr>
    146145<td class="center" colspan="2"><input type="submit" value="  Assign  "></td>
    147146</tr>
  • trunk/templates/confirm.tmpl

    r674 r687  
    66</div>
    77<TMPL_ELSE>
    8 <div class="heading">Please confirm</div>
    98<div class="indent">
    109
    1110<form method="POST" action="main.cgi" class="regular">
    1211<fieldset><legend class="noshow">&nbsp;</legend>
    13 <table class="regular" cellspacing="1" cellpadding="1">
     12<table class="regular altrows" cellspacing="1" cellpadding="1">
     13<tr class="heading"><td>Please confirm</td></tr>
    1414
    15 <tr class="row0">
     15<tr>
    1616<td>CIDR block to be allocated:</td>
    1717<td><TMPL_VAR NAME=cidr></td>
    1818</tr>
    1919
    20 <tr class="row1">
     20<tr>
    2121<td>Block allocation is taken from:</td>
    2222<TMPL_IF staticip>
     
    3131</tr>
    3232
    33 <tr class="row0">
     33<tr>
    3434<td>Reverse DNS:</td>
    3535<td>
     
    4545<table>
    4646<TMPL_LOOP name="r_iplist">
    47 <tr>
     47<tr class="revdata">
    4848<td><TMPL_VAR NAME=r_ip></td>
    4949<td><input class="host" name="host_<TMPL_VAR NAME=r_ip>" value="<TMPL_VAR NAME=iphost>"></td>
     
    6161</tr>
    6262
    63 <tr class="row1">
     63<tr>
    6464<td>City:</td>
    6565<td><TMPL_VAR NAME=city></td>
    6666</tr>
    6767
    68 <tr class="row0">
     68<tr>
    6969<td>Layer-2/demarc node:</td>
    7070<td><TMPL_VAR NAME=nodename></td>
    7171</tr>
    7272
    73 <tr class="row1">
     73<tr>
    7474<td>Allocation type:</td>
    7575<td><TMPL_VAR NAME=typefull></td>
    7676</tr>
    7777
    78 <tr class="row0">
     78<tr>
    7979<td>Customer ID:</td>
    8080<td><TMPL_VAR NAME=custid></td>
    8181</tr>
    8282
    83 <tr class="row1">
     83<tr>
    8484<td valign="top">Circuit ID:</td>
    8585<td><TMPL_VAR NAME=circid></td>
    8686</tr>
    8787
    88 <tr class="row0">
     88<tr>
    8989<td valign="top">Description/name:</td>
    9090<td><TMPL_VAR NAME=desc></td>
    9191</tr>
    9292
    93 <tr class="row1">
     93<tr>
    9494<td valign="top">Notes:</td>
    9595<td><TMPL_VAR NAME=notes></td>
     
    9797
    9898<TMPL_IF privdata>
    99 <tr class="row0">
     99<tr>
    100100<td>Restricted data:</td>
    101101<td><TMPL_VAR NAME=privdata></td>
     
    104104
    105105<!-- warn -->
    106 <tr class="<TMPL_IF privdata>row1<TMPL_ELSE>row0</TMPL_IF>">
     106<tr>
    107107<td class="center" colspan="2">
    108108<TMPL_UNLESS poollist><input type="hidden" name="alloc_from" value="<TMPL_VAR NAME=alloc_from>"></TMPL_UNLESS>
  • trunk/templates/delete.tmpl

    r638 r687  
    11<TMPL_IF webpath></TMPL_IF>
    2 <div class="heading">Please confirm removal of:</div>
    32<br>
    43<TMPL_VAR NAME=err>
     
    65<form action="main.cgi" method="POST" class="regular">
    76<fieldset><legend class="noshow">&nbsp;</legend>
    8 <table class="indent" cellspacing="1" cellpadding="1">
     7<table class="indent altrows" cellspacing="1" cellpadding="1">
     8<tr class="heading"><td>Please confirm removal of:</td></tr>
    99
    10 <tr class="row0">
     10<tr>
    1111<td>IP block:</td>
    1212<td><TMPL_VAR NAME=block></td>
    1313</tr>
    1414
    15 <tr class="row1">
     15<tr>
    1616<td>Reverse DNS pattern:</td>
    1717<td><TMPL_VAR NAME=rdns></td>
    1818</tr>
    1919
    20 <tr class="row0">
     20<tr>
    2121<td>Remove associated forward DNS entry?</td>
    2222<td><input type="checkbox" name="delforward"<TMPL_IF autodel> checked</TMPL_IF>></td>
    2323</tr>
    2424
    25 <tr class="row1">
     25<tr>
    2626<td>City:</td>
    2727<td><TMPL_VAR NAME=city></td>
    2828</tr>
    2929
    30 <tr class="row0">
     30<tr>
    3131<td>Type:</td>
    3232<td><TMPL_VAR NAME=disptype></td>
    3333</tr>
    3434
    35 <tr class="row1">
     35<tr>
    3636<td>Customer ID:</td>
    3737<td><TMPL_VAR NAME=custid></td>
    3838</tr>
    3939
    40 <tr class="row0">
     40<tr>
    4141<td>Circuit ID:</td>
    4242<td><TMPL_VAR ESCAPE=HTML NAME=circid></td>
    4343</tr>
    4444
    45 <tr class="row1">
     45<tr>
    4646<td valign="top">Description/Name:</td>
    4747<td><TMPL_VAR ESCAPE=HTML NAME=desc></td>
    4848</tr>
    4949
    50 <tr class="row0">
     50<tr>
    5151<td valign="top">Notes:</td>
    5252<td><TMPL_VAR NAME=notes></td>
     
    5454
    5555<TMPL_IF privdata>
    56 <tr class="row1">
     56<tr>
    5757<td valign="top">Restricted data:</td>
    5858<td><TMPL_VAR NAME=privdata></td>
     
    6060</TMPL_IF>
    6161
    62 <tr class="warning">
    63 <td colspan="2">
     62<tr>
     63<td colspan="2"><div class="warning">
    6464Warning: clicking confirm will remove this record entirely.
    6565<TMPL_IF delpool><br>Any IPs allocated from this pool will also be removed!</TMPL_IF>
     66</div>
    6667</td>
    6768</tr>
    6869
    69 <tr class="row<TMPL_IF privdata>0<TMPL_ELSE>1</TMPL_IF>">
     70<tr>
    7071<td class="center" colspan="2">
    7172<input type="button" value="Back" onclick="history.go(-1)"><input type="submit" value="Confirm">
  • trunk/templates/edit.tmpl

    r675 r687  
    11<TMPL_IF webpath></TMPL_IF>
    22<div class="indent">
    3 <div class="heading">Edit the information below</div>
    43
    54<table cellpadding="0" cellspacing="0">
     5
    66<tr>
    77<td>
     
    1414</TMPL_IF>
    1515
    16 <table cellspacing="1">
    17 
    18 <tr class="row0">
     16<table class="altrows" cellspacing="1">
     17<tr class="heading"><td>Edit the information below</td></tr>
     18
     19<tr>
    1920<td class=heading>IP block:</td>
    2021<td class="regular"><TMPL_VAR NAME=block></td>
    2122</tr>
    2223
    23 <tr class="row1">
     24<tr>
    2425<td class="heading">Reverse DNS:</td>
    2526<td class="regular">
     
    5657</tr>
    5758
    58 <tr class="row0">
     59<tr>
    5960<td class=heading>City:</td>
    6061<td class="regular">
     
    6768</tr>
    6869
    69 <tr class="row1">
     70<tr>
    7071<td class=heading>Type:</td>
    7172<td class=regular>
     
    8283</tr>
    8384
    84 <tr class="row0">
     85<tr>
    8586<td class=heading>Layer-2/demarc node:</td>
    8687<td class=regular>
     
    9899</tr>
    99100
    100 <tr class="row1">
     101<tr>
    101102<td class=heading>CustID:</td>
    102103<td class="regular">
     
    109110</tr>
    110111
    111 <tr class="row0">
     112<tr>
    112113<td class=heading>SWIPed?:</td>
    113114<td class=regular>
     
    124125</tr>
    125126
    126 <tr class="row1">
     127<tr>
    127128<td class=heading>Last modified:</td>
    128129<td class=regular><TMPL_VAR NAME=lastmod></td>
    129130</tr>
    130131
    131 <tr class="row0">
     132<tr>
    132133<td class="heading">Circuit ID:</td>
    133134<td class="regular">
     
    140141</tr>
    141142
    142 <tr class="row1">
     143<tr>
    143144<td class="heading">Description/Name:</td>
    144145<td class="regular">
     
    151152</tr>
    152153
    153 <tr class="row0">
     154<tr>
    154155<td class="heading" valign="top">Notes:</td>
    155156<td class="regular">
     
    162163
    163164<TMPL_IF nocling>
    164 <tr class="row1">
     165<tr>
    165166<td class="heading" valign="top">Restricted data:</td>
    166167<td class="regular">
     
    175176
    176177<TMPL_IF maychange>
    177 <tr class="row<TMPL_IF nocling>0<TMPL_ELSE>1</TMPL_IF>">
     178<tr>
    178179<td colspan="2" class="center">
    179180<input type="hidden" name="basetype" value="<TMPL_VAR NAME=basetype>">
     
    193194<form method="POST" action="main.cgi">
    194195<fieldset><legend class="noshow">&nbsp;</legend>
    195 <div class="row<TMPL_IF nocling><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>0<TMPL_ELSE>1</TMPL_IF></TMPL_IF>">
     196<div class="revdata">
    196197<input type="hidden" name="action" value="delete">
    197198<input type="hidden" name="block" value="<TMPL_VAR NAME=id>">
  • trunk/templates/index.tmpl

    r626 r687  
    11<br>
    22<div class="center">
    3 <table class="center" width="98%" cellspacing="0">
     3<table class="center altrows" width="98%" cellspacing="0">
    44<TMPL_IF masterlist>
    55<tr class="heading">
     
    1212</tr>
    1313<TMPL_LOOP NAME=masterlist>
    14 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
     14<tr>
    1515<td><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&amp;parent=<TMPL_VAR NAME=id>"><TMPL_VAR NAME=master></a></td>
    1616<td><TMPL_VAR NAME=vrf></td>
  • trunk/templates/listpool.tmpl

    r630 r687  
    1818</TMPL_IF>
    1919
    20 <table width="98%" cellspacing="0" class="center">
     20<table width="98%" cellspacing="0" class="center altrows">
    2121<tr>
    2222<td class="heading">IP</td>
     
    2828
    2929<TMPL_LOOP name=poolips>
    30 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
     30<tr>
    3131<td>
    3232<TMPL_IF delme>
  • trunk/templates/nodesearch.tmpl

    r519 r687  
    33Failed to retrieve node list: <TMPL_VAR NAME=errmsg>
    44<TMPL_ELSE>
    5 <div class="heading">Switch/tower search</div>
    65<form action="<TMPL_VAR NAME=webpath>/cgi-bin/search.cgi" method=POST>
    76<fieldset><legend class="noshow">&nbsp;</legend>
    8 <table cellspacing="1" cellpadding="2">
    9 <tr class="row0">
     7<table cellspacing="1" cellpadding="2" class="altrows">
     8<tr class="heading"><td>Switch/tower search</td></tr>
     9<tr>
    1010<td>Find customers connected through:</td>
    1111<td><select name="node">
     
    1616</tr>
    1717
    18 <tr class="row1">
     18<tr>
    1919<td colspan="2" align="center"><input type="submit" value="Find customers"></td>
    2020</tr>
  • trunk/templates/showsubs.tmpl

    r682 r687  
    1 <div class="tbltitle">Subnets in <TMPL_VAR NAME=block></div>
     1<div class="tbltitle">Subnets in <TMPL_VAR NAME=block>
     2(<a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=edit&amp;id=<TMPL_VAR NAME=self_id>&amp;basetype=b">Edit</a>)
     3</div>
     4
    25<TMPL_VAR NAME=addperm>
    36
    47<TMPL_IF contlist>
    5 <br>
    68<hr class="w30">
    79<div class="tbltitle">Containers</div>
    810<br>
    9 <table class="center" width="98%" cellspacing="0">
    10 <tr>
     11<table class="center altrows" width="98%" cellspacing="0">
     12<tr class="headrow">
    1113<td class="heading">Container block</td>
    1214<td class="heading">Location</td>
     
    1921
    2022<TMPL_LOOP NAME=contlist>
    21 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
     23<tr>
    2224<td><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=showsubs&amp;parent=<TMPL_VAR NAME=id>"><TMPL_VAR NAME=block></a></td>
    2325<td><TMPL_VAR NAME=city></td>
     
    3941<div class="tbltitle">Usage allocations</div>
    4042<br>
    41 <table width="98%" cellspacing="0" class="center">
     43<table width="98%" cellspacing="0" class="center altrows">
    4244<tr>
    4345<td class="heading">CIDR allocation</td>
     
    5052
    5153<TMPL_LOOP NAME=alloclist>
    52 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
     54<tr>
    5355<td>
    5456<a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=edit&amp;id=<TMPL_VAR NAME=id>&amp;basetype=b"><TMPL_VAR NAME=block></a>
     
    7476<fieldset><legend class="noshow">&nbsp;</legend>
    7577<input type=hidden name=action value="delete">
    76 <input type=hidden name=block value="<TMPL_VAR NAME=del_id>">
     78<input type=hidden name=block value="<TMPL_VAR NAME=self_id>">
    7779<input type=hidden name=basetype value="b">
    7880<input type=submit value=" Remove this block ">
     
    8890
    8991<TMPL_IF freelist>
    90 <table width="98%" cellspacing="0" class="center">
     92<table width="98%" cellspacing="0" class="center altrows">
    9193<tr>
    9294<td class="heading">CIDR block</td>
     
    9597
    9698<TMPL_LOOP name=freelist>
    97 <tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
     99<tr>
    98100<TMPL_IF newvrf><td colspan=2>vrf: <TMPL_VAR NAME=newvrf></td>
    99101<TMPL_ELSE>
  • trunk/templates/update.tmpl

    r634 r687  
    55</div>
    66<TMPL_ELSE>
    7 <div class="heading">Allocation info updated:</div>
    87
    9 <table class="indent" cellspacing="1" cellpadding="1">
     8<table class="indent altrows" cellspacing="1" cellpadding="1">
     9<tr class="heading"><td>Allocation info updated:</td></tr>
    1010
    11 <tr class="row0">
     11<tr>
    1212<td>IP<TMPL_UNLESS backpool> block</TMPL_UNLESS>:</td>
    1313<td><TMPL_VAR NAME=cidr></td>
    1414</tr>
    1515
    16 <tr class="row1">
     16<tr>
    1717<td>Reverse DNS pattern:</td>
    1818<td><TMPL_VAR NAME=rdns>
     
    2121</tr>
    2222
    23 <tr class="row0">
     23<tr>
    2424<td>City:</td>
    2525<td><TMPL_VAR NAME=city></td>
    2626</tr>
    2727
    28 <tr class="row1">
     28<tr>
    2929<td>Type:</td>
    3030<td><TMPL_VAR NAME=disptype></td>
    3131</tr>
    3232
    33 <tr class="row0">
     33<tr>
    3434<td>Layer-2/demarc node:</td>
    3535<td><TMPL_IF nodename><TMPL_VAR NAME=nodename><TMPL_ELSE>N/A</TMPL_IF></td>
    3636</tr>
    3737
    38 <tr class="row1">
     38<tr>
    3939<td>Customer ID:</td>
    4040<td><TMPL_VAR NAME=custid></td>
    4141</tr>
    4242
    43 <tr class="row0">
     43<tr>
    4444<td>SWIPed?:</td>
    4545<td><TMPL_VAR NAME=swip></td>
    4646</tr>
    4747
    48 <tr class="row1">
     48<tr>
    4949<td>Circuit ID:</td>
    5050<td><TMPL_VAR ESCAPE=HTML NAME=circid></td>
    5151</tr>
    5252
    53 <tr class="row0">
     53<tr>
    5454<td valign="top">Description/Name:</td>
    5555<td><TMPL_VAR ESCAPE=HTML NAME=desc></td>
    5656</tr>
    5757
    58 <tr class="row1">
     58<tr>
    5959<td valign="top">Notes:</td>
    6060<td><TMPL_VAR NAME=notes></td>
     
    6262
    6363<TMPL_IF privdata>
    64 <tr class="row0">
     64<tr>
    6565<td valign="top">Restricted data:</td>
    6666<td><TMPL_VAR NAME=privdata></td>
Note: See TracChangeset for help on using the changeset viewer.