count; sIx++)
{
char *col = sortOrder->column[sIx];
ix = stringArrayIx(col, membership->subgroups, membership->count);
// TODO: Sort needs to expand from subGroups to labels as well
if (ix >= 0)
{
+ char *term = membership->membership[ix];
+ char *title = membership->titles[ix];
char *titleRoot=NULL;
- if (cvTermIsEmpty(col, membership->titles[ix]))
+ if (cvTermIsEmpty(col, title))
titleRoot = cloneString(" ");
else
- titleRoot = labelRoot(membership->titles[ix],NULL);
+ titleRoot = labelRoot(title, NULL);
// Each sortable column requires hidden goop (in the "abbr" field currently)
// which is the actual sort on value
- printf(" ",
- subtrack->track, col, membership->membership[ix]);
+ printf(" | ", subtrack->track, col, term);
+ printf(" ");
+ boolean printed = FALSE;
+ if (subgroupMetaHash)
+ {
+ struct hash *colHash = hashFindVal(subgroupMetaHash, col);
+ if (colHash)
+ {
+ struct meta *meta = hashFindVal(colHash, term);
+ if (meta != NULL)
+ {
+ if (meta->url == NULL || strlen(meta->url) == 0)
+ /* add pointer to suggest hover */
+ printf("%s",
+ meta->description, titleRoot);
+ else
+ printf("%s\n",
+ meta->description, meta->url, titleRoot);
+ printed = TRUE;
+ }
+ }
+ }
+ if (!printed)
printf("%s",titleRoot);
puts(" | ");
freeMem(titleRoot);
}
else if (sameString(col, SUBTRACK_COLOR_SUBGROUP))
{
char *hue = subtrackColorToCompare(subtrack);
printf(""
" | ",
subtrack->track, col, hue,
subtrack->colorR, subtrack->colorG, subtrack->colorB);
}
}
}
else // Non-sortable tables do not have sort by columns but will display a short label