67684c2ad66a59d5072ba734a2ed89e56df62bdc
kate
  Wed Oct 3 14:41:38 2012 -0700
Remove preview browser links on ENCODE config pages.  #9264.  Reuse the slot on menu for ENCODE portal link (long ago plan with Katrina)
diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 0470829..6702302 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -2524,49 +2524,30 @@
                 hTvFromString(cartUsualString(cart, tdb->track, hStringFromTv(tdb->visibility)));
         hTvDropDownClassVisOnly(tdb->track, tv, tdb->canPack,
                                 tv == tvHide ?  "hiddenText" : "normalText",
                                 trackDbSetting(tdb, "onlyVisibility"));
         }
     #endif///ndef SUPERS_WITH_CHECKBOXES
     printf("<TD>%s", tdb->longLabel);
     char *dataVersion = trackDbSetting(tdb, "dataVersion");
     if (dataVersion)
         printf("&nbsp&nbsp;<EM style='color:#666666; font-size:smaller;'>%s</EM>", dataVersion);
     printf("</TD></TR>");
     }
 printf("</TABLE>");
 }
 
-void previewLinks(char *db, struct trackDb *tdb)
-/* Informational messages about preview browser (ENCODE tracks only) */
-{
-if (trackDbSetting(tdb, "wgEncode") != NULL)
-    {
-    if (hIsPreviewHost())
-        {
-        printf("<p><b>WARNING</b>: This data is provided for early access via the Preview Browser -- it is unreviewed and subject to change. For high quality reviewed annotations, see the <a target=_blank href='http://%s/cgi-bin/hgTracks?db=%s'>Genome Browser</a>.",
-            "genome.ucsc.edu", db);
-        }
-    else
-        {
-        // TODO: use hTrackUiName()
-        printf("<p><b>NOTE</b>: Early access to additional track data may be available on the <a target=_blank href='http://%s/cgi-bin/hgTrackUi?db=%s&g=%s'>Preview Browser</A>.",
-            "genome-preview.ucsc.edu", db, tdb->track);
-        }
-    }
-}
-
 void specificUi(struct trackDb *tdb, struct trackDb *tdbList, struct customTrack *ct, boolean ajax)
 /* Draw track specific parts of UI. */
 {
 char *track = tdb->track;
 // Ideally check cfgTypeFromTdb()/cfgByCfgType() first, but with all these special cases already in
 //    place, lets be cautious at this time.
 // NOTE: Developer, please try to use cfgTypeFromTdb()/cfgByCfgType().
 
 boolean boxed = trackDbSettingClosestToHomeOn(tdb, "boxedCfg");
 // UI precedence:
 // 1) supers to get them out of the way: they have no controls
 // 2) special cases based upon track name (developer please avoid)
 // 3) cfgTypeFromTdb()/cfgByCfgType() <== prefered method
 // 4) special cases falling through the cracks but based upon type
 if (tdbIsSuperTrack(tdb))
@@ -2725,31 +2706,30 @@
         genericWiggleUi(tdb,7);
     else if (startsWithWord("array",tdb->type)) // not quite the same as "expRatio" (custom tracks)
         expRatioCtUi(tdb);
     else if (startsWithWord("factorSource",tdb->type))
         factorSourceUi(database,tdb);
     }
 
 if (!ajax) // ajax asks for a simple cfg dialog for right-click popup or hgTrackUi subtrack cfg
     {
     // Composites *might* have had their top level controls just printed,
     // but almost certainly have additional controls
     if (tdbIsComposite(tdb))  // for the moment generalizing this to include other containers...
         hCompositeUi(database, cart, tdb, NULL, NULL, MAIN_FORM);
 
     // Additional special case navigation links may be added
-    previewLinks(database, tdb);
     extraUiLinks(database,tdb);
     }
 }
 
 #ifdef UNUSED
 static void findSuperChildrenAndSettings(struct trackDb *tdbList, struct trackDb *super)
 /* Find the tracks that have super as a parent and stuff references to them on
  * super's children list. Also do some visibility and parentName futzing. */
 {
 struct trackDb *tdb;
 for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
     {
     if (tdb->parent == super)
         {
 	trackDbSuperMemberSettings(tdb);  /* This adds tdb to tdb->parent->children. */
@@ -2961,37 +2941,31 @@
                 safef(buf, sizeof(buf), "document.customTrackForm.submit();return false;");
             cgiMakeOnClickButton(buf, "Update custom track");
             }
         }
     }
 
 if (!tdbIsSuper(tdb) && !tdbIsDownloadsOnly(tdb) && !ajax)
     {
     // NAVLINKS - For pages w/ matrix, add Description, Subtracks and Downloads links
     if (trackDbSetting(tdb, "dimensions")
     ||  (trackDbSetting(tdb, "wgEncode") && tdbIsComposite(tdb)))
         {
         printf("\n&nbsp;&nbsp;<span id='navDown' style='float:right; display:none;'>");
         if (trackDbSetting(tdb, "wgEncode"))
             {
-            if (!hIsPreviewHost())
-                {
-                // TODO: get from hui.c
-                printf("<A TARGET=_BLANK HREF='http://%s/cgi-bin/hgTrackUi?db=%s&g=%s' "
-                       "TITLE='Early access to unreviewed new data on the Preview Browser...'>"
-                       "Preview</A>", "genome-preview.ucsc.edu", database, tdb->track);
-                }
+            printf("<A TARGET=_BLANK HREF='../ENCODE/index.html' TITLE='ENCODE Portal'>ENCODE</A>");
             printf("&nbsp;&nbsp;");
             makeDownloadsLink(database, tdb);
             }
         char *downArrow = "&dArr;";
         enum browserType browser = cgiBrowser();
         if (browser == btIE || browser == btFF)
             downArrow = "&darr;";
         printf("&nbsp;&nbsp;<A HREF='#DISPLAY_SUBTRACKS' TITLE='Jump to subtracks section of "
                "page'>Subtracks%s</A>",downArrow);
         printf("&nbsp;&nbsp;<A HREF='#TRACK_HTML' TITLE='Jump to description section of page'>"
                "Description%s</A>",downArrow);
         printf("&nbsp;</span>");
         }
     }
 if (!tdbIsSuperTrack(tdb) && !tdbIsComposite(tdb))