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("<i id='folderIcon' class='fa fa-folder'></i>"); hPrintf(" %s", track->shortLabel); hPrintf("<BR> "); if (track->hasUi) hPrintf("</A>"); } +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("<div id='searchHelp'><a target=_blank title='Documentation on what you can enter into the Genome Browser search box' href='%s'>%s</a></div>", 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("<span class='positionDisplay %s' id='positionDisplay' " "title='click to %s copy position to input box'>%s</span>", pressedClass, showVirtRegions, addCommasToPos(database, position)); hPrintf("<input type='hidden' name='position' id='position' value='%s'>\n", buf); sprintLongWithCommas(buf, virtWinEnd - virtWinStart); hPrintf(" <span id='size'>%s</span> bp. ", buf); hPrintf("<input class='positionInput' type='text' name='hgt.positionInput' id='positionInput'" " size='%d'>\n", multiRegionButtonTop ? 50 : 60); hWrites(" "); hButton("goButton", "go"); + printSearchHelpLink(); + + if (!trackHubDatabase(database)) { jsonObjectAdd(jsonForClient, "assemblySupportsGeneSuggest", newJsonBoolean(assemblySupportsGeneSuggest(database))); if (assemblySupportsGeneSuggest(database)) hPrintf("<input type='hidden' name='hgt.suggestTrack' id='suggestTrack' value='%s'>\n", assemblyGeneSuggestTrack(database)); } // hg.conf controlled links // database-specific link: 2 hg.conf settings, format <db>_TopLink{Label} struct slName *dbLinks = cfgNamesWithPrefix(database); struct slName *link; char *dbTopLink = NULL, *dbTopLinkLabel = NULL; for (link = dbLinks; link != NULL; link = link->next) {