Changeset 245


Ignore:
Timestamp:
05/05/05 11:15:21 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Add "Last modified" timestamp display to edit page

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r244 r245  
    11131113  # because I'm lazy, we'll try to make the SELECT's bring out identical)ish) data
    11141114  if ($webvar{block} =~ /\/32$/) {
    1115     $sql = "select ip,custid,type,city,circuitid,description,notes from poolips where ip='$webvar{block}'";
     1115    $sql = "select ip,custid,type,city,circuitid,description,notes,modifystamp from poolips where ip='$webvar{block}'";
    11161116  } else {
    1117     $sql = "select cidr,custid,type,city,circuitid,description,notes,swip from allocations where cidr='$webvar{block}'"
     1117    $sql = "select cidr,custid,type,city,circuitid,description,notes,modifystamp,swip from allocations where cidr='$webvar{block}'"
    11181118  }
    11191119
     
    11741174    $html =~ s/\$\$NOTES\$\$/$data[6]/g;
    11751175  }
     1176  my ($lastmod,undef) = split /\s+/, $data[7];
     1177  $html =~ s/\$\$LASTMOD\$\$/$lastmod/g;
    11761178
    11771179## Hack time!  SWIP isn't going to stay, so I'm not going to integrate it with ACLs.
     
    11791181  $html =~ s/\$\$SWIP\$\$/N\/A/;
    11801182} else {
    1181   my $tmp = (($data[7] eq 'n') ? '<input type=checkbox name=swip>' :
     1183  my $tmp = (($data[8] eq 'n') ? '<input type=checkbox name=swip>' :
    11821184        '<input type=checkbox name=swip checked=yes>');
    11831185  $html =~ s/\$\$SWIP\$\$/$tmp/;
    11841186}
     1187
     1188  # Allows us to "correctly" colour backgrounds in table
     1189  my $i=1;
    11851190
    11861191  # More ACL trickery - we can live with forms that don't submit,
     
    11881193  # can't leave the submit buttons there.
    11891194  my $updok = '';
    1190   my $i=2;
    11911195  if ($IPDBacl{$authuser} =~ /c/) {
    11921196    $updok = qq(<tr class="color$i"><td colspan=2 class=regular><div class="center">).
    11931197        qq(<input type="submit" value=" Update this block " class="regular">).
    11941198        "</div></td></tr></form>\n";
    1195     $i--;
     1199    $i++;
    11961200  }
    11971201  $html =~ s/\$\$UPDOK\$\$/$updok/g;
  • branches/stable/editDisplay.html

    r244 r245  
    1616<tr class="color2"><td class=heading>SWIPed?:</td><td class=regular>$$SWIP$$</td></tr>
    1717
    18 <tr class="color1"><td class="heading">Circuit ID:</td><td class="regular">$$CIRCID$$</td></tr>
     18<tr class="color1"><td class=heading>Last modified:</td><td class=regular>$$LASTMOD$$</td></tr>
    1919
    20 <tr class="color2"><td class="heading">Description/Name:</td><td class="regular">$$DESC$$</td></tr>
     20<tr class="color2"><td class="heading">Circuit ID:</td><td class="regular">$$CIRCID$$</td></tr>
    2121
    22 <tr class="color1"><td class="heading" valign="top">Notes:</td><td class="regular">$$NOTES$$</td></tr>
     22<tr class="color1"><td class="heading">Description/Name:</td><td class="regular">$$DESC$$</td></tr>
     23
     24<tr class="color2"><td class="heading" valign="top">Notes:</td><td class="regular">$$NOTES$$</td></tr>
    2325
    2426$$UPDOK$$
Note: See TracChangeset for help on using the changeset viewer.