Fossil

Check-in [58cfff2a]
Login

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

Overview
Comment:Default the /timeline format to "comment (detail)".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 58cfff2a4aa7ae490b08d590d64de1bb4a1a25f3423870f95220cb95396b34f0
User & Date: drh 2017-11-26 01:41:58
Context
2017-11-26
02:04
Add a Help submenu item to the /timeline page, so that advanced users can quickly see all of the query parameters, and perhaps start to enter them directly on the URL. check-in: 44a5ac41 user: drh tags: trunk
01:41
Default the /timeline format to "comment (detail)". check-in: 58cfff2a user: drh tags: trunk
01:37
The javascript Advanced/Basic toggles on the timelines is working well enough now to merge to trunk. check-in: e91d2672 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/finfo.c.

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
  login_anonymous_available();
  url_initialize(&url, "finfo");
  if( brBg ) url_add_parameter(&url, "brbg", 0);
  if( uBg ) url_add_parameter(&url, "ubg", 0);
  baseCheckin = name_to_rid_www("ci");
  zPrevDate[0] = 0;
  zFilename = PD("name","");
  eCommentFormat = db_get_int("timeline-comment-format", 0);
  bShowDetail = (eCommentFormat & 1)==0;  /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0; 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;
  }







|







328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
  login_anonymous_available();
  url_initialize(&url, "finfo");
  if( brBg ) url_add_parameter(&url, "brbg", 0);
  if( uBg ) url_add_parameter(&url, "ubg", 0);
  baseCheckin = name_to_rid_www("ci");
  zPrevDate[0] = 0;
  zFilename = PD("name","");
  eCommentFormat = db_get_int("timeline-comment-format", 4);
  bShowDetail = (eCommentFormat & 1)==0;  /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0; 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;
  }

Changes to src/setup.c.

1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
  db_begin_transaction();
  @ <form action="%s(g.zTop)/setup_timeline" method="post"><div>
  login_insert_csrf_secret();
  @ <p><input type="submit"  name="submit" value="Apply Changes" /></p>

  @ <hr />
  multiple_choice_attribute("Comment Format", "timeline-comment-format",
            "tcf", "0", count(azCommentFormats)/2, azCommentFormats);
  @ <p>Each timeline entry contains between one and three of the following subsections:
  @ <blockquote><table border=0 cellpadding=0>
  @ <tr><td>[hash]<td>&nbsp;&nbsp;<td>an artifact hash with a hyperlink to a detail page
  @ <tr><td>comment<td><td>the check-in comment or other text describing the item
  @ <tr><td>(details)<td><td>details about the entry, such as the user, branch, tags, etc.
  @ </table></blockquote>
  @ This setting selects which of the three subsections are included on each







|







1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
  db_begin_transaction();
  @ <form action="%s(g.zTop)/setup_timeline" method="post"><div>
  login_insert_csrf_secret();
  @ <p><input type="submit"  name="submit" value="Apply Changes" /></p>

  @ <hr />
  multiple_choice_attribute("Comment Format", "timeline-comment-format",
            "tcf", "4", count(azCommentFormats)/2, azCommentFormats);
  @ <p>Each timeline entry contains between one and three of the following subsections:
  @ <blockquote><table border=0 cellpadding=0>
  @ <tr><td>[hash]<td>&nbsp;&nbsp;<td>an artifact hash with a hyperlink to a detail page
  @ <tr><td>comment<td><td>the check-in comment or other text describing the item
  @ <tr><td>(details)<td><td>details about the entry, such as the user, branch, tags, etc.
  @ </table></blockquote>
  @ This setting selects which of the three subsections are included on each

Changes to src/timeline.c.

266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
  mxWikiLen = db_get_int("timeline-max-comment", 0);
  dateFormat = db_get_int("timeline-date-format", 0);
  bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
  {
    /* Undocumented query parameter commentformat=N takes a numeric parameter to
    ** adjust the comment-format for testing purposes. */
    const char *z = P("commentformat");
    eCommentFormat = z ? atoi(z) : db_get_int("timeline-comment-format", 0);
  }
  bShowDetail = (eCommentFormat & 1)==0;      /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0;  /* Bit 3 turns on the detail column */ 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;







|







266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
  mxWikiLen = db_get_int("timeline-max-comment", 0);
  dateFormat = db_get_int("timeline-date-format", 0);
  bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
  {
    /* Undocumented query parameter commentformat=N takes a numeric parameter to
    ** adjust the comment-format for testing purposes. */
    const char *z = P("commentformat");
    eCommentFormat = z ? atoi(z) : db_get_int("timeline-comment-format", 4);
  }
  bShowDetail = (eCommentFormat & 1)==0;      /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0;  /* Bit 3 turns on the detail column */ 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;