Fossil SCM

If a ticket query begins with an underscore then: # Do not include a link to execute the query directly # Do not show to those users that do not have ticket report access This allows you to create ticket report queries that are for form submissions only, not direct access.

jeremy_c 2010-01-09 13:11 trunk
Commit 6069602aba14bf74b8f48bd94f7b7e033ca752da
1 file changed +11 -2
+11 -2
--- src/report.c
+++ src/report.c
@@ -61,14 +61,23 @@
6161
@ <p>Choose a report format from the following list:</p>
6262
@ <ol>
6363
while( db_step(&q)==SQLITE_ROW ){
6464
const char *zTitle = db_column_text(&q, 1);
6565
const char *zOwner = db_column_text(&q, 2);
66
+ if( zTitle[0] =='_' && !g.okTktFmt ){
67
+ continue;
68
+ }
6669
rn = db_column_int(&q, 0);
6770
cnt++;
68
- @ <li value="%d(cnt)"><a href="rptview?rn=%d(rn)"
69
- @ rel="nofollow">%h(zTitle)</a>&nbsp;&nbsp;&nbsp;
71
+ @ <li value="%d(cnt)">
72
+ if( zTitle[0] == '_' ){
73
+ @%h(zTitle)
74
+ } else {
75
+ @<a href="rptview?rn=%d(rn)"
76
+ @ rel="nofollow">%h(zTitle)</a>
77
+ }
78
+ @&nbsp;&nbsp;&nbsp;
7079
if( g.okWrite && zOwner && zOwner[0] ){
7180
@ (by <i>%h(zOwner)</i>)
7281
}
7382
if( g.okTktFmt ){
7483
@ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
7584
--- src/report.c
+++ src/report.c
@@ -61,14 +61,23 @@
61 @ <p>Choose a report format from the following list:</p>
62 @ <ol>
63 while( db_step(&q)==SQLITE_ROW ){
64 const char *zTitle = db_column_text(&q, 1);
65 const char *zOwner = db_column_text(&q, 2);
 
 
 
66 rn = db_column_int(&q, 0);
67 cnt++;
68 @ <li value="%d(cnt)"><a href="rptview?rn=%d(rn)"
69 @ rel="nofollow">%h(zTitle)</a>&nbsp;&nbsp;&nbsp;
 
 
 
 
 
 
70 if( g.okWrite && zOwner && zOwner[0] ){
71 @ (by <i>%h(zOwner)</i>)
72 }
73 if( g.okTktFmt ){
74 @ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
75
--- src/report.c
+++ src/report.c
@@ -61,14 +61,23 @@
61 @ <p>Choose a report format from the following list:</p>
62 @ <ol>
63 while( db_step(&q)==SQLITE_ROW ){
64 const char *zTitle = db_column_text(&q, 1);
65 const char *zOwner = db_column_text(&q, 2);
66 if( zTitle[0] =='_' && !g.okTktFmt ){
67 continue;
68 }
69 rn = db_column_int(&q, 0);
70 cnt++;
71 @ <li value="%d(cnt)">
72 if( zTitle[0] == '_' ){
73 @%h(zTitle)
74 } else {
75 @<a href="rptview?rn=%d(rn)"
76 @ rel="nofollow">%h(zTitle)</a>
77 }
78 @&nbsp;&nbsp;&nbsp;
79 if( g.okWrite && zOwner && zOwner[0] ){
80 @ (by <i>%h(zOwner)</i>)
81 }
82 if( g.okTktFmt ){
83 @ [<a href="rptedit?rn=%d(rn)&amp;copy=1" rel="nofollow">copy</a>]
84

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button