70ac37ee2a1983b0f202c3727ff36c4e460751af kate Mon Dec 17 19:46:44 2018 -0800 Add Projects drop-down to top bar on static pages and gateway. refs #22679 diff --git src/hg/hgTracks/menu.c src/hg/hgTracks/menu.c index e817f04..c836ee5 100644 --- src/hg/hgTracks/menu.c +++ src/hg/hgTracks/menu.c @@ -219,30 +219,34 @@ slFreeList(links); } void printMenuBar() /* Put up the special menu bar for hgTracks. */ { struct hotLink *links = NULL; struct sqlConnection *conn = NULL; if (!trackHubDatabase(database)) conn = hAllocConn(database); char *menuStr, buf[4096], uiVars[1024]; safef(uiVars, sizeof(uiVars), "%s=%s", cartSessionVarName(), cartSessionId(cart)); menuStr = menuBar(cart, database); +/* hide Projects dropdown (just used by static and gateway pages */ +menuStr = replaceChars(menuStr, "", "", "OPTIONAL_PROJECT_MENU_END -->"); + // Create top items in view menu safef(buf, sizeof(buf), "../cgi-bin/hgTracks?%s&hgt.psOutput=on", uiVars); appendLink(&links, buf, "PDF/PS", "pdfLink", FALSE); safef(buf, sizeof(buf), "%s&o=%d&g=getDna&i=mixed&c=%s&l=%d&r=%d&db=%s&%s", hgcNameAndSettings(), winStart, chromName, winStart, winEnd, database, uiVars); //appendLink(&links, buf, "DNA", "dnaLink", FALSE); appendLinkWithShortcut(&links, buf, "DNA", "dnaLink", "Show DNA sequence in view", "v d", FALSE, FALSE); safef(buf, sizeof(buf), "../cgi-bin/hgConvert?hgsid=%s&db=%s", cartSessionId(cart), database); appendLink(&links, buf, "In Other Genomes (Convert)", "convertMenuLink", FALSE); // add the sendTo menu if (fileExists("extTools.ra")) { appendLinkWithOnclick(&links, "#", "In External Tools", "extToolLink", "Show current sequence on a third-party website", "showExtToolDialog(); return false;", "s t", FALSE, FALSE); } @@ -384,19 +388,21 @@ safef(buf, sizeof(buf), "../cgi-bin/hgTracks?%s&hgt.reset=on", uiVars); appendLinkWithShortcut(&links, buf, "Default Tracks", "defaultTracksMenuLink", "Show only default tracks", "d t", FALSE, FALSE); safef(buf, sizeof(buf), "../cgi-bin/hgTracks?%s&hgt.defaultImgOrder=on", uiVars); appendLinkWithShortcut(&links, buf, "Default Track Order", "defaultTrackOrderMenuLink", "Re-order tracks to be in default order", "d o", FALSE, FALSE); appendLinkWithOnclick(&links, "#", "Remove all highlights", "cleaerHighlightLink", "Remove all highlights on all genomes", "highlightCurrentPosition('clear'); $('ul.nice-menu li ul').hide();", "h c", FALSE, FALSE); appendLinkWithShortcut(&links, "../cgi-bin/cartReset", "Reset All User Settings", "cartResetMenuLink", "Clear user data, e.g. active tracks, track configuration, custom data, ...", "c r", FALSE, FALSE); struct dyString *viewMenu = dyStringCreate("\n"); menuStr = replaceChars(menuStr, "", dyStringCannibalize(&viewMenu)); menuStr = replaceChars(menuStr, "id=\"main-menu-whole\"", "id=\"hgTracks-main-menu-whole\""); menuStr = replaceChars(menuStr, "id=\"home-link\"", "id=\"hgTracks-home-link\""); + + hPuts(menuStr); freez(&menuStr); }