Fossil SCM
make the quickfilter optional for reports by editing the report
Commit
7d20f5020762c71d70c589b49c8731ca0c46f30e58ee03f8a2449661e2865101
Parent
a6ac88cbb009386…
1 file changed
+27
-13
+27
-13
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -452,11 +452,12 @@ | ||
| 452 | 452 | char *zSQL; /* The SQL text that gnerates the report */ |
| 453 | 453 | char *zErr = 0; /* An error message */ |
| 454 | 454 | const char *zDesc; /* Extra descriptive text about the report */ |
| 455 | 455 | const char *zMimetype; /* Mimetype for zDesc */ |
| 456 | 456 | const char *zTag; /* Symbolic name for this report */ |
| 457 | - int dflt = P("dflt") ? 1 : 0; | |
| 457 | + int dflt = P("dflt") ? 1 : 0; /* Is this the default report */ | |
| 458 | + int quickfilter = P("quickfilter") ? 1 : 0; /* Show the quickfilter */ | |
| 458 | 459 | |
| 459 | 460 | login_check_credentials(); |
| 460 | 461 | if( !g.perm.TktFmt ){ |
| 461 | 462 | login_needed(g.anon.TktFmt); |
| 462 | 463 | return; |
| @@ -521,19 +522,21 @@ | ||
| 521 | 522 | if( zMimetype && zMimetype[0]==0 ){ zDesc = 0; zMimetype = 0; } |
| 522 | 523 | if( rn>0 ){ |
| 523 | 524 | db_multi_exec( |
| 524 | 525 | "UPDATE reportfmt SET title=%Q, sqlcode=%Q," |
| 525 | 526 | " owner=%Q, cols=%Q, mtime=now(), " |
| 526 | - " jx=json_patch(jx,json_object('desc',%Q,'descmt',%Q,'tag',%Q))" | |
| 527 | + " jx=json_patch(jx,json_object('desc',%Q,'descmt',%Q,'tag',%Q," | |
| 528 | + " 'quickfilter',%d))" | |
| 527 | 529 | " WHERE rn=%d", |
| 528 | - zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, rn); | |
| 530 | + zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, quickfilter, rn); | |
| 529 | 531 | }else{ |
| 530 | 532 | db_multi_exec( |
| 531 | 533 | "INSERT INTO reportfmt(title,sqlcode,owner,cols,mtime,jx) " |
| 532 | 534 | "VALUES(%Q,%Q,%Q,%Q,now()," |
| 533 | - "json_object('desc',%Q,'descmt',%Q,'tag',%Q))", | |
| 534 | - zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag); | |
| 535 | + "json_object('desc',%Q,'descmt',%Q,'tag',%Q," | |
| 536 | + "'quickfilter',%d))", | |
| 537 | + zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, quickfilter); | |
| 535 | 538 | rn = db_last_insert_rowid(); |
| 536 | 539 | } |
| 537 | 540 | if( dflt ){ |
| 538 | 541 | db_set("ticket-default-report", zTitle, 0); |
| 539 | 542 | }else{ |
| @@ -566,16 +569,18 @@ | ||
| 566 | 569 | dflt = fossil_strcmp(zTitle, defaultReport)==0; |
| 567 | 570 | hasJx = db_column_int(&q, 4); |
| 568 | 571 | } |
| 569 | 572 | db_finalize(&q); |
| 570 | 573 | if( hasJx ){ |
| 571 | - db_prepare(&q, "SELECT jx->>'desc', jx->>'descmt', jx->>'tag'" | |
| 574 | + db_prepare(&q, "SELECT jx->>'desc', jx->>'descmt', jx->>'tag'," | |
| 575 | + " jx->>'quickfilter'" | |
| 572 | 576 | " FROM reportfmt WHERE rn=%d", rn); |
| 573 | 577 | if( db_step(&q)==SQLITE_ROW ){ |
| 574 | 578 | zDesc = db_column_malloc(&q, 0); |
| 575 | 579 | zMimetype = db_column_malloc(&q, 1); |
| 576 | 580 | zTag = db_column_malloc(&q, 2); |
| 581 | + quickfilter = db_column_int(&q, 3); | |
| 577 | 582 | } |
| 578 | 583 | db_finalize(&q); |
| 579 | 584 | } |
| 580 | 585 | if( P("copy") ){ |
| 581 | 586 | rn = 0; |
| @@ -627,10 +632,14 @@ | ||
| 627 | 632 | @ cols="80" rows="15" wrap="virtual">%h(zDesc)</textarea> |
| 628 | 633 | @ </p> |
| 629 | 634 | |
| 630 | 635 | @ <p><label><input type="checkbox" name="dflt" %s(dflt?"checked":"")> \ |
| 631 | 636 | @ Make this the default report</label></p> |
| 637 | + | |
| 638 | + @ <p><label><input type="checkbox" name="quickfilter" %s(quickfilter?"checked":"")> \ | |
| 639 | + @ Show the quickfilter for this report.</label></p> | |
| 640 | + | |
| 632 | 641 | if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){ |
| 633 | 642 | @ <p>This report format is owned by %h(zOwner). You are not allowed |
| 634 | 643 | @ to change it.</p> |
| 635 | 644 | @ </form> |
| 636 | 645 | report_format_hints(); |
| @@ -1122,11 +1131,11 @@ | ||
| 1122 | 1131 | char *zTitle; |
| 1123 | 1132 | char *zOwner; |
| 1124 | 1133 | char *zClrKey; |
| 1125 | 1134 | char *zDesc; |
| 1126 | 1135 | char *zMimetype; |
| 1127 | - int tabs; | |
| 1136 | + int tabs, quickfilter; | |
| 1128 | 1137 | Stmt q; |
| 1129 | 1138 | char *zErr1 = 0; |
| 1130 | 1139 | char *zErr2 = 0; |
| 1131 | 1140 | |
| 1132 | 1141 | login_check_credentials(); |
| @@ -1133,21 +1142,21 @@ | ||
| 1133 | 1142 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 1134 | 1143 | report_update_reportfmt_table(); |
| 1135 | 1144 | rn = report_number(); |
| 1136 | 1145 | tabs = P("tablist")!=0; |
| 1137 | 1146 | db_prepare(&q, |
| 1138 | - "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'" | |
| 1139 | - " FROM reportfmt WHERE rn=%d", rn); | |
| 1147 | + "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'," | |
| 1148 | + " jx->>'quickfilter' FROM reportfmt WHERE rn=%d", rn); | |
| 1140 | 1149 | rc = db_step(&q); |
| 1141 | 1150 | if( rc!=SQLITE_ROW ){ |
| 1142 | 1151 | const char *titleSearch = |
| 1143 | 1152 | defaultTitleSearch==0 || trim_string(defaultTitleSearch)[0]==0 ? |
| 1144 | 1153 | P("title") : defaultTitleSearch; |
| 1145 | 1154 | db_finalize(&q); |
| 1146 | 1155 | db_prepare(&q, |
| 1147 | - "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'" | |
| 1148 | - " FROM reportfmt WHERE title GLOB %Q", | |
| 1156 | + "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'," | |
| 1157 | + " jx->>'quickfilter' FROM reportfmt WHERE title GLOB %Q", | |
| 1149 | 1158 | titleSearch); |
| 1150 | 1159 | rc = db_step(&q); |
| 1151 | 1160 | } |
| 1152 | 1161 | if( rc!=SQLITE_ROW ){ |
| 1153 | 1162 | db_finalize(&q); |
| @@ -1161,10 +1170,11 @@ | ||
| 1161 | 1170 | zOwner = db_column_malloc(&q, 2); |
| 1162 | 1171 | zClrKey = db_column_malloc(&q, 3); |
| 1163 | 1172 | rn = db_column_int(&q,4); |
| 1164 | 1173 | zDesc = db_column_malloc(&q, 5); |
| 1165 | 1174 | zMimetype = db_column_malloc(&q, 6); |
| 1175 | + quickfilter = db_column_int(&q, 7); | |
| 1166 | 1176 | db_finalize(&q); |
| 1167 | 1177 | |
| 1168 | 1178 | if( P("order_by") ){ |
| 1169 | 1179 | /* |
| 1170 | 1180 | ** If the user wants to do a column sort, wrap the query into a sub |
| @@ -1224,20 +1234,24 @@ | ||
| 1224 | 1234 | blob_reset(&src); |
| 1225 | 1235 | @ <br> |
| 1226 | 1236 | } |
| 1227 | 1237 | output_color_key(zClrKey, 1, |
| 1228 | 1238 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1229 | - @ <input type="text" id="quickfilter" placeholder="filter ticket list..." style="display: none"> | |
| 1239 | + if( quickfilter ){ | |
| 1240 | + @ <input type="text" id="quickfilter" placeholder="filter ticket list..."> | |
| 1241 | + } | |
| 1230 | 1242 | @ <table border="1" cellpadding="2" cellspacing="0" class="report sortable filterlist" |
| 1231 | 1243 | @ data-column-types='' data-init-sort='0'> |
| 1232 | 1244 | sState.rn = rn; |
| 1233 | 1245 | sState.nCount = 0; |
| 1234 | 1246 | report_restrict_sql(&zErr1); |
| 1235 | 1247 | db_exec_readonly(g.db, zSql, generate_html, &sState, &zErr2); |
| 1236 | 1248 | report_unrestrict_sql(); |
| 1237 | 1249 | @ </tbody></table> |
| 1238 | - style_quickfilter(); | |
| 1250 | + if( quickfilter ){ | |
| 1251 | + style_quickfilter(); | |
| 1252 | + } | |
| 1239 | 1253 | if( zErr1 ){ |
| 1240 | 1254 | @ <p class="reportError">Error: %h(zErr1)</p> |
| 1241 | 1255 | }else if( zErr2 ){ |
| 1242 | 1256 | @ <p class="reportError">Error: %h(zErr2)</p> |
| 1243 | 1257 | } |
| 1244 | 1258 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -452,11 +452,12 @@ | |
| 452 | char *zSQL; /* The SQL text that gnerates the report */ |
| 453 | char *zErr = 0; /* An error message */ |
| 454 | const char *zDesc; /* Extra descriptive text about the report */ |
| 455 | const char *zMimetype; /* Mimetype for zDesc */ |
| 456 | const char *zTag; /* Symbolic name for this report */ |
| 457 | int dflt = P("dflt") ? 1 : 0; |
| 458 | |
| 459 | login_check_credentials(); |
| 460 | if( !g.perm.TktFmt ){ |
| 461 | login_needed(g.anon.TktFmt); |
| 462 | return; |
| @@ -521,19 +522,21 @@ | |
| 521 | if( zMimetype && zMimetype[0]==0 ){ zDesc = 0; zMimetype = 0; } |
| 522 | if( rn>0 ){ |
| 523 | db_multi_exec( |
| 524 | "UPDATE reportfmt SET title=%Q, sqlcode=%Q," |
| 525 | " owner=%Q, cols=%Q, mtime=now(), " |
| 526 | " jx=json_patch(jx,json_object('desc',%Q,'descmt',%Q,'tag',%Q))" |
| 527 | " WHERE rn=%d", |
| 528 | zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, rn); |
| 529 | }else{ |
| 530 | db_multi_exec( |
| 531 | "INSERT INTO reportfmt(title,sqlcode,owner,cols,mtime,jx) " |
| 532 | "VALUES(%Q,%Q,%Q,%Q,now()," |
| 533 | "json_object('desc',%Q,'descmt',%Q,'tag',%Q))", |
| 534 | zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag); |
| 535 | rn = db_last_insert_rowid(); |
| 536 | } |
| 537 | if( dflt ){ |
| 538 | db_set("ticket-default-report", zTitle, 0); |
| 539 | }else{ |
| @@ -566,16 +569,18 @@ | |
| 566 | dflt = fossil_strcmp(zTitle, defaultReport)==0; |
| 567 | hasJx = db_column_int(&q, 4); |
| 568 | } |
| 569 | db_finalize(&q); |
| 570 | if( hasJx ){ |
| 571 | db_prepare(&q, "SELECT jx->>'desc', jx->>'descmt', jx->>'tag'" |
| 572 | " FROM reportfmt WHERE rn=%d", rn); |
| 573 | if( db_step(&q)==SQLITE_ROW ){ |
| 574 | zDesc = db_column_malloc(&q, 0); |
| 575 | zMimetype = db_column_malloc(&q, 1); |
| 576 | zTag = db_column_malloc(&q, 2); |
| 577 | } |
| 578 | db_finalize(&q); |
| 579 | } |
| 580 | if( P("copy") ){ |
| 581 | rn = 0; |
| @@ -627,10 +632,14 @@ | |
| 627 | @ cols="80" rows="15" wrap="virtual">%h(zDesc)</textarea> |
| 628 | @ </p> |
| 629 | |
| 630 | @ <p><label><input type="checkbox" name="dflt" %s(dflt?"checked":"")> \ |
| 631 | @ Make this the default report</label></p> |
| 632 | if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){ |
| 633 | @ <p>This report format is owned by %h(zOwner). You are not allowed |
| 634 | @ to change it.</p> |
| 635 | @ </form> |
| 636 | report_format_hints(); |
| @@ -1122,11 +1131,11 @@ | |
| 1122 | char *zTitle; |
| 1123 | char *zOwner; |
| 1124 | char *zClrKey; |
| 1125 | char *zDesc; |
| 1126 | char *zMimetype; |
| 1127 | int tabs; |
| 1128 | Stmt q; |
| 1129 | char *zErr1 = 0; |
| 1130 | char *zErr2 = 0; |
| 1131 | |
| 1132 | login_check_credentials(); |
| @@ -1133,21 +1142,21 @@ | |
| 1133 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 1134 | report_update_reportfmt_table(); |
| 1135 | rn = report_number(); |
| 1136 | tabs = P("tablist")!=0; |
| 1137 | db_prepare(&q, |
| 1138 | "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'" |
| 1139 | " FROM reportfmt WHERE rn=%d", rn); |
| 1140 | rc = db_step(&q); |
| 1141 | if( rc!=SQLITE_ROW ){ |
| 1142 | const char *titleSearch = |
| 1143 | defaultTitleSearch==0 || trim_string(defaultTitleSearch)[0]==0 ? |
| 1144 | P("title") : defaultTitleSearch; |
| 1145 | db_finalize(&q); |
| 1146 | db_prepare(&q, |
| 1147 | "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'" |
| 1148 | " FROM reportfmt WHERE title GLOB %Q", |
| 1149 | titleSearch); |
| 1150 | rc = db_step(&q); |
| 1151 | } |
| 1152 | if( rc!=SQLITE_ROW ){ |
| 1153 | db_finalize(&q); |
| @@ -1161,10 +1170,11 @@ | |
| 1161 | zOwner = db_column_malloc(&q, 2); |
| 1162 | zClrKey = db_column_malloc(&q, 3); |
| 1163 | rn = db_column_int(&q,4); |
| 1164 | zDesc = db_column_malloc(&q, 5); |
| 1165 | zMimetype = db_column_malloc(&q, 6); |
| 1166 | db_finalize(&q); |
| 1167 | |
| 1168 | if( P("order_by") ){ |
| 1169 | /* |
| 1170 | ** If the user wants to do a column sort, wrap the query into a sub |
| @@ -1224,20 +1234,24 @@ | |
| 1224 | blob_reset(&src); |
| 1225 | @ <br> |
| 1226 | } |
| 1227 | output_color_key(zClrKey, 1, |
| 1228 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1229 | @ <input type="text" id="quickfilter" placeholder="filter ticket list..." style="display: none"> |
| 1230 | @ <table border="1" cellpadding="2" cellspacing="0" class="report sortable filterlist" |
| 1231 | @ data-column-types='' data-init-sort='0'> |
| 1232 | sState.rn = rn; |
| 1233 | sState.nCount = 0; |
| 1234 | report_restrict_sql(&zErr1); |
| 1235 | db_exec_readonly(g.db, zSql, generate_html, &sState, &zErr2); |
| 1236 | report_unrestrict_sql(); |
| 1237 | @ </tbody></table> |
| 1238 | style_quickfilter(); |
| 1239 | if( zErr1 ){ |
| 1240 | @ <p class="reportError">Error: %h(zErr1)</p> |
| 1241 | }else if( zErr2 ){ |
| 1242 | @ <p class="reportError">Error: %h(zErr2)</p> |
| 1243 | } |
| 1244 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -452,11 +452,12 @@ | |
| 452 | char *zSQL; /* The SQL text that gnerates the report */ |
| 453 | char *zErr = 0; /* An error message */ |
| 454 | const char *zDesc; /* Extra descriptive text about the report */ |
| 455 | const char *zMimetype; /* Mimetype for zDesc */ |
| 456 | const char *zTag; /* Symbolic name for this report */ |
| 457 | int dflt = P("dflt") ? 1 : 0; /* Is this the default report */ |
| 458 | int quickfilter = P("quickfilter") ? 1 : 0; /* Show the quickfilter */ |
| 459 | |
| 460 | login_check_credentials(); |
| 461 | if( !g.perm.TktFmt ){ |
| 462 | login_needed(g.anon.TktFmt); |
| 463 | return; |
| @@ -521,19 +522,21 @@ | |
| 522 | if( zMimetype && zMimetype[0]==0 ){ zDesc = 0; zMimetype = 0; } |
| 523 | if( rn>0 ){ |
| 524 | db_multi_exec( |
| 525 | "UPDATE reportfmt SET title=%Q, sqlcode=%Q," |
| 526 | " owner=%Q, cols=%Q, mtime=now(), " |
| 527 | " jx=json_patch(jx,json_object('desc',%Q,'descmt',%Q,'tag',%Q," |
| 528 | " 'quickfilter',%d))" |
| 529 | " WHERE rn=%d", |
| 530 | zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, quickfilter, rn); |
| 531 | }else{ |
| 532 | db_multi_exec( |
| 533 | "INSERT INTO reportfmt(title,sqlcode,owner,cols,mtime,jx) " |
| 534 | "VALUES(%Q,%Q,%Q,%Q,now()," |
| 535 | "json_object('desc',%Q,'descmt',%Q,'tag',%Q," |
| 536 | "'quickfilter',%d))", |
| 537 | zTitle, zSQL, zOwner, zClrKey, zDesc, zMimetype, zTag, quickfilter); |
| 538 | rn = db_last_insert_rowid(); |
| 539 | } |
| 540 | if( dflt ){ |
| 541 | db_set("ticket-default-report", zTitle, 0); |
| 542 | }else{ |
| @@ -566,16 +569,18 @@ | |
| 569 | dflt = fossil_strcmp(zTitle, defaultReport)==0; |
| 570 | hasJx = db_column_int(&q, 4); |
| 571 | } |
| 572 | db_finalize(&q); |
| 573 | if( hasJx ){ |
| 574 | db_prepare(&q, "SELECT jx->>'desc', jx->>'descmt', jx->>'tag'," |
| 575 | " jx->>'quickfilter'" |
| 576 | " FROM reportfmt WHERE rn=%d", rn); |
| 577 | if( db_step(&q)==SQLITE_ROW ){ |
| 578 | zDesc = db_column_malloc(&q, 0); |
| 579 | zMimetype = db_column_malloc(&q, 1); |
| 580 | zTag = db_column_malloc(&q, 2); |
| 581 | quickfilter = db_column_int(&q, 3); |
| 582 | } |
| 583 | db_finalize(&q); |
| 584 | } |
| 585 | if( P("copy") ){ |
| 586 | rn = 0; |
| @@ -627,10 +632,14 @@ | |
| 632 | @ cols="80" rows="15" wrap="virtual">%h(zDesc)</textarea> |
| 633 | @ </p> |
| 634 | |
| 635 | @ <p><label><input type="checkbox" name="dflt" %s(dflt?"checked":"")> \ |
| 636 | @ Make this the default report</label></p> |
| 637 | |
| 638 | @ <p><label><input type="checkbox" name="quickfilter" %s(quickfilter?"checked":"")> \ |
| 639 | @ Show the quickfilter for this report.</label></p> |
| 640 | |
| 641 | if( !g.perm.Admin && fossil_strcmp(zOwner,g.zLogin)!=0 ){ |
| 642 | @ <p>This report format is owned by %h(zOwner). You are not allowed |
| 643 | @ to change it.</p> |
| 644 | @ </form> |
| 645 | report_format_hints(); |
| @@ -1122,11 +1131,11 @@ | |
| 1131 | char *zTitle; |
| 1132 | char *zOwner; |
| 1133 | char *zClrKey; |
| 1134 | char *zDesc; |
| 1135 | char *zMimetype; |
| 1136 | int tabs, quickfilter; |
| 1137 | Stmt q; |
| 1138 | char *zErr1 = 0; |
| 1139 | char *zErr2 = 0; |
| 1140 | |
| 1141 | login_check_credentials(); |
| @@ -1133,21 +1142,21 @@ | |
| 1142 | if( !g.perm.RdTkt ){ login_needed(g.anon.RdTkt); return; } |
| 1143 | report_update_reportfmt_table(); |
| 1144 | rn = report_number(); |
| 1145 | tabs = P("tablist")!=0; |
| 1146 | db_prepare(&q, |
| 1147 | "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'," |
| 1148 | " jx->>'quickfilter' FROM reportfmt WHERE rn=%d", rn); |
| 1149 | rc = db_step(&q); |
| 1150 | if( rc!=SQLITE_ROW ){ |
| 1151 | const char *titleSearch = |
| 1152 | defaultTitleSearch==0 || trim_string(defaultTitleSearch)[0]==0 ? |
| 1153 | P("title") : defaultTitleSearch; |
| 1154 | db_finalize(&q); |
| 1155 | db_prepare(&q, |
| 1156 | "SELECT title, sqlcode, owner, cols, rn, jx->>'desc', jx->>'descmt'," |
| 1157 | " jx->>'quickfilter' FROM reportfmt WHERE title GLOB %Q", |
| 1158 | titleSearch); |
| 1159 | rc = db_step(&q); |
| 1160 | } |
| 1161 | if( rc!=SQLITE_ROW ){ |
| 1162 | db_finalize(&q); |
| @@ -1161,10 +1170,11 @@ | |
| 1170 | zOwner = db_column_malloc(&q, 2); |
| 1171 | zClrKey = db_column_malloc(&q, 3); |
| 1172 | rn = db_column_int(&q,4); |
| 1173 | zDesc = db_column_malloc(&q, 5); |
| 1174 | zMimetype = db_column_malloc(&q, 6); |
| 1175 | quickfilter = db_column_int(&q, 7); |
| 1176 | db_finalize(&q); |
| 1177 | |
| 1178 | if( P("order_by") ){ |
| 1179 | /* |
| 1180 | ** If the user wants to do a column sort, wrap the query into a sub |
| @@ -1224,20 +1234,24 @@ | |
| 1234 | blob_reset(&src); |
| 1235 | @ <br> |
| 1236 | } |
| 1237 | output_color_key(zClrKey, 1, |
| 1238 | "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"report\""); |
| 1239 | if( quickfilter ){ |
| 1240 | @ <input type="text" id="quickfilter" placeholder="filter ticket list..."> |
| 1241 | } |
| 1242 | @ <table border="1" cellpadding="2" cellspacing="0" class="report sortable filterlist" |
| 1243 | @ data-column-types='' data-init-sort='0'> |
| 1244 | sState.rn = rn; |
| 1245 | sState.nCount = 0; |
| 1246 | report_restrict_sql(&zErr1); |
| 1247 | db_exec_readonly(g.db, zSql, generate_html, &sState, &zErr2); |
| 1248 | report_unrestrict_sql(); |
| 1249 | @ </tbody></table> |
| 1250 | if( quickfilter ){ |
| 1251 | style_quickfilter(); |
| 1252 | } |
| 1253 | if( zErr1 ){ |
| 1254 | @ <p class="reportError">Error: %h(zErr1)</p> |
| 1255 | }else if( zErr2 ){ |
| 1256 | @ <p class="reportError">Error: %h(zErr2)</p> |
| 1257 | } |
| 1258 |