15746316e92290a4aee220a757cb35293176d6e8
max
  Tue Feb 7 05:29:10 2023 -0800
adding file download links directly to the table browser "schema / data format" button, refs #30491

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 9c53fe9..25060ed 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -164,33 +164,33 @@
 }
 
 boolean makeSchemaLink(char *db,struct trackDb *tdb,char *label)
 // Make a table schema link (if appropriate and then returns TRUE)
 {
 #define SCHEMA_LINKED "<A HREF=\"../cgi-bin/hgTables?db=%s&hgta_group=%s&hgta_track=%s" \
 		  "&hgta_table=%s&hgta_doSchema=describe+table+schema\" " \
 		  "TARGET=ucscSchema%s>%s</A>"
 if (trackDataAccessible(db, tdb) && differentString("longTabix", tdb->type))
     // FIXME: hgTables.showSchmaLongTabix is a currently a dummy routine, so let's not got here
     // until it's implemented
     {
     char *tbOff = trackDbSetting(tdb, "tableBrowser");
     if (isNotEmpty(tbOff) && sameString(nextWord(&tbOff), "off"))
 	return FALSE;
-    char *hint = " title='Open table schema in new window'";
+    char *hint = " title='Open data format (table schema) in new window'";
     if (label == NULL)
-	label = " View table schema";
+	label = " View data format";
     struct trackDb *topLevel = trackDbTopLevelSelfOrParent(tdb);
     printf(SCHEMA_LINKED, db, topLevel->grp, topLevel->track, tdb->table, hint, label);
     return TRUE;
     }
 return FALSE;
 }
 
 char *wgEncodeVocabLink(char *file,char *term,char *value,char *title, char *label,char *suffix)
 // returns allocated string of HTML link to controlled vocabulary term
 {
 #define VOCAB_LINK_WITH_FILE "<A HREF='hgEncodeVocab?ra=%s&%s=\"%s\"' title='%s details' " \
 			 "class='cv' TARGET=ucscVocab>%s</A>"
 #define VOCAB_LINK "<A HREF='hgEncodeVocab?%s=\"%s\"' title='%s details' class='cv' " \
 	       "TARGET=ucscVocab>%s</A>"
 struct dyString *dyLink = NULL;
@@ -563,31 +563,31 @@
 int links = 0;
 if (schemaLink)
     links++;
 if (downloadLink)
     links++;
 
 if (links > 0)
     cgiDown(0.7);
 if (links > 1)
     printf("<table><tr><td nowrap>View table: ");
 
 if (schemaLink && differentString("longTabix", tdb->type) && !isCustomComposite(tdb))
     // FIXME: hgTables.showSchmaLongTabix is a currently a dummy routine, so let's not got here
     // until it's implemented
     {
-    makeSchemaLink(db,tdb,(links > 1 ? "schema":"View table schema"));
+    makeSchemaLink(db,tdb,(links > 1 ? "Data format":"Data schema/format description and download"));
     if (downloadLink)
 	printf(", ");
     }
 if (downloadLink)
     {
     // special case exception (hg18:NHGRI BiPs are in 7 different dbs but only hg18 has downloads):
     char *targetDb = trackDbSetting(tdb, "compareGenomeLinks");
     if (targetDb != NULL)
 	{
 	targetDb = cloneFirstWordByDelimiter(targetDb,'=');
 	if (!startsWith("hg",targetDb))
 	    freez(&targetDb);
 	}
     if (targetDb == NULL)
 	targetDb = cloneString(db);
@@ -5513,31 +5513,31 @@
 	// and contained (made in js) is position:relative; left: -{some pixels}
 	#define CFG_SUBTRACK_DIV "<DIV id='div_cfg_%s' class='subCfg %s' style='display:none; " \
 				 "overflow:visible;'></DIV>"
 	#define MAKE_CFG_SUBTRACK_DIV(table,view) \
 					printf(CFG_SUBTRACK_DIV,(table),(view)?(view):"noView")
 	char * view = NULL;
 	if (membersForAll->members[dimV] && membership != NULL && -1 !=
 			    (ix = stringArrayIx(membersForAll->members[dimV]->groupTag,
 						membership->subgroups, membership->count)))
 	    view = membership->membership[ix];
 	MAKE_CFG_SUBTRACK_DIV(subtrack->track,view);
 	}
 
     // A schema link for each track
     printf("</td>\n<TD>&nbsp;");
-    makeSchemaLink(db,subtrack,"Schema");
+    makeSchemaLink(db,subtrack,"Data format");
     printf("&nbsp;");
 
     // Do we have a restricted until date?
     if (restrictions)
 	{
 	char *dateDisplay = encodeRestrictionDate(db,subtrack,FALSE); // includes dates in the past
 	if (dateDisplay)
 	    {
 	    if (dateIsOld(dateDisplay, MDB_ENCODE_DATE_FORMAT))
 		printf("</TD>\n<TD align='center' nowrap style='color: #BBBBBB;'>&nbsp;%s&nbsp;",
 		       dateDisplay);
 	    else
 		printf("</TD>\n<TD align='center'>&nbsp;%s&nbsp;", dateDisplay);
 	    }
 	}