96af233a59d62b9a42418f106bc8b127112b736f tdreszer Mon Jul 25 12:44:17 2011 -0700 Added 'Parent directory' link to support redirection from index.html. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index b9c8d63..7cd76df 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -438,58 +438,58 @@ printf("</tr></table>\n"); #ifdef NEW_JQUERY jsIncludeFile("ddcl.js",NULL); printf("<script type='text/javascript'>var newJQuery=true;</script>\n"); #else///ifndef NEW_JQUERY printf("<script type='text/javascript'>var newJQuery=false;</script>\n"); printf("<script type='text/javascript'>$(document).ready(function() { $('.filterBy').each( function(i) { $(this).dropdownchecklist({ firstItemChecksAll: true, noneIsAll: true, maxDropHeight: filterByMaxHeight(this) });});});</script>\n"); #endif///ndef NEW_JQUERY } dyStringFree(&dyFilters); } return count; } static void filesDownloadsPreamble(char *db, struct trackDb *tdb) +// Replacement for preamble.html which should expose parent dir, files.txt and supplemental, but +// not have any specialized notes per composite. Specialized notes belong in track description. { -// 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 = ""; 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"; + server = "hgdownload-test.cse.ucsc.edu"; // NOTE: Force this case because beta may think + subDir = "/beta"; // it's downloads server is "hgdownload.cse.ucsc.edu" } +printf("<BR><A HREF='http://%s/goldenPath/%s/%s/'><img src='../images/ab_up.gif'>Parent directory</A> for %s downloads.<BR>\n", + server,db,ENCODE_DCC_DOWNLOADS,db); +cgiDown(0.9); +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>"); + 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", +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.\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", +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.\n", server,db,ENCODE_DCC_DOWNLOADS, tdb->track, subDir); struct fileDb *oneFile = fileDbGet(db, ENCODE_DCC_DOWNLOADS, tdb->track, "supplemental"); if (oneFile != NULL) { - 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", + 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.\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'> ");