count; sIx++)
{
+ ix = -1;
char *col = sortOrder->column[sIx];
+ if (membership)
ix = stringArrayIx(col, membership->subgroups, membership->count);
// TODO: Sort needs to expand from subGroups to labels as well
+
+ // only print the warning message for trackDb errors and not for the
+ // default sortable columns of trackName and dateUnrestricted
+ if ( (!membership || (membership && ix == -1) ) &&
+ !(sameString(col, "trackName") || sameString(col, "dateUnrestricted")) )
+ {
+ printf("Missing subgroup | ");
+ }
+ else
+ {
if (ix >= 0)
{
char *term = membership->membership[ix];
char *title = membership->titles[ix];
char *titleRoot=NULL;
if (cvTermIsEmpty(col, title))
titleRoot = cloneString(" ");
else
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, term);
printf(" ");
char *link = NULL;
if (vocabHash)
@@ -4853,30 +4865,31 @@
}
printf("%s", link ? link : 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
{ // (which may be a configurable link)
if (settings->colorPatch)
{
printf(" | ",
subtrack->colorR, subtrack->colorG, subtrack->colorB);
}
printf(" ");
hierarchy_t *hierarchy = hierarchySettingGet(parentTdb);
indentIfNeeded(hierarchy,membership);
hierarchyFree(&hierarchy);
printf("%s",subtrack->shortLabel);
puts(" | ");
}