Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#3 closed enhancement (fixed)

HTML output cleanup

Reported by: Kris Deugau Owned by:
Priority: critical Milestone: 3.0
Version: Keywords:
Cc:

Description (last modified by Kris Deugau)

Convert all HTML output to HTML 4.01 strict (or closest relative) and HTML::Template

Change History (58)

comment:1 by Kris Deugau, 15 years ago

Priority: majorcritical

comment:2 by Kris Deugau, 15 years ago

(In [413]) /trunk

Migrate body colour and font base defs to CSS, make <head>
sections more consistent. See #3.

Look for local.css so admins can override the default
colours. local.css is ignored on the working root as it
should be entirely a local file. See #14.

comment:3 by Kris Deugau, 14 years ago

Milestone: 3.0

comment:4 by Kris Deugau, 14 years ago

(In [446]) Create branch for HTML cleanup (see #3) and CGI normalization/cleanup
(see #15). Changes for one will affect the other; better to handle
them in the same workflow.

comment:5 by Kris Deugau, 14 years ago

(In [449]) /branches/htmlform

Remove printFooter from CommonWeb.pm
Add HTML::Template to main.cgi, admin.cgi, and search.cgi
Convert footer.inc to templates/footer.tmpl, and normalize
output for three scripts above
See #3.

comment:6 by Kris Deugau, 14 years ago

(In [450]) /branches/htmlform

Added missing index and footer templates
Update default CSS with definitions for footer, alternate-row colours
Have main.cgi look for a template matching $webvar{action}
Convert main summary page content to template
See #3.

comment:7 by Kris Deugau, 14 years ago

Description: modified (diff)

As per notes and thoughts at:

http://www.hixie.ch/advocacy/xhtml
http://hsivonen.iki.fi/doctype/

don't bother with XHTML (since it's guaranteed to be mishandled somewhere), just go with HTML 4.01 strict.

comment:8 by Kris Deugau, 14 years ago

(In [451]) /branches/htmlform

Move Javascript from the header into its own file
Convert index page (master block summary) to template
Convert header to template, use template header in main.cgi
and search.cgi - going to leave admin.cgi out for now
Update HTML in header, index, footer to HTML 4.01 strict
See #3.

comment:9 by Kris Deugau, 14 years ago

(In [456]) /branches/htmlform

Convert assign.html to template; page seems to still have
validation problems. See #3.

comment:10 by Kris Deugau, 14 years ago

(In [457]) /branches/htmlform

Finally got "assign IPs" template page to validate in all 3
current possible modes (normal, freeblock, contained freeblock).
See #3.

comment:11 by Kris Deugau, 14 years ago

(In [458]) /branches/htmlform

Adjust convention for HTML::Template usage - don't name TMPL_IF or
TMPL_UNLESS blocks. See #3, sort of - doesn't affect HTML output.

comment:12 by Kris Deugau, 14 years ago

(In [459]) /branches/htmlform

Convert "new city" miniscript and page to template, move the "reload
parent" JavaScript fragment into widgets.js. See #3.
Update calls from assign.tmpl and admin.cgi to point to newcity.cgi.

comment:13 by Kris Deugau, 14 years ago

(In [460]) /branches/htmlform

Convert "new node" miniscript and page to template. See #3.
Update call from assign.tmpl to point to newcity.cgi.
Clean up errors and warnings from newnode.cgi in HTTPD error
log. See #31. (Also note newcity.cgi changes in r459 have
the same cleanups.)

comment:14 by Kris Deugau, 14 years ago

(In [461]) /branches/htmlform

