8095e6a593aa1e57b48432753eb5d65f45383ab9 kate Fri Oct 5 11:12:11 2012 -0700 Add ENCODE log and portal link, for consistency with hgTrackUi diff --git src/hg/hgFileUi/hgFileUi.c src/hg/hgFileUi/hgFileUi.c index f69cdd8..6f48201 100644 --- src/hg/hgFileUi/hgFileUi.c +++ src/hg/hgFileUi/hgFileUi.c @@ -17,57 +17,70 @@ void fileUi(struct cart *cart,struct trackDb *tdb, char *db, char *chrom, boolean ajax) // Downloadable Files UI { if (!ajax) { jsIncludeFile("jquery.js", NULL); webIncludeResourceFile("jquery-ui.css"); jsIncludeFile("jquery-ui.js", NULL); jsIncludeFile("utils.js",NULL); } // QUESTION: Is this needed? Are we doing a submit on hgTrackUi to get here?? Probably not. //if(tdbIsContainer(tdb) && !ajax) // cartTdbTreeReshapeIfNeeded(cart,tdb); +if (trackDbSetting(tdb, "wgEncode")) + { + printf("<A HREF='/ENCODE/index.html'><IMG style='vertical-align:middle;' " + "width=100 src='/images/ENCODE_scaleup_logo.png'><A>"); + } printf("<B style='font-size:200%%;'>%s</B>\n", tdb->longLabel); // If Composite, link to the hgTrackUi. But if downloadsOnly then link to any superTrack. #define LINK_TO_PARENT "%s<b>(<A HREF='%s?%s=%u&c=%s&g=%s' " \ "title='Link to %s track settings'><IMG height=12 " \ "src='../images/ab_up.gif'>%s</A>)</B>\n" if (tdbIsComposite(tdb)) { char *encodedTrackName = cgiEncode(tdb->track); printf(LINK_TO_PARENT," ", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), chrom, encodedTrackName,tdb->shortLabel,"Track settings"); freeMem(encodedTrackName); } else if (tdb->parent) //Print link for parent track { char *encodedTrackName = cgiEncode(tdb->parent->track); printf(LINK_TO_PARENT," ", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), chrom, encodedTrackName, tdb->parent->shortLabel, tdb->parent->shortLabel); freeMem(encodedTrackName); } // NAVLINKS - Link to Description down below if (tdb->html != NULL && tdb->html[0] != 0) { printf("<span id='navDown' style='float:right; display:none;'>"); - // First put up a button to go to File Search + + if (trackDbSetting(tdb, "wgEncode")) + { + // Link to ENCODE home page + printf("<A TARGET=_BLANK HREF='../ENCODE/index.html' TITLE='ENCODE Portal'>ENCODE</A>"); + printf(" "); + } + + // Link to File Search printf("<A HREF='hgFileSearch?db=%s' TITLE='Search for other downloadable files ...'>" "File Search</A> ",db); // Now link to description char *downArrow = "⇓"; enum browserType browser = cgiBrowser(); if (browser == btIE || browser == btFF) downArrow = "↓"; printf("<A HREF='#TRACK_HTML' TITLE='Jump to description section of page'>Description%s</A>", downArrow); printf("</span>"); } puts("<BR>"); filesDownloadUi(db,cart,tdb);