Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v diff -u -r1.74 -r1.75 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 11 Sep 2024 06:15:46 -0000 1.74 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 20 Oct 2024 09:53:57 -0000 1.75 @@ -552,25 +552,27 @@ set switches [concat $doc_elements(switches0) $doc_elements(switches1)] if { [llength $switches] > 0 } { - append blocks_out "
Switches:
\n" + append blocks_out "
Switches:
\n" foreach switch $switches { - append blocks_out "
-$switch
" + set param_details "" + if {"required" in $flags($switch)} { + lappend param_details required + } else { + lappend param_details optional + } if {"boolean" in $flags($switch)} { - append blocks_out " (boolean)" + lappend param_details boolean } if { [info exists default_values($switch)] && $default_values($switch) ne "" } { - append blocks_out " (defaults to \"[ns_quotehtml $default_values($switch)]\")" + lappend param_details "defaults to \"[ns_quotehtml $default_values($switch)]\"" } - - if {"required" in $flags($switch)} { - append blocks_out " (required)" - } else { - append blocks_out " (optional)" - } - append blocks_out "" + append blocks_out \ + "
-$switch " \ + ([join $param_details {, }]) \ + "
" if { [info exists params($switch)] } { append blocks_out "
$params($switch)
" } @@ -579,22 +581,26 @@ } if { [llength $doc_elements(positionals)] > 0 } { - append blocks_out "
Parameters:
\n" + append blocks_out "
Parameters:
\n" foreach positional $doc_elements(positionals) { - append blocks_out "$positional" + set param_details "" if { [info exists default_values($positional)] } { if { $default_values($positional) eq "" } { - append blocks_out " (optional)" + lappend param_details "optional" } else { - append blocks_out " (defaults to \"$default_values($positional)\")" + lappend param_details "defaults to \"$default_values($positional)\"" } } + append blocks_out \ + "
$positional " \ + ([join $param_details {, }]) \ + "
" if { [info exists params($positional)] } { - append blocks_out " - $params($positional)" + append blocks_out $params($positional) } - append blocks_out "
\n" + append blocks_out "
\n" } - append blocks_out "
\n" + append blocks_out "
\n" }