b038f3dafce99493b0ca00305538c6a3dd6f041a
jcasper
  Tue Sep 26 15:58:44 2023 -0700
Initial commit of track decorators, refs #30237

diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 7222fe5..b8c42ce 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -40,30 +40,31 @@
 #include "hubConnect.h"
 #include "trackHub.h"
 #include "pcrResult.h"
 #include "dgv.h"
 #include "transMapStuff.h" 
 #include "vcfUi.h" 
 #include "bbiFile.h"
 #include "ensFace.h"
 #include "microarray.h"
 #include "trackVersion.h"
 #include "gtexUi.h"
 #include "genbank.h"
 #include "botDelay.h"
 #include "customComposite.h"
 #include "hicUi.h"
+#include "decoratorUi.h"
     
 #ifdef USE_HAL 
 #include "halBlockViz.h"
 #endif 
 
 #define MAIN_FORM "mainForm"
 #define WIGGLE_HELP_PAGE  "../goldenPath/help/hgWiggleTrackHelp.html"
 
 /* for earlyBotCheck() function at the beginning of main() */
 #define delayFraction   0.25    /* standard penalty is 1.0 for most CGIs */
                                 /* this one is 0.25 */
 static boolean issueBotWarning = FALSE;
 
 struct cart *cart = NULL;	/* Cookie cart with UI settings */
 char *database = NULL;		/* Current database. */
@@ -3484,30 +3485,43 @@
         if (trackDbSetting(tdb, "wgEncode") && isEncode2(database, tdb->track))
             {
             printf("&nbsp;&nbsp;<A HREF='#TRACK_CREDITS' TITLE='Jump to ENCODE lab contacts for this data'>"
                "Contact%s</A>", downArrow);
             }
         printf("&nbsp;</span>");
         }
     }
 if (!tdbIsSuperTrack(tdb) && !tdbIsComposite(tdb))
     puts("<BR>");
 
 if (tdbIsDownloadsOnly(tdb))             // Composites without tracks but with files to download
     filesDownloadUi(database,cart,tdb);  // are tdb->type: downloadsOnly
 else
     specificUi(tdb, tdbList, ct, ajax);
+
+// Decorator UI
+struct slName *decoratorSettings = trackDbSettingsWildMatch(tdb, "decorator.*");
+if (decoratorSettings)
+    {
+    char *browserVersion;
+    if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
+        htmlHorizontalLine();
+    else
+        printf("<HR ALIGN='bottom' style='position:relative; top:1em;'>");
+    decoratorUi(tdb, cart, decoratorSettings);
+    }
+
 puts("</FORM>");
 
 if (ajax)
     return;
 
 if (ct)
     {
     /* hidden form for custom tracks CGI */
     printf("<FORM ACTION='%s' NAME='customTrackForm'>", hgCustomName());
     cartSaveSession(cart);
     cgiMakeHiddenVar(CT_SELECTED_TABLE_VAR, tdb->track);
     puts("</FORM>\n");
     if (ct->bbiFile)
 	{
 	time_t timep = bbiUpdateTime(ct->bbiFile);