Changes On Branch stv-skinning
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch stv-skinning Excluding Merge-Ins

This is equivalent to a diff from 370d5be389 to 036d76815b

2010-09-08
12:36
Documentation updates. check-in: 546d48ff45 user: drh tags: trunk
2010-09-07
23:57
Create new branch named "wolfgangFormat2CSS" check-in: e2ab51b011 user: wolfgang tags: wolfgangFormat2CSS
17:29
merged-make-corrections Closed-Leaf check-in: 036d76815b user: Ratte tags: stv-skinning
2010-09-06
20:31
Solves ticket [64d9461fa4b399b15827876bcf6b8ccc95720d16] check-in: 370d5be389 user: renez tags: trunk
19:10
hyperlinks disabled skinned check-in: 8f6e98aa3d user: Ratte tags: stv-skinning
2010-09-05
11:44
Do not put hyperlinks to attachments in tickets and wiki if attachment download is prohibited. Ticket [a7eff56a933249258f0d902]. check-in: f7e2d74a85 user: drh tags: trunk

Changes to src/branch.c.

227
228
229
230
231
232
233

234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
  if( showClosed ){
    style_submenu_element("Open","Open","brlist");
  }else{
    style_submenu_element("Closed","Closed","brlist?closed");
  }
  login_anonymous_available();
  compute_leaves(0, 1);

  style_sidebox_begin("Nomenclature:", "33%");
  @ <ol>
  @ <li> An <a href="brlist">open branch</a> is a branch that has one or
  @ more <a href="leaves">open leaves.</a>
  @ The presence of open leaves presumably means
  @ that the branch is still being extended with new check-ins.</li>
  @ <li> A <a href="brlist?closed">closed branch</a> is a branch with only
  @ <a href="leaves?closed">closed leaves</a>.
  @ Closed branches are fixed and do not change (unless they are first
  @ reopened)</li>
  @ </ol>
  style_sidebox_end();

  cnt = 0;
  if( !showClosed ){
    db_prepare(&q,
      "SELECT DISTINCT value FROM tagxref"
      " WHERE tagid=%d AND value NOT NULL"
      "   AND rid IN leaves"






>
|










|







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
  if( showClosed ){
    style_submenu_element("Open","Open","brlist");
  }else{
    style_submenu_element("Closed","Closed","brlist?closed");
  }
  login_anonymous_available();
  compute_leaves(0, 1);
  @ <div class="nomenclatureSidebox">
  @ Nomenclature:
  @ <ol>
  @ <li> An <a href="brlist">open branch</a> is a branch that has one or
  @ more <a href="leaves">open leaves.</a>
  @ The presence of open leaves presumably means
  @ that the branch is still being extended with new check-ins.</li>
  @ <li> A <a href="brlist?closed">closed branch</a> is a branch with only
  @ <a href="leaves?closed">closed leaves</a>.
  @ Closed branches are fixed and do not change (unless they are first
  @ reopened)</li>
  @ </ol>
  @ </div>

  cnt = 0;
  if( !showClosed ){
    db_prepare(&q,
      "SELECT DISTINCT value FROM tagxref"
      " WHERE tagid=%d AND value NOT NULL"
      "   AND rid IN leaves"

Changes to src/descendants.c.

314
315
316
317
318
319
320

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
  }
  if( showClosed || showAll ){
    style_submenu_element("Open", "Open", "leaves");
  }
  style_header("Leaves");
  login_anonymous_available();
  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);

  style_sidebox_begin("Nomenclature:", "33%");
  @ <ol>
  @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
  @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
  @ and is thus assumed to still be in use.</li>
  @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
  @ be historical and no longer in active use.</li>
  @ </ol>
  style_sidebox_end();

  if( showAll ){
    @ <h1>All leaves, both open and closed:</h1>
  }else if( showClosed ){
    @ <h1>Closed leaves:</h1>
  }else{
    @ <h1>Open leaves:</h1>






>
|







|







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
  }
  if( showClosed || showAll ){
    style_submenu_element("Open", "Open", "leaves");
  }
  style_header("Leaves");
  login_anonymous_available();
  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
  @ <div class="nomenclatureSidebox">
  @ Nomenclature:
  @ <ol>
  @ <li> A <b>leaf</b> is a check-in with no descendants.</li>
  @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag
  @ and is thus assumed to still be in use.</li>
  @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to
  @ be historical and no longer in active use.</li>
  @ </ol>
  @ </div>

  if( showAll ){
    @ <h1>All leaves, both open and closed:</h1>
  }else if( showClosed ){
    @ <h1>Closed leaves:</h1>
  }else{
    @ <h1>Open leaves:</h1>

Changes to src/login.c.

594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
*/
void login_anonymous_available(void){
  if( !g.okHistory &&
      db_exists("SELECT 1 FROM user"
                " WHERE login='anonymous'"
                "   AND cap LIKE '%%h%%'") ){
    const char *zUrl = PD("REQUEST_URI", "index");
    @ <p>Many <font color="red">hyperlinks are disabled.</font><br />
    @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a>
    @ to enable hyperlinks.</p>
  }
}

/*
** While rendering a form, call this routine to add the Anti-CSRF token






|







594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
*/
void login_anonymous_available(void){
  if( !g.okHistory &&
      db_exists("SELECT 1 FROM user"
                " WHERE login='anonymous'"
                "   AND cap LIKE '%%h%%'") ){
    const char *zUrl = PD("REQUEST_URI", "index");
    @ <p>Many <span class="disabledLinks">hyperlinks are disabled.</span><br />
    @ Use <a href="%s(g.zTop)/login?anon=1&g=%T(zUrl)">anonymous login</a>
    @ to enable hyperlinks.</p>
  }
}

/*
** While rendering a form, call this routine to add the Anti-CSRF token

Changes to src/setup.c.

907
908
909
910
911
912
913








914
915
916
917
918
919
920
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  @ %h(zDefaultCSS)








  @ </pre></blockquote>
  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header






>
>
>
>
>
>
>
>







907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
  @ <hr>
  @ The default CSS is shown below for reference.  Other examples
  @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
  @ See also the <a href="setup_header">header</a> and
  @ <a href="setup_footer">footer</a> editing screens.
  @ <blockquote><pre>
  @ %h(zDefaultCSS)
  @ /* internal page layout */
  @ %h(zTdTimelineTable)
  @ %h(zTdTimelineTimeStampCell)
  @ %h(zTdTimelineOmitted)
  @ %h(zTdTimelineComment)
  @ %h(zDivTimelineLeafDsp)
  @ %h(zDivNomenclatureSidebox)
  @ %h(zSpanDisabledLinks)
  @ </pre></blockquote>
  style_footer();
  db_end_transaction(0);
}

/*
** WEBPAGE: setup_header

Changes to src/style.c.

335
336
337
338
339
340
341

342
343
344
345
346
347
348
...
377
378
379
380
381
382
383




















































384
385
386
387
388
389
390
391
392
393
















394
395
396
397
398
399
400
@   margin-bottom: 0px;
@   margin-top: 1em;
@   padding: 1px 1px 1px 1px;
@   font-size: 1.2em;
@   font-weight: bold;
@   background-color: #558195;
@   color: white;

@ }
@
@ /* The "Date" that occurs on the left hand side of timelines */
@ div.divider {
@   background: #a1c4d4;
@   border: 2px #558195 solid;
@   font-size: 1em; font-weight: normal;
................................................................................
@ /* The label/value pairs on (for example) the ci page */
@ table.label-value th {
@   vertical-align: top;
@   text-align: right;
@   padding: 0.2ex 2ex;
@ }
;





















































/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  cgi_append_content(zCSS, -1);
















  g.isConst = 1;
}

/*
** WEBPAGE: test_env
*/
void page_test_env(void){






>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
@   margin-bottom: 0px;
@   margin-top: 1em;
@   padding: 1px 1px 1px 1px;
@   font-size: 1.2em;
@   font-weight: bold;
@   background-color: #558195;
@   color: white;
@   white-space: nowrap;
@ }
@
@ /* The "Date" that occurs on the left hand side of timelines */
@ div.divider {
@   background: #a1c4d4;
@   border: 2px #558195 solid;
@   font-size: 1em; font-weight: normal;
................................................................................
@ /* The label/value pairs on (for example) the ci page */
@ table.label-value th {
@   vertical-align: top;
@   text-align: right;
@   padding: 0.2ex 2ex;
@ }
;
const char zTdTimelineTable[] = 
@ /* The time column in timeline tables */
@ table.timelineTable {
@   cellspacing: 0;
@   border: 0;
@   cellpadding: 0;
@}
;
const char zTdTimelineTimeStampCell[] = 
@ /* The time column in timeline tables */
@ td.timelineTimeStampCell {
@   valign: top;
@   text-align: right;
@}
;
const char zTdTimelineOmitted[] =
@ /* The omitted line in timeline tables */
@ td.timelineOmitted {
@   font-size: small;
@   font-style: italic;
@ }
;
const char zTdTimelineComment[] =
@ /* The comment cell in timeline tables */
@ td.timelineComment {
@   valign: top;
@   text-align: left;
@ }
;
const char zDivTimelineLeafDsp[] =
@ /* The leaf description in timeline tables */
@ div.timelineLeafDsp {
@   font-weight: bold;
@   display: inline;
@ }
;
const char zDivNomenclatureSidebox[] =
@ /* The nomenclature sidebox for branches,.. */
@ div.nomenclatureSidebox {
@   float: right;
@   width: 33%;
@   border-width: medium;
@   border-style: double;
@   margin: 10;
@ }
;
const char zSpanDisabledLinks[] =
@ /* hyperlinks disabled text */
@ span.disabledLinks {
@   color: red;
@ }
;

/*
** WEBPAGE: style.css
*/
void page_style_css(void){
  char *zCSS = 0;

  cgi_set_content_type("text/css");
  zCSS = db_get("css",(char*)zDefaultCSS);
  cgi_append_content(zCSS, -1);
  cgi_append_content("\n", -1);
  /* append internal classes, if not already in style sheet */
  if (!strstr(zCSS,"timelineTable"))
    cgi_append_content(zTdTimelineTable,-1);
  if (!strstr(zCSS,"timelineTimeStampCell"))
    cgi_append_content(zTdTimelineTimeStampCell,-1);
  if (!strstr(zCSS,"timelineOmitted"))
    cgi_append_content(zTdTimelineOmitted,-1);
  if (!strstr(zCSS,"timelineComment"))
    cgi_append_content(zTdTimelineComment,-1);
  if (!strstr(zCSS,"timelineLeafDsp"))
    cgi_append_content(zDivTimelineLeafDsp,-1);
  if (!strstr(zCSS,"nomenclatureSidebox"))
    cgi_append_content(zDivNomenclatureSidebox,-1);
  if (!strstr(zCSS,"disabledLinks"))
    cgi_append_content(zSpanDisabledLinks,-1);
  g.isConst = 1;
}

/*
** WEBPAGE: test_env
*/
void page_test_env(void){

Changes to src/timeline.c.

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
...
308
309
310
311
312
313
314
315
316

317
318
319
320
321
322
323
    wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
  }
  if( tmFlags & TIMELINE_GRAPH ){
    pGraph = graph_init();
    @ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
  }

  @ <table cellspacing=0 border=0 cellpadding=0>
  blob_zero(&comment);
  while( db_step(pQuery)==SQLITE_ROW ){
    int rid = db_column_int(pQuery, 0);
    const char *zUuid = db_column_text(pQuery, 1);
    int isLeaf = db_column_int(pQuery, 5);
    const char *zBgClr = db_column_text(pQuery, 6);
    const char *zDate = db_column_text(pQuery, 2);
................................................................................
        }else{
          commentColumn = 10;
        }
      }
    }
    prevTagid = tagid;
    if( suppressCnt ){
      @ <tr><td><td><td>
      @ <small><i>... %d(suppressCnt) similar
      @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>
      suppressCnt = 0;
    }
    if( strcmp(zType,"div")==0 ){
      @ <tr><td colspan=3><hr></td></tr>
      continue;
    }
    if( memcmp(zDate, zPrevDate, 10) ){
      sprintf(zPrevDate, "%.10s", zDate);
      @ <tr><td>
      @   <div class="divider"><nobr>%s(zPrevDate)</nobr></div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td valign="top" align="right">%s(zTime)</td>
    @ <td width="20" align="left" valign="top">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
................................................................................
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }
    if( zBgClr && zBgClr[0] ){
      @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
    }else{
      @ <td valign="top" align="left">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"
                      " WHERE rid=%d AND tagid=%d AND tagtype>0",
                      rid, TAG_CLOSED) ){
          @ <b>Closed-Leaf:</b>
        }else{
          @ <b>Leaf:</b>
        }
      }
    }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
      hyperlink_to_uuid(zUuid);
    }
    db_column_blob(pQuery, commentColumn, &comment);
    if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
