src/hg/hgc/hgc.c 1.1513

1.1513 2009/03/06 04:54:21 kate
Add ENCODE data restriction timestamp
Index: src/hg/hgc/hgc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/hgc.c,v
retrieving revision 1.1512
retrieving revision 1.1513
diff -b -B -U 4 -r1.1512 -r1.1513
--- src/hg/hgc/hgc.c	3 Mar 2009 01:01:04 -0000	1.1512
+++ src/hg/hgc/hgc.c	6 Mar 2009 04:54:21 -0000	1.1513
@@ -2507,8 +2507,17 @@
 if ((version = trackDbSetting(tdb, "dataVersion")) != NULL)
     printf("<B>Data version:</B> %s <BR>\n", version);
 }
 
+void printDataRestrictionDate(struct trackDb *tdb)
+/* If this annotation has a dateUnrestricted trackDb setting, print it */
+{
+char *restrictionDate;
+if ((restrictionDate = trackDbSetting(tdb, "dateUnrestricted")) != NULL)
+    printf("<A HREF=\"/ENCODE/terms.html\" TARGET=_BLANK><B>Restricted until</A>:</B> %s <BR>\n", 
+                restrictionDate);
+}
+
 void printOrigAssembly(struct trackDb *tdb)
 /* If this annotation has been lifted, print the original
  * freeze, as indicated by the "origAssembly" trackDb setting */
 {
@@ -2546,8 +2555,9 @@
 	if (date != NULL)
 	    printf("<B>Data last updated:</B> %s<BR>\n", date);
 	hFreeConn(&conn);
 	}
+    printDataRestrictionDate(tdb);
     }
 if (tdb->html != NULL && tdb->html[0] != 0)
     {
     htmlHorizontalLine();
@@ -20304,10 +20314,9 @@
     char *date = firstWordInLine(sqlTableUpdate(conn, tableName));
     if (date != NULL)
         printf("<B>Data last updated:</B> %s<BR>\n", date);
     hFreeConn(&conn);
-}
-
+    }
 if (tdb->html != NULL && tdb->html[0] != 0)
     {
     htmlHorizontalLine();
     puts(tdb->html);