e2a99e2bea16026856c91a70d0e3542c77819e40 tdreszer Mon Jun 6 12:00:30 2011 -0700 Integrate supplemental materials in hgFileUi CGI better. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index be49043..7df9a15 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -461,49 +461,48 @@ return count; } static void filesDownloadsPreamble(char *db, struct trackDb *tdb) { // Do not bother getting preamble.html // 1) It isn't on the RR (yet) // 2) It will likely refer back to the composite for Description info which is included in this page // 3) The rsync-to-tmp-file hurdle isn't worth the effort. cgiDown(0.7); puts("<B>Data is <A HREF='http://genome.ucsc.edu/ENCODE/terms.html'>RESTRICTED FROM USE</a>"); puts("in publication until the restriction date noted for the given data file.</B>"); char *server = hDownloadsServer(); char *subDir = ""; +cgiDown(0.7); +puts("Supporting documents:"); +printf("<BR>• <B><A HREF='http://%s/goldenPath/%s/%s/%s%s/files.txt' TARGET=ucscDownloads>files.txt</A></B> is a tab-separated file with the name and metadata for each download.</LI>\n", + server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); +printf("<BR>• <B><A HREF='http://%s/goldenPath/%s/%s/%s%s/md5sum.txt' TARGET=ucscDownloads>md5sum.txt</A></B> is a list of the md5sum output for each download.</LI>\n", + server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); if (hIsBetaHost()) { server = "hgdownload-test.cse.ucsc.edu"; // NOTE: Force this case because beta may think it's downloads server is "hgdownload.cse.ucsc.edu" subDir = "/beta"; } struct fileDb *oneFile = fileDbGet(db, ENCODE_DCC_DOWNLOADS, tdb->track, "supplemental"); if (oneFile != NULL) { - cgiDown(0.7); - printf("<B>Supplemental materials</b> may be found <A HREF='http://%s/goldenPath/%s/%s/%s%s/supplemental/' TARGET=ucscDownloads>here</A>.\n", + printf("<BR>• <B><A HREF='http://%s/goldenPath/%s/%s/%s%s/supplemental/' TARGET=ucscDownloads>Supplemental materials</A></B> contains additional files provided by the laboratory related to these downloads.</LI>\n", server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); } -cgiDown(0.7); -puts("There are two files within this directory that contain information about the downloads:"); -printf("<BR>• <A HREF='http://%s/goldenPath/%s/%s/%s%s/files.txt' TARGET=ucscDownloads>files.txt</A> which is a tab-separated file with the name and metadata for each download.</LI>\n", - server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); -printf("<BR>• <A HREF='http://%s/goldenPath/%s/%s/%s%s/md5sum.txt' TARGET=ucscDownloads>md5sum.txt</A> which is a list of the md5sum output for each download.</LI>\n", - server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); } static int filesPrintTable(char *db, struct trackDb *parentTdb, struct fileDb *fileList, sortOrder_t *sortOrder,boolean filterable) // Prints filesList as a sortable table. Returns count { // Table class=sortable int columnCount = 0; int restrictedColumn = 0; char *nowrap = (sortOrder->setting != NULL ? " nowrap":""); // Sort order trackDb setting found so rely on <BR> in titles for wrapping printf("<TABLE class='sortable' style='border: 2px outset #006600;'>\n"); printf("<THEAD class='sortable'>\n"); printf("<TR class='sortable' valign='bottom'>\n"); printf("<TD align='center' valign='center'> "); int filesCount = slCount(fileList); if (filesCount > 5)