a9c71c94309db1f28fc29cbb2d9c062e79c7201f lrnassar Fri Sep 4 14:58:18 2026 -0700 BLAT dated banner: make the news announcement URL an hg.conf setting. refs #37996 blatNewFormNewsUrl, defaulting to the news archive page, so the banner can point at the announcement's anchor once it is published without a CGI rebuild. Documented in ex.hg.conf. diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 9112a8d2d3d..6188f8fe540 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -830,37 +830,42 @@ /* On the classic search form, offer the JavaScript-built one. Without this the new form's "go back * to the original page" link is a one-way door. * Shown wherever the new form is enabled (blatNewForm), which is what makes the round trip work; * blatNewFormBanner overrides that in either direction. On a machine where the new form is off * there is nothing to advertise, so nothing is printed. */ { if (!cfgOptionBooleanDefault("blatNewFormBanner", cfgOptionBooleanDefault("blatNewForm", FALSE))) return; printBlatBannerStyle(); /* Once a switch-over date is announced (hg.conf blatNewFormSwitchDate, e.g. "October 21"), the * banner names it, so a slipped date is an hg.conf change rather than a CGI build patch. With no * date set, the original "we are testing" invitation is shown. */ char *switchDate = cfgOption("blatNewFormSwitchDate"); if (isNotEmpty(switchDate)) + { + /* Where "news announcement" points; defaults to the news archive until the announcement is + * drafted, then hg.conf can aim it at the item's anchor without a CGI rebuild. */ + char *newsUrl = cfgOptionDefault("blatNewFormNewsUrl", "../goldenPath/newsarch.html"); printf("<div class=\"blatBanner\">" "We will be updating this BLAT page on <b>%s</b>. " "You can <a href=\"hgBlat?blatNewForm=1&%s=%s\">try the new page now</a> and provide " "feedback to <a href=\"mailto:genome@soe.ucsc.edu\">genome@soe.ucsc.edu</a>. " - "See our <a href=\"../goldenPath/newsarch.html\">news announcement</a> for more " + "See our <a href=\"%s\">news announcement</a> for more " "information.</div>\n", - switchDate, cartSessionVarName(), cartSessionId(cart)); + switchDate, cartSessionVarName(), cartSessionId(cart), newsUrl); + } else printf("<div class=\"blatBanner\">" "We are testing a <a href=\"hgBlat?blatNewForm=1&%s=%s\">new BLAT search page</a>. " "If you have feedback on this new page, do not hesitate to let us know via " "<a href=\"mailto:genome@soe.ucsc.edu\">genome@soe.ucsc.edu</a>.</div>\n", cartSessionVarName(), cartSessionId(cart)); } static void printNewDisplayBanner(char *uiState) /* On the classic hyperlink results page, offer a one-click switch to the modern Table display. * The link sets the blatNewPage cart variable (so the choice sticks for future searches) and * reopens the current results (blatReopen) in the new format. * The banner is OFF by default while the new page is still being tested; set blatNewPageBanner=on * in hg.conf to advertise the new page - without releasing new CGIs. The new display itself stays * reachable by users who already opted in or use a direct blatNewPage=1 link. */