Checkpoint - confirm.html almost completely converted to template.
Still need to fix up allocfrom (see ##fixme at line 790 in main.cgi).
See #3.

comment:15 by Kris Deugau, 14 years ago

(In [463]) /branches/htmlform

Validation nitpick fix in assign.tmpl - also fixes missing field
name on alloctype list. <headdesk>
Convert new assignment result page to template.
Add missing error handling, missing IP pool selection on confirm.tmpl
Create footer template object earlier to allow pushing bits into
it during processing
Prepare to move initial output further down execution to prepare for
proper error handling in subs
Fix probable bug introduced with r456 where the "Routing" type isn't
available when it should be. Maybe. Probably.
Error messages for sub insertAssign() and confirmAssign could arguably
be further moved into the templates, but the complexity of the template
would go *way* up with little or no benefit.
See #3.

comment:16 by Kris Deugau, 14 years ago

(In [464]) /branches/htmlform

Nitpick microfix in footer.tmpl
See #3.

comment:17 by Kris Deugau, 14 years ago

(In [465]) /branches/htmlform

Convert showmaster page to template.
See #3.

comment:18 by Kris Deugau, 14 years ago

(In [466]) /branches/htmlform

Give up on proper spelling of "centre" in CSS class names and
defs - browsers only understand an alignment of "center".
Adjust width of some <hr>'s
Visual row0/row1 classes got switched somehow, somewhere
Remove legacy "color0/color1/color2" row class defs
Convert showrouted to template
See #3.

comment:19 by Kris Deugau, 14 years ago

(In [467]) /branches/htmlform

Add missing showrouted.tmpl from r466. See #3.

comment:20 by Kris Deugau, 14 years ago

(In [469]) /branches/htmlform

Checkpoint - convert editDisplay.html to template
Still need to finish type dropdown
Still need to clean up formatting, tr/div/form nesting/classes,
etc around buttons and restricted data
See #3

comment:21 by Kris Deugau, 14 years ago

(In [470]) /branches/htmlfrom

Block edit page should be complete and even valid.
Still has some slight fishyness with column edges not aligned due
to stupid "can't start a form in between table rows" validation spec
idiocy. (<table><form><tr>...</tr></form><form><tr>...</tr></form></table>
is not valid for strict HTML 4.01.)
See #3.

comment:22 by Kris Deugau, 14 years ago

(In [471]) /branches/htmlform

Convert listpool to template. See #3.

comment:23 by Kris Deugau, 14 years ago

(In [472]) /branches/htmlform

Convert addmaster to template. See #3.

comment:24 by Kris Deugau, 14 years ago

(In [473]) /branches/htmlform

Convert newmaster to template. See #3.

comment:25 by Kris Deugau, 14 years ago

(In [474]) /branches/htmlform

Fix buglet in showmaster.tmpl that prevented block from being
passed on for deletion
Fix formatting buglet in showrouted.tmpl
Convert confirm-delete to template.
See #3.

comment:26 by Kris Deugau, 14 years ago

(In [475]) /branches/htmlform

Checkpoint - convert updated.html to template. See #3.

comment:27 by Kris Deugau, 14 years ago

(In [476]) /branches/htmlform

Convert finalDelete to template
Add missing node info on update page
Fix backlink on update page
Tweak edit page to use the right name for the node dropdown
See #3.

comment:28 by Kris Deugau, 14 years ago

(In [477]) /branches/htmlform

Convert nodesearch to template. See #3.

comment:29 by Kris Deugau, 14 years ago

(In [478]) /branches/htmlfrom

Set a global variable so we can move the site to any level of
web directory. See #17 - note this is an internal autoconfiguration
that shouldn't need to be exposed.
Make code/template structure for setting row colours in tables more
consistent - also tweak search.cgi so it spits out live colour
classes. See #3.

comment:30 by Kris Deugau, 14 years ago

(In [479]) /branches/htmlform

Convert initial DB connection error output to a sane page. Could arguably provide
space for this (and other) errors on all normal pages. (See #3).
This allows us to:

  • Remove editError sub in main.cgi
  • Remove printHeader sub in CommonWeb.pm (see #15, #26)

Removed duplicate "exit if we get this far"
Tweak IPDB::finish so it doesn't spit a fatal error when called with a null database handle

comment:31 by Kris Deugau, 14 years ago

(In [481]) /branches/htmlform

Update search.cgi to use a few templates (see #3 - note search.cgi NOT completely
updated for HTML only in templates), remove search.cgi references to printError
from CommonWeb.pm (see #15, #26).

comment:32 by Kris Deugau, 14 years ago

(In [482]) /branches/htmlform

Add templates for search.cgi in their own subdirectory (see #3)

comment:33 by Kris Deugau, 14 years ago

(In [483]) /branches/htmlform

Start converting admin.cgi to templates (to make removal of references to CommonWeb.pm
subs simpler; see #3, #15, #26)
Completed:

  • Main page
  • ACL error page
  • rWHOIS customer data editing - list, edit new/update, confirm update

comment:34 by Kris Deugau, 14 years ago

(In [484]) /branches/htmlform

Continue updating admin.cgi for HTML templates (See #3)
Completed:

  • Touch master timestamp
  • User management (add/remove/change-acl)

Partially stubbed:

  • List and edit pools

comment:35 by Kris Deugau, 14 years ago

(In [487]) /branches/htmlform

Finish IP pool tweaking
Complete email notice configuration
Finish most of block allocation
Add generic error page
Fix admin header with reference to Javascript bits
See #3, #15, #26

comment:36 by Kris Deugau, 14 years ago

(In [488]) /branches/htmlform

Removed a few stray obsolete subs and blocks. admin.cgi pretty much done conversion
to HTML::Template. Validation failures are limited to the user ACL table and
block-tweaking table, both of which require complete forms which only span a single
row of the table. See #3

comment:37 by Kris Deugau, 14 years ago

(In [490]) /branches/htmlform

Remove ref to printAndExit from allocate.pl (irrelevant anyway since it's not a web
tool). See #3, #15, #26.

comment:38 by Kris Deugau, 14 years ago

(In [491]) /branches/htmlform

Convert dangling DB error to template in admin.cgi; remove all refs to printAndExit().
See #3, #15, #26.

comment:39 by Kris Deugau, 14 years ago

(In [493]) /branches/htmlform

Convert dangling direct error print to template parameter (can't load node list for
search). See #3.
Remove dangling obsolete commented code fragments and subs (printRow and startTable).
See #3, #26.

comment:40 by Kris Deugau, 14 years ago

(In [494]) /branches/htmlform

Template fixup to match code fix in r493. See #3.

comment:41 by Kris Deugau, 14 years ago

(In [495]) /branches/htmlform

Converted main.cgi "invalid action" into template. See #3.
"Cleaned up" error messages for an invalid action, removed call to printAndExit(). See #15, #26.

comment:42 by Kris Deugau, 14 years ago

(In [496]) /branches/htmlform

Add missing template from r495 converting main.cgi's "invalid action" output
to a template. See #3.

comment:43 by Kris Deugau, 13 years ago

(In [497]) /branches/htmlform

Fix up main.cgi

  • it got contaiminated with the template location for admin.cgi
  • tweak a fixme comment

See #3.

comment:44 by Kris Deugau, 13 years ago

(In [498]) /branches/htmlform

Clean up alloctypes.html and help.html (validation, formatting consistency)
See #3.

comment:45 by Kris Deugau, 13 years ago

(In [499]) /branches/htmlform

Convert subnet calculator to HTML::Template, clean up output
to validate and rely more on CSS
See #3.

comment:46 by Kris Deugau, 13 years ago

(In [500]) /branches/htmlform

Minor HTML formatting/validation fix on search results template
See #3.

comment:47 by Kris Deugau, 13 years ago

(In [501]) /branches/htmlform

Remove obsolete templates, and references to same
See #3.

comment:48 by Kris Deugau, 13 years ago

(In [505]) /branches/htmlform

Clean up final reference to printError(), and remove all references
(commented or otherwise) to CommonWeb.pm. Remove the file itself. See #15.
Tweak block-update template for error handling. See #3.

comment:49 by Kris Deugau, 12 years ago

(In [511]) /branches/htmlform

Final prep for merge back to trunk.

  • Remove lockin on /ip/ web path as with /branches/stable r507.
  • Fix a buglet with the body text color.
  • Remove the lingering header and footer template files

See #3.

comment:50 by Kris Deugau, 12 years ago

(In [512]) /branches/htmlform

Catch nuisance issue with templates that didn't previously include
the web path; now with it being set we need to put a placeholder
in so we don't spit HTML::Template errors.
See #3.

comment:51 by Kris Deugau, 12 years ago

(In [513]) /branches/htmlform

Finally dug up a least-nasty way to effectively get rid of the
useless <legend> tag (required in a <fieldset>, in turn required
in a <form>, if you want to be valid HTML 4.01 Strict).
See #3.

comment:52 by Kris Deugau, 12 years ago

(In [514]) /branches/htmlform

Fix bug introduced with last update to widgets.js; on pages
where the URL is ".../cgi-bin/main.cgi?..." the webpath function
would mistakenly include the cgi-bin part.
See #3.

comment:53 by Kris Deugau, 12 years ago

(In [516]) /branches/htmlform

Update and shuffle the file listings in the Makefile to match all
the new templates. MANIFEST is now constructed from the other
lists, rather duplicating things.
Make sure "make install" actually installs all current files.
See #3.

comment:54 by Kris Deugau, 12 years ago

Resolution: fixed
Status: newclosed

(In [517]) /trunk

Finally merge conversion to HTML::Template from /branches/htmlform

  • Node "hack" showed conflict due to having been added to all branches in parallel
  • editDisplay.html was apparently changed enough that the merged delete caused an irrelevant conflict

Closes #3.

comment:55 by Kris Deugau, 12 years ago

(In [525]) /trunk

Found the HTML::Template knob to twist to allow listMaster() etc to
pass back '<NONE>' instead of '&lt;NONE&gt;'. See #34, #3 (sort of).

comment:56 by Kris Deugau, 12 years ago

(In [536]) /trunk

Clean up and move SQL for post-update backlink to IPDB.pm. See #34.
Also rename getParent() to subParent() to fit in with ipParent() and
blockParent().

Fix a couple "Use of uninitialized..." log-noise bugs. See #31.

Move some HTML-entity-escaping into the template, and shuffle lines
munging the notes and restricted data on post-update value display
so we can properly munge in <br> for \n. Doesn't seem to be a way
to plug that into HTML::Template. :( See #3.

comment:57 by Kris Deugau, 12 years ago

(In [537]) /trunk

Fix silly mistake in showrouted.tmpl where a critical value was
hardcoded instead of being a suitable TMPL_VAR. See #3.

comment:58 by Kris Deugau, 12 years ago

(In [538]) /trunk

Remove SQL in favour of calls to existing subs on delete confirmation
page. See #34.
Tweak template to remove a stale form variable and tighten
HTML-entities escaping on delete confirmation page. See #3.

Note: See TracTickets for help on using tickets.