871f2d654975f77385c1bccb62aa4d8f41f9f294 max Fri Aug 27 05:18:24 2021 -0700 Adding "search help" link to hgTracks, refs #15554 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 60cc987..74c42f8 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -8051,30 +8051,41 @@ freeMem(url); freeMem(longLabel); } // show the folder icon from the font-awesome collection. // the icon collection also contains a "fa fa-folder-o" icon, which is the outline. It was decided to use only the filled out icon for now. if (tdbIsSuper(track->tdb) || tdbIsComposite(track->tdb)) hPrintf(""); hPrintf(" %s", track->shortLabel); hPrintf("
"); if (track->hasUi) hPrintf(""); } +void printSearchHelpLink() +/* print the little search help link next to the go button */ +{ +char *url = cfgOption("searchHelpUrl"); +char *label = cfgOptionDefault("searchHelpLabel", "Search Help"); +if (!url) + return; + +printf("
%s
", url, label); +} + void doTrackForm(char *psOutput, struct tempName *ideoTn) /* Make the tracks display form with the zoom/scroll buttons and the active * image. If the ideoTn parameter is not NULL, it is filled in if the * ideogram is created. */ { struct group *group; struct track *track; char *freezeName = NULL; boolean hideAll = cgiVarExists("hgt.hideAll"); boolean hideTracks = cgiOptionalString( "hideTracks") != NULL; boolean defaultTracks = cgiVarExists("hgt.reset"); boolean showedRuler = FALSE; boolean showTrackControls = cartUsualBoolean(cart, "trackControlsOnMain", TRUE); boolean multiRegionButtonTop = cfgOptionBooleanDefault(MULTI_REGION_CFG_BUTTON_TOP, FALSE); long thisTime = 0, lastTime = 0; @@ -8740,30 +8751,33 @@ { pressedClass = "pressed"; showVirtRegions = "show multi-region position ranges and "; } hPrintf("%s", pressedClass, showVirtRegions, addCommasToPos(database, position)); hPrintf("\n", buf); sprintLongWithCommas(buf, virtWinEnd - virtWinStart); hPrintf(" %s bp. ", buf); hPrintf("\n", multiRegionButtonTop ? 50 : 60); hWrites(" "); hButton("goButton", "go"); + printSearchHelpLink(); + + if (!trackHubDatabase(database)) { jsonObjectAdd(jsonForClient, "assemblySupportsGeneSuggest", newJsonBoolean(assemblySupportsGeneSuggest(database))); if (assemblySupportsGeneSuggest(database)) hPrintf("\n", assemblyGeneSuggestTrack(database)); } // hg.conf controlled links // database-specific link: 2 hg.conf settings, format _TopLink{Label} struct slName *dbLinks = cfgNamesWithPrefix(database); struct slName *link; char *dbTopLink = NULL, *dbTopLinkLabel = NULL; for (link = dbLinks; link != NULL; link = link->next) {