Diff
Not logged in

Differences From Artifact [033cc5be81]:

To Artifact [4f58b30dca]:


1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034

1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046






1047
1048

1049
1050
1051


1052
1053
1054
1055
1056
1057
1058
1059
1060
*/
static void brtimeline_extra(
  Stmt *pQuery,               /* Current row of the timeline query */
  int tmFlags,                /* Flags to www_print_timeline() */
  const char *zThisUser,      /* Suppress links to this user */
  const char *zThisTag        /* Suppress links to this tag */
){
  int rid = db_column_int(pQuery, 0);
  Stmt q;
  if( !g.perm.Hyperlink ) return;
  db_prepare(&q,
    "SELECT substr(tagname,5) FROM tagxref, tag"

    " WHERE tagxref.rid=%d"
    "   AND tagxref.tagid=tag.tagid"
    "   AND tagxref.tagtype>0"
    "   AND tag.tagname GLOB 'sym-*'",
    rid
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zTagName = db_column_text(&q, 0);
#define OLD_STYLE 1
#if OLD_STYLE
    @  %z(href("%R/timeline?r=%T",zTagName))[timeline]</a>
#else






    char *zBrName = branch_of_rid(rid);
    @  <strong>%h(zBrName)</strong><br>\

    @  %z(href("%R/timeline?r=%T",zTagName))<button>timeline</button></a>
    fossil_free(zBrName);
#endif


  }
  db_finalize(&q);
}

/*
** WEBPAGE: brtimeline
**
** List the first check of every branch, starting with the most recent
** and going backwards in time.







|
|
<
|
|
>
|
<
<
<
|
<
<
<
<
<
<
|
>
>
>
>
>
>
|
<
>
|
<
<
>
>

<







1023
1024
1025
1026
1027
1028
1029
1030
1031

1032
1033
1034
1035



1036






1037
1038
1039
1040
1041
1042
1043
1044

1045
1046


1047
1048
1049

1050
1051
1052
1053
1054
1055
1056
*/
static void brtimeline_extra(
  Stmt *pQuery,               /* Current row of the timeline query */
  int tmFlags,                /* Flags to www_print_timeline() */
  const char *zThisUser,      /* Suppress links to this user */
  const char *zThisTag        /* Suppress links to this tag */
){
  int rid;
  int tmFlagsNew;

  char *zBrName;

  if( (tmFlags & (TIMELINE_CLASSIC|TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){
    tmFlagsNew = (tmFlags & ~TIMELINE_VIEWS) | TIMELINE_MODERN;



    cgi_printf("(");






  }else{
    tmFlagsNew = tmFlags;
  }
  timeline_extra(pQuery,tmFlagsNew,zThisUser,zThisTag);

  if( !g.perm.Hyperlink ) return;
  rid = db_column_int(pQuery,0);
  zBrName = branch_of_rid(rid);

  @  branch:&nbsp;<span class='timelineHash'>\
  @ %z(href("%R/timeline?r=%T",zBrName))%h(zBrName)</a></span>


  if( (tmFlags & (TIMELINE_CLASSIC|TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){
    cgi_printf(")");
  }

}

/*
** WEBPAGE: brtimeline
**
** List the first check of every branch, starting with the most recent
** and going backwards in time.
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_set_current_feature("branch");
  style_header("Branches");
  style_submenu_element("Branch List", "brlist");
  login_anonymous_available();
#if OLD_STYLE
  timeline_ss_submenu();
#endif
  cgi_check_for_malice();
  @ <h2>First check-in for every branch, starting with the most recent
  @ and going backwards in time.</h2>
  blob_append(&sql, timeline_query_for_www(), -1);
  blob_append_sql(&sql,
    "AND blob.rid IN (SELECT rid FROM tagxref"
    "                  WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH);
  if( fNoHidden || fOnlyHidden ){
    const char* zUnaryOp = fNoHidden ? "NOT" : "";
    blob_append_sql(&sql,
      " AND %s EXISTS(SELECT 1 FROM tagxref"
      " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n",
      zUnaryOp/*safe-for-%s*/, TAG_HIDDEN);
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
  blob_reset(&sql);
  /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too
  ** many descenders to (off-screen) parents. */
  tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;
#if !OLD_STYLE
  tmFlags |= TIMELINE_COLUMNAR;
#endif
  if( PB("ubg")!=0 ){
    tmFlags |= TIMELINE_UCOLOR;
  }else{
    tmFlags |= TIMELINE_BRCOLOR;
  }
  www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
  db_finalize(&q);







<

<



















<
<
<







1069
1070
1071
1072
1073
1074
1075

1076

1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095



1096
1097
1098
1099
1100
1101
1102
  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_set_current_feature("branch");
  style_header("Branches");
  style_submenu_element("Branch List", "brlist");
  login_anonymous_available();

  timeline_ss_submenu();

  cgi_check_for_malice();
  @ <h2>First check-in for every branch, starting with the most recent
  @ and going backwards in time.</h2>
  blob_append(&sql, timeline_query_for_www(), -1);
  blob_append_sql(&sql,
    "AND blob.rid IN (SELECT rid FROM tagxref"
    "                  WHERE tagtype>0 AND tagid=%d AND srcid!=0)", TAG_BRANCH);
  if( fNoHidden || fOnlyHidden ){
    const char* zUnaryOp = fNoHidden ? "NOT" : "";
    blob_append_sql(&sql,
      " AND %s EXISTS(SELECT 1 FROM tagxref"
      " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n",
      zUnaryOp/*safe-for-%s*/, TAG_HIDDEN);
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_sql_text(&sql));
  blob_reset(&sql);
  /* Always specify TIMELINE_DISJOINT, or graph_finish() may fail because of too
  ** many descenders to (off-screen) parents. */
  tmFlags = TIMELINE_DISJOINT | TIMELINE_NOSCROLL;



  if( PB("ubg")!=0 ){
    tmFlags |= TIMELINE_UCOLOR;
  }else{
    tmFlags |= TIMELINE_BRCOLOR;
  }
  www_print_timeline(&q, tmFlags, 0, 0, 0, 0, 0, brtimeline_extra);
  db_finalize(&q);