e6ee24e901c079a75fbc0b8386393f1a4a7e3d9d tdreszer Thu Jan 6 13:18:14 2011 -0800 Support for supplemental materials directory in hgFileUi cgi. diff --git src/hg/lib/fileUi.c src/hg/lib/fileUi.c index 1af7aa7..0cca925 100644 --- src/hg/lib/fileUi.c +++ src/hg/lib/fileUi.c @@ -256,30 +256,37 @@ { oneFile->sortFields[sortOrder->order[ix] - 1] = NULL; oneFile->reverse[ sortOrder->order[ix] - 1] = FALSE; } oneFile->sortFields[sortOrder->count] = NULL; } } slSort(fileList,fileDbSortCmp); } } static void filesDownloadsPreamble(char *db, struct trackDb *tdb) { puts("<p><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></p"); + +struct fileDb *oneFile = fileDbGet(db, ENCODE_DCC_DOWNLOADS, tdb->track, "supplemental"); +if (oneFile != NULL) + { + printf("<p>\n<B>Supplemental materials</b> may be found <A HREF='http://%s/goldenPath/%s/%s/%s/supplemental/'>here</A>.</p>\n", + hDownloadsServer(),db,ENCODE_DCC_DOWNLOADS, tdb->track); + } puts("<p>\nThere are two files within this directory that contain information about the downloads:"); printf("<BR>• <A HREF='http://%s/goldenPath/%s/%s/%s/files.txt'>files.txt</A> which is a tab-separated file with the name and metadata for each download.</LI>\n", hDownloadsServer(),db,ENCODE_DCC_DOWNLOADS, tdb->track); printf("<BR>• <A HREF='http://%s/goldenPath/%s/%s/%s/md5sum.txt'>md5sum.txt</A> which is a list of the md5sum output for each download.</LI>\n", hDownloadsServer(),db,ENCODE_DCC_DOWNLOADS, tdb->track); puts("<P>"); } void filesDownloadUi(char *db, struct cart *cart, struct trackDb *tdb) // UI for a "composite like" track: This will list downloadable files associated with // a single trackDb entry (composite or of type "downloadsOnly". The list of files // will have links to their download and have metadata information associated. // The list will be a sortable table and there may be filtering controls. { // The basic idea: