]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Simplify ui-commit.c
[ps-cgit] / ui-shared.c
index cb8a8dffadde3bf43f81186496b65210e7aaadf3..9ec4be8661928e7412df78595e4048642c747f74 100644 (file)
@@ -60,6 +60,18 @@ char *cgit_pageurl(const char *reponame, const char *pagename,
        }
 }
 
+
+void cgit_print_date(unsigned long secs)
+{
+       char buf[32];
+       struct tm *time;
+
+       time = gmtime(&secs);
+       strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time);
+       html_txt(buf);
+       
+}
+
 void cgit_print_docstart(char *title, struct cacheitem *item)
 {
        html("Content-Type: text/html; charset=utf-8\n");
@@ -92,6 +104,10 @@ void cgit_print_pageheader(char *title)
        htmlf("<a href='%s'>", cgit_logo_link);
        htmlf("<img id='logo' src='%s'/>\n", cgit_logo);
        htmlf("</a>");
+       if (cgit_query_repo)
+               htmlf("<a href='%s'>", cgit_repourl(cgit_query_repo));
        html_txt(title);
+       if (cgit_query_repo)
+               html("</a>");
        html("</div>");
 }