2731d1d3e2a736c624ee06e279b0a7a8edfee4bb kent Tue Dec 7 11:00:27 2010 -0800 Adding 'import tracks' button to hgGateway. diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c index 6ae6c8e..4583cd4 100644 --- src/hg/hgGateway/hgGateway.c +++ src/hg/hgGateway/hgGateway.c @@ -1,30 +1,31 @@ /* hgGateway - Human Genome Browser Gateway. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "cheapcgi.h" #include "htmshell.h" #include "obscure.h" #include "web.h" #include "cart.h" #include "hdb.h" #include "dbDb.h" #include "hgFind.h" #include "hCommon.h" #include "hui.h" #include "customTrack.h" +#include "hubConnect.h" #include "hgConfig.h" #include "jsHelper.h" #include "hPrint.h" #include "suggest.h" #include "searchTracks.h" static char const rcsid[] = "$Id: hgGateway.c,v 1.117 2010/04/29 02:54:35 larrym Exp $"; boolean isPrivateHost; /* True if we're on genome-test. */ struct cart *cart = NULL; struct hash *oldVars = NULL; char *clade = NULL; char *organism = NULL; char *db = NULL; @@ -189,30 +190,40 @@ // necessary additional work is authorized. puts("<TD VALIGN=\"TOP\">"); /* disable CT for CGB servers for the time being */ if (!hIsGsidServer() && !hIsCgbServer()) { printf( "<FORM ACTION=\"%s\" METHOD=\"GET\"><INPUT TYPE=SUBMIT VALUE=\"%s\">", hgCustomName(), customTracksExist(cart, NULL) ? CT_MANAGE_BUTTON_LABEL : CT_ADD_BUTTON_LABEL); cartSaveSession(cart); /* Put up hgsid= as hidden variable. */ puts("</FORM>"); } puts("</TD>"); +if (hubConnectTableExists()) + { + puts("<TD VALIGN=\"TOP\">"); + printf( + "<FORM ACTION=\"%s\" METHOD=\"GET\"><INPUT TYPE=SUBMIT VALUE=\"%s\">", + "../cgi-bin/hgHubConnect", "import tracks"); + cartSaveSession(cart); /* Put up hgsid= as hidden variable. */ + puts("</FORM></TD>"); + } + // configure button puts("<TD VALIGN=\"TOP\">"); puts("<FORM ACTION=\"../cgi-bin/hgTracks\" NAME=\"buttonForm\" METHOD=\"GET\">\n"); cartSaveSession(cart); /* Put up hgsid= as hidden variable. */ cgiMakeButton("hgTracksConfigPage", "configure tracks and display"); puts("</FORM></TD>"); // clear possition button puts("<TD VALIGN=\"TOP\">"); puts("<FORM ACTION=\"../cgi-bin/hgTracks\" NAME=\"buttonForm\" METHOD=\"GET\">\n"); cartSaveSession(cart); /* Put up hgsid= as hidden variable. */ if(supportsSuggest) cgiMakeOnClickButton("document.mainForm.position.value=''; document.getElementById('suggest').value='';", "clear position"); else cgiMakeOnClickButton("document.mainForm.position.value=''", "clear position");