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 -N -r1.29 -r1.30 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 15 Jun 2015 11:15:55 -0000 1.29 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 19 Jun 2015 19:49:02 -0000 1.30 @@ -167,12 +167,12 @@ } else { set preview "" } - append out "
Delivered as $mime_type$preview\n" + append out "
\n" return $out } if { [catch { array set doc_elements [api_read_script_documentation $path] } error] } { - append out "Delivered as $mime_type$preview
Unable to read $path: [ns_quotehtml $error]\n" + append out "
\n" return $out } @@ -188,9 +188,9 @@ append out "Unable to read $path: [ns_quotehtml $error]
" if { [info exists doc_elements(main)] } { - append out [lindex $doc_elements(main) 0] + append out" - return $out } @@ -1296,7 +1318,7 @@ } { set linkList [list] - set filename "$::acs::rootdir/$path" + set filename $::acs::rootdir/$path set path_dirname [file dirname $path] set file_dirname [file dirname $filename] set file_rootname [file rootname [file tail $filename]] @@ -1310,7 +1332,7 @@ foreach file $files { lappend linkList [list \ filename $file \ - link "content-page-view?source_p=1&path=[ns_urlencode "$path_dirname/[file tail $file]"]" \ + link "content-page-view?source_p=1&path=[ns_urlencode $path_dirname/[file tail $file]]" \ ] } Index: openacs-4/packages/acs-api-browser/www/package-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/package-view.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-api-browser/www/package-view.adp 27 Oct 2014 16:38:59 -0000 1.7 +++ openacs-4/packages/acs-api-browser/www/package-view.adp 19 Jun 2015 19:49:02 -0000 1.8 @@ -1,15 +1,19 @@[lindex $doc_elements(main) 0] } else { - append out "Does not contain a contract." + append out "
Does not contain a contract." } append out "
\n" # XXX: This does not work at the moment. -bmq @@ -250,15 +250,15 @@ return -code error "Only text/html documentation is currently supported" } - set out "
[file tail $path]
" + set out "[ns_quotehtml [file tail $path]]
" if { [nsv_exists api_library_doc $path] } { array set doc_elements [nsv_get api_library_doc $path] - append out "\n" + append out "" - append out "\n" @@ -454,89 +457,109 @@ append out "\n" append out [lindex $doc_elements(main) 0] append out "
\n" - append out "
\n" append out "- Location:\n
- $path\n" + append out "
- Location:\n
- [ns_quotehtml $path]\n" if { [info exists doc_elements(creation-date)] } { append out "
- Created:\n
- [lindex $doc_elements(creation-date) 0]\n" } @@ -269,7 +269,10 @@ } } if { [info exists doc_elements(cvs-id)] } { - append out "
- CVS Identification:\n
[ns_quotehtml [lindex $doc_elements(cvs-id) 0]]
\n" + append out [subst { +- CVS Identification: +
[ns_quotehtml [lindex $doc_elements(cvs-id) 0]]
+ }] } append out "\n" } - append out "[lindex $doc_elements(main) 0]\n
\n
\n" + append out "
[lindex $doc_elements(main) 0]\n
\n" + set haveBlocks [expr { + [info exists doc_elements(param)] + || [llength $doc_elements(switches)] > 0 + || [llength $doc_elements(positionals)] > 0 + || [info exists doc_elements(option)] + || [info exists doc_elements(return)] + || [info exists doc_elements(error)] + || [info exists doc_elements(author)] + || [info exists doc_elements(creation-date)] + || [info exists doc_elements(change-log)] + || [info exists doc_elements(cvs-id)] + || [info exists doc_elements(see)] + }] + if {$haveBlocks} { + append out "
\n" - if { [info exists doc_elements(param)] } { - foreach param $doc_elements(param) { - if { [regexp {^([^ \t\n]+)[ \t\n]+(.*)$} $param "" name value] } { - set params($name) $value + if { [info exists doc_elements(param)] } { + foreach param $doc_elements(param) { + if { [regexp {^([^ \t\n]+)[ \t\n]+(.*)$} $param "" name value] } { + set params($name) $value + } } } - } - if { [llength $doc_elements(switches)] > 0 } { - append out "
\n" } - - if { [info exists doc_elements(error)] } { - append out "- Switches:
- \n" - } - - if { [llength $doc_elements(positionals)] > 0 } { - append out "
\n" - foreach switch $doc_elements(switches) { - append out "
- -$switch" - if {"boolean" in $flags($switch)} { - append out " (boolean)" - } - - if { [info exists default_values($switch)] - && $default_values($switch) ne "" - } { - append out " (defaults to
\"[ns_quotehtml $default_values($switch)]\"
)" - } - - if {"required" in $flags($switch)} { - append out " (required)" - } else { - append out " (optional)" + if { [llength $doc_elements(switches)] > 0 } { + append out "- Switches:
- \n" } - append out "
\n" + foreach switch $doc_elements(switches) { + append out "
- -$switch" + if {"boolean" in $flags($switch)} { + append out " (boolean)" + } + + if { [info exists default_values($switch)] + && $default_values($switch) ne "" + } { + append out " (defaults to
" + if { [info exists params($switch)] } { + append out "\"[ns_quotehtml $default_values($switch)]\"
)" + } + + if {"required" in $flags($switch)} { + append out " (required)" + } else { + append out " (optional)" + } + append out "- $params($switch)
" + } } - append out "" - if { [info exists params($switch)] } { - append out "- $params($switch)
" - } + append out "- Parameters:
- \n" - foreach positional $doc_elements(positionals) { - append out "$positional" - if { [info exists default_values($positional)] } { - if { $default_values($positional) eq "" } { - append out " (optional)" - } else { - append out " (defaults to
\"$default_values($positional)\"
)" + + if { [llength $doc_elements(positionals)] > 0 } { + append out "- Parameters:
- \n" + foreach positional $doc_elements(positionals) { + append out "$positional" + if { [info exists default_values($positional)] } { + if { $default_values($positional) eq "" } { + append out " (optional)" + } else { + append out " (defaults to
\n" } - append out "\n" - } - + - # @option is used in template:: and cms:: (and maybe should be used in some other - # things like ad_form which have internal arg parsers. although an option - # and a switch are the same thing, just one is parsed in the proc itself rather than - # by ad_proc. + # @option is used in template:: and cms:: (and maybe should be used in some other + # things like ad_form which have internal arg parsers. although an option + # and a switch are the same thing, just one is parsed in the proc itself rather than + # by ad_proc. - if { [info exists doc_elements(option)] } { - append out "Options:\"$default_values($positional)\"
)" + } } + if { [info exists params($positional)] } { + append out " - $params($positional)" + } + append out "
\n" } - if { [info exists params($positional)] } { - append out " - $params($positional)" - } - append out "
\n" + append out "" - foreach param $doc_elements(option) { - if { [regexp {^([^ \t]+)[ \t](.+)$} $param "" name value] } { - append out "
" - } + + + if { [info exists doc_elements(return)] } { + append out "- -$name
- $value
" + if { [info exists doc_elements(option)] } { + append out "Options:" + foreach param $doc_elements(option) { + if { [regexp {^([^ \t]+)[ \t](.+)$} $param "" name value] } { + append out "
" } - append out "- -$name
- $value
" + } } + append out "- Returns:
- [join $doc_elements(return) "
\n" + } + if { [info exists doc_elements(error)] } { + append out "
"]- Error:
- [join $doc_elements(error) "
\n" + } - if { [info exists doc_elements(return)] } { - append out "
"]- Returns:
- [join $doc_elements(return) "
\n" + append out [::apidoc::format_common_elements doc_elements] + + append out "
"]- Error:
- [join $doc_elements(error) "
\n" - } - - append out [::apidoc::format_common_elements doc_elements] - + + + if { $source_p } { if {[parameter::get_from_package_key \ -package_key acs-api-browser \ @@ -607,9 +630,8 @@ } # No "see also" yet. + append out "
"]
- @@ -22,7 +26,7 @@@procs_files.path@ +@procs_files.path@ @procs_files.first_sentence@
- @@ -48,7 +52,7 @@@procedures.proc@ +@procedures.proc@ @procedures.first_sentence@ - @content_pages.indentation;noquote@ + @content_pages.indentation;noquote@ @content_pages.name@ Index: openacs-4/packages/acs-api-browser/www/procs-file-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/procs-file-view.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-api-browser/www/procs-file-view.adp 27 Oct 2014 16:39:00 -0000 1.9 +++ openacs-4/packages/acs-api-browser/www/procs-file-view.adp 19 Jun 2015 19:49:02 -0000 1.10 @@ -1,11 +1,16 @@ @title;noquote@ @context;noquote@ ++ + @dimensional_slider;noquote@ @library_documentation;noquote@ -
+
Procedures in this file
@@ -19,7 +24,7 @@Index: openacs-4/packages/acs-api-browser/www/procs-file-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/procs-file-view.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-api-browser/www/procs-file-view.tcl 14 Jun 2015 00:04:21 -0000 1.5 +++ openacs-4/packages/acs-api-browser/www/procs-file-view.tcl 19 Jun 2015 19:49:02 -0000 1.6 @@ -35,10 +35,10 @@ if {![file readable $::acs::rootdir/$path] || [file isdirectory $::acs::rootdir/$path]} { if {[info exists version_id]} { set kind procs - set href [ad_conn package_url]/package-view?[export_vars {version_id {kind procs}}] - set link [subst { -
+ @proc_doc_list.doc;noquote@ @proc_doc_list.doc;noquote@
Go back to Package Documentation.}] + set href [export_vars -base [ad_conn package_url]/package-view {version_id {kind procs}}] + set link [subst {
Go back to Package Documentation.}] } else { - set link [subst {
Go back to API Browser.}] + set link [subst {
Go back to API Browser.}] } ad_return_warning "No such library file" [subst { The file '$path' was not found. Maybe the url contains a typo. @@ -71,7 +71,7 @@ where version_id = :version_id } if {[info exists pretty_name]} { - lappend context [list "package-view?version_id=$version_id" "$pretty_name $version_name"] + lappend context [list [export_vars -base package-view {version_id}] "$pretty_name $version_name"] } } Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl,v diff -u -N -r1.43 -r1.44 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 27 Oct 2014 16:39:32 -0000 1.43 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs.tcl 19 Jun 2015 19:52:03 -0000 1.44 @@ -436,12 +436,17 @@ set start_date_url [subst $url_template] # Create the header - append return_html " -
-
Day of Week Date Start Time End Time " + append return_html [subst { ++
+ Day of Week +Date +Start Time +End Time + }] if {$real_order_by ne "item_type"} { - append return_html "Type " + append return_html [subst {Type }] } @@ -475,7 +480,7 @@ } else { set item_type_for_title $item_type } - append return_html "\n" + append return_html [subst { $item_type_for_title }] set flip 0 } Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 27 Oct 2014 16:39:32 -0000 1.25 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-procs.tcl 19 Jun 2015 19:52:03 -0000 1.26 @@ -445,16 +445,16 @@ set text [string toupper $viewlink 0] if { $viewname == $view } { # current view - append result " $item_type_for_title - $text - - " + append result [subst {+ $text + + }] } else { - append result "- - $text - - " + append result [subst {+ + $text + + }] } } @@ -507,27 +507,30 @@ set curr_year [clock format $now -format "%Y"] - append result " + append result [subst {- - -
" + + +
+ }] # Serve arrow link to prev year if it leads to legal date if {$prev_year_legal_p != 0} { - append result " - - " + append result [subst { + + + }] } append result " $curr_year" # Serve arrow to next year if it leads to a legal date if {$next_year_legal_p != 0} { - append result " - - " + append result [subst { + + + }] } append result " @@ -571,26 +574,29 @@ } } - append results " - - -
" + append results [subst { + + +
- + }] # Output link to previous month only if it's legal if {$prev_month_legal_p != 0} { - append results " - - " + append results [subst { + + + }] } append results " $curr_month" # Output link to next month only if it's a legal month if {$next_month_legal_p != 0} { - append results " - - " + append results [subst { + + + }] } append results " @@ -688,13 +694,15 @@ \n" } else { set target_date [clock format \ - [clock scan "[expr {$i-$curr_month}] month" -base $now] -format "%Y-%m-%d"] + [clock scan "[expr {$i-$curr_month}] month" -base $now] \ + -format "%Y-%m-%d"] - append output " + append output [subst {- - $month - \n" + + $month + + }] } } @@ -720,11 +728,12 @@ append output "$year \n" } else { - append output " + append output [subst {- - $year - \n" + + $year + + }] } } @@ -738,15 +747,18 @@+
" set days_of_week [list S M T W T F S] foreach day_of_week $days_of_week { - append output " $day_of_week \n" + append output [subst { +$day_of_week + + }] } append output "" @@ -782,22 +794,24 @@ } if {$before_month_p || $after_month_p} { - append output " - - - $day_number - " + append output [subst { ++ + $day_number + + }] } elseif {$julian_date == $julian_date_today} { append output "$day_number " } else { - append output " -- - $day_number - " + append output [subst { ++ + $day_number + + }] } incr day_of_week @@ -832,19 +846,20 @@ if { $view eq "day" && [dt_sysdate] == $date } { append output "Today" } else { - append output " - Today " + append output [subst {Today }] } - append output " + append output [subst { is [dt_ansi_to_pretty] -
-