................................................................................
    if( xExtra ){
      xExtra(rid);
    }
    @ </td></tr>
  }
  if( suppressCnt ){
    @ <tr><td><td><td>
    @ <small><i>... %d(suppressCnt) similar
    @ event%s(suppressCnt>1?"s":"") omitted.</i></small></tr>

    suppressCnt = 0;
  }
  if( pGraph ){
    graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
    if( pGraph->nErr ){
      graph_free(pGraph);
      pGraph = 0;






|







 







|
|
|









|





|







 







|

|







|

|







 







|
|
>







190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
...
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
    wikiFlags = WIKI_INLINE | WIKI_NOBLOCK;
  }
  if( tmFlags & TIMELINE_GRAPH ){
    pGraph = graph_init();
    @ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
  }

  @ <table class="timelineTable">
  blob_zero(&comment);
  while( db_step(pQuery)==SQLITE_ROW ){
    int rid = db_column_int(pQuery, 0);
    const char *zUuid = db_column_text(pQuery, 1);
    int isLeaf = db_column_int(pQuery, 5);
    const char *zBgClr = db_column_text(pQuery, 6);
    const char *zDate = db_column_text(pQuery, 2);
................................................................................
        }else{
          commentColumn = 10;
        }
      }
    }
    prevTagid = tagid;
    if( suppressCnt ){
      @ <tr><td><td><td class="timelineOmitted">
      @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
      @ </tr>
      suppressCnt = 0;
    }
    if( strcmp(zType,"div")==0 ){
      @ <tr><td colspan=3><hr></td></tr>
      continue;
    }
    if( memcmp(zDate, zPrevDate, 10) ){
      sprintf(zPrevDate, "%.10s", zDate);
      @ <tr><td>
      @   <div class="divider">%s(zPrevDate)</div>
      @ </td></tr>
    }
    memcpy(zTime, &zDate[11], 5);
    zTime[5] = 0;
    @ <tr>
    @ <td class="timelineTimeStampCell">%s(zTime)</td>
    @ <td width="20" align="left" valign="top">
    if( pGraph && zType[0]=='c' ){
      int nParent = 0;
      int aParent[32];
      const char *zBr;
      int gidx;
      static Stmt qparent;
................................................................................
        zBr = "trunk";
      }
      gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr);
      db_reset(&qbranch);
      @ <div id="m%d(gidx)"></div>
    }
    if( zBgClr && zBgClr[0] ){
      @ <td class="timelineComment" bgcolor="%h(zBgClr)">
    }else{
      @ <td class="timelineComment">
    }
    if( zType[0]=='c' ){
      hyperlink_to_uuid(zUuid);
      if( isLeaf ){
        if( db_exists("SELECT 1 FROM tagxref"
                      " WHERE rid=%d AND tagid=%d AND tagtype>0",
                      rid, TAG_CLOSED) ){
          @ <div class="timelineLeafDsp">Closed-Leaf:</div>
        }else{
          @ <div class="timelineLeafDsp">Leaf:</div>
        }
      }
    }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
      hyperlink_to_uuid(zUuid);
    }
    db_column_blob(pQuery, commentColumn, &comment);
    if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
................................................................................
    if( xExtra ){
      xExtra(rid);
    }
    @ </td></tr>
  }
  if( suppressCnt ){
    @ <tr><td><td><td>
    @ <tr><td><td><td class="timelineOmitted">
    @ ... %d(suppressCnt) similar event%s(suppressCnt>1?"s":"") omitted.
    @ </tr>
    suppressCnt = 0;
  }
  if( pGraph ){
    graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
    if( pGraph->nErr ){
      graph_free(pGraph);
      pGraph = 0;