| | @@ -55,16 +55,20 @@ |
| 55 | 55 | } |
| 56 | 56 | i++; |
| 57 | 57 | if( pPost->zThreadTitle ){ |
| 58 | 58 | @ <h1>%h(pPost->zThreadTitle)</h1> |
| 59 | 59 | } |
| 60 | | - @ <p>By %h(pPost->zUser) on %h(zDate) |
| 60 | + @ <p>By %h(pPost->zUser) on %h(zDate) (%d(fpid)) |
| 61 | 61 | if( fprev ){ |
| 62 | | - @ edit of %d(fprev) %h(pPost->azParent[0]) |
| 62 | + @ edit of %d(fprev) |
| 63 | 63 | } |
| 64 | 64 | if( firt ){ |
| 65 | | - @ in reply to %d(firt) %h(pPost->zInReplyTo) |
| 65 | + @ reply to %d(firt) |
| 66 | + } |
| 67 | + if( g.perm.Debug ){ |
| 68 | + @ <span class="debug">\ |
| 69 | + @ <a href="%R/artifact/%h(zUuid)">raw artifact</a></span> |
| 66 | 70 | } |
| 67 | 71 | forum_render(pPost->zMimetype, pPost->zWiki); |
| 68 | 72 | if( g.perm.WrForum ){ |
| 69 | 73 | int sameUser = login_is_individual() |
| 70 | 74 | && fossil_strcmp(pPost->zUser, g.zLogin)==0; |
| | @@ -232,15 +236,12 @@ |
| 232 | 236 | @ rows="25" wrap="virtual">%h(zContent)</textarea><br> |
| 233 | 237 | } |
| 234 | 238 | |
| 235 | 239 | /* |
| 236 | 240 | ** WEBPAGE: forumnew |
| 237 | | -** WEBPAGE: test-forumnew |
| 238 | 241 | ** |
| 239 | | -** Start a new forum thread. The /test-forumnew works just like |
| 240 | | -** /forumnew except that it provides additional controls for testing |
| 241 | | -** and debugging. |
| 242 | +** Start a new forum thread. |
| 242 | 243 | */ |
| 243 | 244 | void forumnew_page(void){ |
| 244 | 245 | const char *zTitle = PDT("title",""); |
| 245 | 246 | const char *zMimetype = PD("mimetype","text/x-fossil-wiki"); |
| 246 | 247 | const char *zContent = PDT("content",""); |
| | @@ -264,16 +265,18 @@ |
| 264 | 265 | if( P("preview") ){ |
| 265 | 266 | @ <input type="submit" name="submit" value="Submit"> |
| 266 | 267 | }else{ |
| 267 | 268 | @ <input type="submit" name="submit" value="Submit" disabled> |
| 268 | 269 | } |
| 269 | | - if( g.zPath[0]=='t' ){ |
| 270 | + if( g.perm.Debug ){ |
| 270 | 271 | /* For the test-forumnew page add these extra debugging controls */ |
| 271 | | - @ <br><label><input type="checkbox" name="dryrun" %s(PCK("dryrun"))> \ |
| 272 | + @ <div class="debug"> |
| 273 | + @ <label><input type="checkbox" name="dryrun" %s(PCK("dryrun"))> \ |
| 272 | 274 | @ Dry run</label> |
| 273 | 275 | @ <br><label><input type="checkbox" name="domod" %s(PCK("domod"))> \ |
| 274 | 276 | @ Require moderator approval</label> |
| 277 | + @ </div> |
| 275 | 278 | } |
| 276 | 279 | @ </form> |
| 277 | 280 | style_footer(); |
| 278 | 281 | } |
| 279 | 282 | |
| | @@ -360,13 +363,19 @@ |
| 360 | 363 | @ <input type="hidden" name="reply" value="1"> |
| 361 | 364 | forum_entry_widget(0, zMimetype, zContent); |
| 362 | 365 | @ <input type="submit" name="preview" value="Preview"> |
| 363 | 366 | if( P("preview") ){ |
| 364 | 367 | @ <input type="submit" name="submit" value="Submit"> |
| 365 | | - if( g.perm.Setup ){ |
| 366 | | - @ <input type="submit" name="submitdryrun" value="Dry Run"> |
| 367 | | - } |
| 368 | + } |
| 369 | + if( g.perm.Debug ){ |
| 370 | + /* For the test-forumnew page add these extra debugging controls */ |
| 371 | + @ <div class="debug"> |
| 372 | + @ <label><input type="checkbox" name="dryrun" %s(PCK("dryrun"))> \ |
| 373 | + @ Dry run</label> |
| 374 | + @ <br><label><input type="checkbox" name="domod" %s(PCK("domod"))> \ |
| 375 | + @ Require moderator approval</label> |
| 376 | + @ </div> |
| 368 | 377 | } |
| 369 | 378 | @ </form> |
| 370 | 379 | } |
| 371 | 380 | style_footer(); |
| 372 | 381 | } |
| 373 | 382 | |