482e17639372073c44c32d26707a69b8132b3ba4 braney Fri Aug 5 18:05:55 2011 -0700 changes related to #4842 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 6400602..839775c 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -72,31 +72,30 @@ // count up the number of unlisted hubs we currently have int count = 0; struct hubConnectStatus *hub, *hubList = hubConnectStatusListFromCartAll(cart); for(hub = hubList; hub; hub = hub->next) { if (isHubUnlisted(hub)) count++; } if (count == 0) { // nothing to see here printf( "No Track Hubs for this genome assembly" ""); - cgiMakeButton("Submit", "Return to Genome Browser"); printf(""); return; } // time to output the big table. First the header printf( " " "Display " "Hub Name " "Description " "URL " "Disconnect " "\n"); // start first row @@ -131,31 +130,30 @@ else ourPrintCell(hub->errorMessage); ourPrintCell(hub->hubUrl); ourCellStart(); printf( "" , hub->id); ourCellEnd(); } printf("\n"); -cgiMakeButton("Submit", "Display Selected Hubs"); printf(""); } static void makeGenomePrint() /* print out the name of the current database etc. */ { getDbAndGenome(cart, &database, &organism, oldVars); printf("
\n"); printf("genome: %s    assembly: %s ", organism, hFreezeDate(database)); printf("
\n"); } void hgHubConnectPublic() @@ -217,40 +215,37 @@ ourPrintCell(longLabel); else { char errorBuf[4*1024]; safef(errorBuf, sizeof errorBuf, "Error: %s", errorMessage); ourPrintCell(errorBuf); } ourPrintCell(url); } } sqlFreeResult(&sr); if (gotAnyRows) { printf("\n"); - cgiMakeButton("Submit", "Display Selected Hubs"); } else { printf("
\n"); printf("No Public Track Hubs for this genome assembly
"); - cgiMakeButton("Submit", "Return to Genome Browser"); } -printf("Contact genome@soe.ucsc.edu to add a public hub.\n"); printf("
"); hDisconnectCentral(&conn); } static void doClearHub(struct cart *theCart) { char *url = cartOptionalString(cart, hgHubDataText); printf("
clearing hub %s\n",url);
 if (url != NULL)
     hubClearStatus(url);
 else
     errAbort("must specify url in %s\n", hgHubDataText);
 printf("
Completed\n");
@@ -322,56 +317,63 @@
 
 // here's a little form for the add new hub button
 printf("
\n", "../cgi-bin/hgHubConnect"); cgiMakeHiddenVar("hubUrl", ""); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); puts("
"); // this the form for the disconnect hub button printf("
\n", "../cgi-bin/hgHubConnect"); cgiMakeHiddenVar("hubId", ""); cgiMakeHiddenVar(hgHubDoDisconnect, "on"); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); puts("
"); // ... and now the main form +if (cartVarExists(cart, hgHubConnectCgiDestUrl)) + destUrl = cartOptionalString(cart, hgHubConnectCgiDestUrl); printf("
\n", destUrl); cartSaveSession(cart); // we have two tabs for the public and unlisted hubs printf("
" " "); hgHubConnectPublic(); hgHubConnectUnlisted(); printf("
"); +printf("
"); +cgiMakeButton("Submit", "Load Selected Hubs"); +printf("Contact genome@soe.ucsc.edu to add a public hub.\n"); +printf("
"); + if (gotNew || gotDisconnect) // make MyHubs the default tab { printf("\n"); } cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); printf("\n"); puts("
"); cartWebEnd(); } char *excludeVars[] = {"Submit", "submit", "hc_one_url", - hgHubConnectCgiDestUrl, hgHubDoClear, hgHubDoDisconnect, hgHubDataText, + hgHubDoClear, hgHubDoDisconnect, hgHubDataText, hgHubConnectRemakeTrackHub, NULL}; int main(int argc, char *argv[]) /* Process command line. */ { oldVars = hashNew(10); cgiSpoof(&argc, argv); cartEmptyShell(doMiddle, hUserCookie(), excludeVars, oldVars); return 0; }