Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-reporting
Commits
c88eb9fd
Commit
c88eb9fd
authored
Sep 02, 2019
by
adrtel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added table_header_p field render_row, in order to allow for properly
formatted THEAD+TH / TBODY tags in report tables
parent
1842a9c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
intranet-reporting-procs.tcl
tcl/intranet-reporting-procs.tcl
+24
-7
No files found.
tcl/intranet-reporting-procs.tcl
View file @
c88eb9fd
...
...
@@ -189,6 +189,7 @@ ad_proc im_report_render_cell {
{
-encoding
""
}
{
-output_format
"html"
}
{
-no_write_p 0
}
{
-table_header_p 0
}
}
{
Renders one cell via ns_write directly
into a report HTTP session
...
...
@@ -253,8 +254,13 @@ ad_proc im_report_render_cell {
set quoted_cell
[
im_report_quote_cell -encoding
$encoding
-output_format
$output
_format
$cell
]
switch
$output
_format
{
html - printer
{
set result
"<td
$td
_fields>
$quoted
_cell</td>
\n
"
}
html_header
{
set result
"<th><p><div style='float: left; position: relative; -moz-transform: rotate(270deg); -o-transform: rotate(270deg); -webkit-transform: rotate(315deg);'>
$quoted
_cell</div></p></th>
\n
"
}
html - printer
{
if
{
$table
_header_p
}
{
set result
"<th
$td
_fields>
$quoted
_cell</th>
\n
"
}
else
{
set result
"<td
$td
_fields>
$quoted
_cell</td>
\n
"
}
}
csv
{
set result
"
\"
$quoted
_cell
\"
;
$post
_csv"
}
default
{
set result
""
}
}
...
...
@@ -270,13 +276,19 @@ ad_proc im_report_render_row {
{
-encoding
""
}
{
-output_format
"html"
}
{
-upvar_level 0
}
{
-table_header_p 0
}
}
{
Renders one line of a report via ns_write directly
into a report HTTP session
}
{
switch
$output
_format
{
html - printer
{
ns_write
"<tr class=
$row
_class>
\n
"
}
html_header
{
ns_write
"<thead><tr class=
$row
_class>
\n
"
}
html - printer
{
if
{
$table
_header_p
}
{
ns_write
"<thead><tr class=
$row
_class>
\n
"
}
else
{
ns_write
"<tr class=
$row
_class>
\n
"
}
}
csv
{
}
}
...
...
@@ -286,12 +298,17 @@ ad_proc im_report_render_row {
set cmd
"set value
\"
$field
\"
"
set value
[
uplevel
$upvar
_level
$cmd
]
}
im_report_render_cell -encoding
$encoding
-output_format
$output
_format -cell
$value
-cell_class
$cell
_class
im_report_render_cell -
table_header_p
$table
_header_p -
encoding
$encoding
-output_format
$output
_format -cell
$value
-cell_class
$cell
_class
}
switch
$output
_format
{
html - printer
{
ns_write
"</tr>
\n
"
}
html_header
{
ns_write
"</tr></thead>
\n
"
}
html - printer
{
if
{
$table
_header_p
}
{
ns_write
"</tr></thead>
\n
"
}
else
{
ns_write
"</tr>
\n
"
}
}
csv
{
ns_write
"
\n
"
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment