e64e5e94e50f63cb609da6e731ff454e876a4111 braney Fri May 30 15:36:28 2014 -0700 change the linkouts on hgHubConnect to pointt to hub.txt for shortLabeland to descriptionUrl for longLabel diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 9fa01c7..f18e270 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -182,31 +182,30 @@ if (unlistedHubCount == 0) { // nothing to see here printf("<tr><td>No Unlisted Track Hubs</td></tr>"); printf("</thead></table></div>"); return; } // time to output the big table. First the header printf( "<tr> " "<th>Display</th> " "<th>Hub Name</th> " "<th>Description</th> " "<th>Assemblies</th> " - "<th>URL</th> " "</tr>\n" "</thead>\n"); // start first row printf("<tbody><tr>"); int count = 0; for(hub = unlistedHubList; hub; hub = hub->next) { if (count) webPrintLinkTableNewRow(); // ends last row and starts a new one count++; // if there's an error message, we don't let people select it if (isEmpty(hub->errorMessage)) @@ -224,52 +223,53 @@ } else { // give people a chance to clear the error ourCellStart(); printf( "<input name=\"hubClearButton\"" "onClick=\"document.resetHubForm.elements['hubUrl'].value='%s';" "document.resetHubForm.submit();return true;\" " "class=\"hubField\" type=\"button\" value=\"check hub\">\n" , hub->hubUrl); ourCellEnd(); } if (hub->trackHub != NULL) { - if (hub->trackHub->descriptionUrl != NULL) - ourPrintCellLink(hub->trackHub->shortLabel, hub->trackHub->descriptionUrl); - else - ourPrintCell(hub->trackHub->shortLabel); + ourPrintCellLink(hub->trackHub->shortLabel, hub->hubUrl); } else ourPrintCell(""); if (!isEmpty(hub->errorMessage)) printf("<TD><span class=\"hubError\">ERROR: %s </span>" "<a href=\"../goldenPath/help/hgTrackHubHelp.html#Debug\">Debug</a></TD>\n", hub->errorMessage); else if (hub->trackHub != NULL) + { + if (hub->trackHub->descriptionUrl != NULL) + ourPrintCellLink(hub->trackHub->longLabel, hub->trackHub->descriptionUrl); + else ourPrintCell(hub->trackHub->longLabel); + } else ourPrintCell(""); if (hub->trackHub != NULL) printGenomes(hub->trackHub, count); else ourPrintCell(""); - ourPrintCell(hub->hubUrl); } printf("</TR></tbody></TABLE>\n"); printf("</div>"); } static void addPublicHubsToHubStatus(struct sqlConnection *conn, char *publicTable, char *statusTable) /* add url's in the hubPublic table to the hubStatus table if they aren't there already */ { char query[1024]; sqlSafef(query, sizeof(query), "select hubUrl from %s where hubUrl not in (select hubUrl from %s)\n", publicTable, statusTable); struct sqlResult *sr = sqlGetResult(conn, query); char **row; while ((row = sqlNextRow(sr)) != NULL) { @@ -426,36 +426,39 @@ else if (!isEmpty(errorMessage)) { // give user a chance to clear the error ourCellStart(); printf( "<input name=\"hubClearButton\"" "onClick=\"document.resetHubForm.elements['hubUrl'].value='%s';" "document.resetHubForm.submit();return true;\" " "class=\"hubField\" type=\"button\" value=\"check hub\">" , url); ourCellEnd(); } else errAbort("cannot get id for hub with url %s\n", url); + ourPrintCellLink(shortLabel, url); + + if (isEmpty(errorMessage)) + { if (hasDescription && !isEmpty(descriptionUrl)) - ourPrintCellLink(shortLabel, descriptionUrl); + ourPrintCellLink(longLabel, descriptionUrl); else - ourPrintCell(shortLabel); - if (isEmpty(errorMessage)) ourPrintCell(longLabel); + } else printf("<TD><span class=\"hubError\">ERROR: %s </span>" "<a href=\"../goldenPath/help/hgTrackHubHelp.html#Debug\">Debug</a></TD>", errorMessage); printGenomeList(dbListNames, count); hashStore(publicHash, url); } sqlFreeResult(&sr); if (gotAnyRows) printf("</TR></tbody></TABLE>\n"); printf("</div>");