| | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| | 2 | "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"> |
| | 3 | <html> |
| | 4 | <head> |
| | 5 | <?cs if:project.name ?> |
| | 6 | <title><?cs var:project.name?><?cs if:title ?>: <?cs var:title ?><?cs |
| | 7 | /if ?> - Trac</title> |
| | 8 | <?cs else ?> |
| | 9 | <title>Trac: <?cs var:title ?></title> |
| | 10 | <?cs /if ?> |
| | 11 | <style type="text/css"> |
| | 12 | @import url("<?cs var:htdocs_location ?>css/trac.css"); |
| | 13 | @import url("<?cs var:htdocs_location ?>css/report.css"); |
| | 14 | <?cs include "site_css.cs" ?> |
| | 15 | </style> |
| | 16 | </head> |
| | 17 | <body> |
| | 18 | <div id="page-content"> |
| | 19 | <hr class="hide"/> |
| | 20 | <div id="main"> |
| | 21 | <div id="main-content"> |
| | 22 | <?cs if report.message ?> |
| | 23 | <div class="error"><?cs var report.message ?></div> |
| | 24 | <?cs else ?> |
| | 25 | <?cs def:report_hdr(header) ?> |
| | 26 | <?cs if $header ?> |
| | 27 | <?cs if idx > 0 ?> |
| | 28 | </table> |
| | 29 | <?cs /if ?> |
| | 30 | <hr class="hide"/> |
| | 31 | <h2 class="report-hdr"><?cs var:header ?></h2> |
| | 32 | <?cs /if ?> |
| | 33 | <?cs if $report.id == -1 ?> |
| | 34 | <table class="report-list-reports" cellspacing="0" cellpadding="0"> |
| | 35 | <?cs else ?> |
| | 36 | <table class="report-list" cellspacing="0" cellpadding="0"> |
| | 37 | <?cs /if ?> |
| | 38 | <tr> |
| | 39 | <?cs set numcols = #0 ?> |
| | 40 | <?cs each header = report.headers ?> |
| | 41 | <?cs if $header.fullrow ?> |
| | 42 | </tr><tr><th class="header-left" colspan="100"><?cs var:header ?></th> |
| | 43 | <?cs else ?> |
| | 44 | <?cs if $report.sorting.enabled ?> |
| | 45 | <?cs set sortValue = '' ?> |
| | 46 | <?cs if $header.asc == '1' ?> |
| | 47 | <?cs set sortValue = '?sort='+$header.real+'&asc=0' ?> |
| | 48 | <?cs else ?> |
| | 49 | <?cs set sortValue = '?sort='+$header.real+'&asc=1' ?> |
| | 50 | <?cs /if ?> |
| | 51 | <?cs if $header ?> |
| | 52 | <th class="header-left"><a href="<?cs var:sortValue ?>"><?cs var:header ?></a></th> |
| | 53 | <?cs /if ?> |
| | 54 | <?cs elif $header ?> |
| | 55 | <th class="header-left"><?cs var:header ?></th> |
| | 56 | <?cs /if ?> |
| | 57 | |
| | 58 | <?cs if $header.breakrow ?> |
| | 59 | </tr><tr> |
| | 60 | <?cs /if ?> |
| | 61 | <?cs /if ?> |
| | 62 | <?cs set numcols = numcols + #1 ?> |
| | 63 | <?cs /each ?> |
| | 64 | </tr> |
| | 65 | <?cs /def ?> |
| | 66 | |
| | 67 | <?cs def:report_cell(class,contents) ?> |
| | 68 | <?cs if $cell.fullrow ?> |
| | 69 | </tr><tr class="<?cs var: row_class ?>" style="<?cs var: row_style ?>;border: none; padding: 0;"> |
| | 70 | <td colspan="100" style="padding: 0;border: none"><div class="report-fullrow"><?cs var:$contents ?></div><hr class="hide"/></td> |
| | 71 | <?cs else ?> |
| | 72 | <td <?cs if $cell.breakrow || $col == $numcols ?>colspan="100" <?cs /if |
| | 73 | ?>class="<?cs var:$class ?>"><?cs if $contents ?><?cs var:$contents ?><?cs /if ?></td> |
| | 74 | |
| | 75 | <?cs if $cell.breakafter ?> |
| | 76 | </tr><tr class="<?cs var: row_class ?>" style="<?cs var: row_style ?>;border: none; padding: 0"> |
| | 77 | <?cs /if ?> |
| | 78 | <?cs /if ?> |
| | 79 | <?cs set col = $col + #1 ?> |
| | 80 | <?cs /def ?> |
| | 81 | |
| | 82 | <?cs set idx = #0 ?> |
| | 83 | <?cs set group = '' ?> |
| | 84 | |
| | 85 | <?cs if report.mode == "list" ?> |
| | 86 | <h1 id="report-hdr"><center><?cs var:report.title ?></center></h1> |
| | 87 | <?cs if report.description ?> |
| | 88 | <div id="report-descr"><div><?cs var:report.description ?></div></center></div> |
| | 89 | <?cs /if ?> |
| | 90 | |
| | 91 | |
| | 92 | <?cs each row = report.items ?> |
| | 93 | <?cs if group != row.__group__ || idx == #0 ?> |
| | 94 | <?cs set group = row.__group__ ?> |
| | 95 | <?cs call:report_hdr(group) ?> |
| | 96 | <?cs /if ?> |
| | 97 | |
| | 98 | <?cs if row.__color__ ?> |
| | 99 | <?cs set rstem='color'+$row.__color__ +'-' ?> |
| | 100 | <?cs else ?> |
| | 101 | <?cs set rstem='' ?> |
| | 102 | <?cs /if ?> |
| | 103 | <?cs if idx % #2 ?> |
| | 104 | <?cs set row_class=$rstem+'even' ?> |
| | 105 | <?cs else ?> |
| | 106 | <?cs set row_class=$rstem+'odd' ?> |
| | 107 | <?cs /if ?> |
| | 108 | |
| | 109 | <?cs set row_style='' ?> |
| | 110 | <?cs if row.__bgcolor__ ?> |
| | 111 | <?cs set row_style='background: ' + row.__bgcolor__ + ';' ?> |
| | 112 | <?cs /if ?> |
| | 113 | <?cs if row.__fgcolor__ ?> |
| | 114 | <?cs set row_style=$row_style + 'color: ' + row.__fgcolor__ + ';' ?> |
| | 115 | <?cs /if ?> |
| | 116 | <?cs if row.__style__ ?> |
| | 117 | <?cs set row_style=$row_style + row.__style__ + ';' ?> |
| | 118 | <?cs /if ?> |
| | 119 | |
| | 120 | <tr class="<?cs var: row_class ?>" style="<?cs var: row_style ?>"> |
| | 121 | <?cs set idx = idx + #1 ?> |
| | 122 | <?cs set col = #0 ?> |
| | 123 | <?cs each cell = row ?> |
| | 124 | <?cs if cell.hidden || cell.hidehtml ?> |
| | 125 | <?cs elif name(cell) == "ticket" ?> |
| | 126 | <?cs call:report_cell('ticket-col', |
| | 127 | '<a title="View ticket #'+$cell+'" class="block" href="'+ |
| | 128 | $cell.ticket_href+'">#'+$cell+'</a>') ?> |
| | 129 | <?cs elif name(cell) == "report" ?> |
| | 130 | <?cs call:report_cell('report-col', |
| | 131 | '<a title="View Report" class="block" href="'+$cell.report_href+'">{'+$cell+'}</a>') ?> |
| | 132 | <?cs set:report_href=$cell.report_href ?> |
| | 133 | <?cs elif name(cell) == "time" ?> |
| | 134 | <?cs call:report_cell('date-column', $cell.date) ?> |
| | 135 | <?cs elif name(cell) == "date" || name(cell) == "created" || name(cell) == "modified" ?> |
| | 136 | <?cs call:report_cell('date-column', $cell.date) ?> |
| | 137 | <?cs elif name(cell) == "datetime" ?> |
| | 138 | <?cs call:report_cell('date-column', $cell.datetime) ?> |
| | 139 | <?cs elif name(cell) == "description" ?> |
| | 140 | <?cs call:report_cell('', $cell.parsed) ?> |
| | 141 | <?cs elif name(cell) == "title" && $report.id == -1 ?> |
| | 142 | <?cs call:report_cell('title-col', |
| | 143 | '<a title="View Report" class="block" href="'+ |
| | 144 | $report_href+'">'+$cell+'</a>') ?> |
| | 145 | <?cs else ?> |
| | 146 | <?cs call:report_cell(name(cell)+'-col', $cell) ?> |
| | 147 | <?cs /if ?> |
| | 148 | <?cs /each ?> |
| | 149 | </tr> |
| | 150 | <?cs /each ?> |
| | 151 | </table> |
| | 152 | <?cs /if ?> |
| | 153 | |
| | 154 | <?cs if $idx == #0 ?> |
| | 155 | <div id="report-notfound">No matches found.</div> |
| | 156 | <?cs /if ?> |
| | 157 | |
| | 158 | <?cs if:report.numrows && report.id != -1 ?><span id="numrows">(<?cs var:report.numrows ?> matches)</span><?cs /if ?> |
| | 159 | <?cs if report.id > #0 ?> |
| | 160 | <?cs set vars='' ?> |
| | 161 | <?cs each arg = $report.var ?> |
| | 162 | <?cs set vars=$vars+'&'+name($arg)+'='+$arg ?> |
| | 163 | <?cs /each ?> |
| | 164 | |
| | 165 | <?cs set sortInfo='' ?> |
| | 166 | <?cs if args.sort ?> |
| | 167 | <?cs set sortInfo=$sortInfo+'&sort='+$args.sort ?> |
| | 168 | <?cs /if ?> |
| | 169 | <?cs if args.asc ?> |
| | 170 | <?cs set sortInfo=$sortInfo+'&asc='+$args.asc ?> |
| | 171 | <?cs /if ?> |
| | 172 | |
| | 173 | <?cs /if ?> |
| | 174 | |
| | 175 | <?cs /if ?> |
| | 176 | </div> |
| | 177 | </div> |
| | 178 | </div> |
| | 179 | </body> |
| | 180 | </html> |