diff options
author | Lars Hjemli | 2007-11-11 13:17:13 +0100 |
---|---|---|
committer | Lars Hjemli | 2007-11-11 13:17:13 +0100 |
commit | a7cf406c802394460cb14c79f3f43582d1428a45 (patch) | |
tree | 71f3069c782698ae2972459258d551055f502c4f /ui-shared.c | |
parent | ab21082c21867e035cd925a06d6d55fb3143d883 (diff) | |
parent | 2ff33a8a0405b420cd75e0e207c7efeecd6f130b (diff) | |
download | cgit-a7cf406c802394460cb14c79f3f43582d1428a45.tar.gz cgit-a7cf406c802394460cb14c79f3f43582d1428a45.tar.bz2 cgit-a7cf406c802394460cb14c79f3f43582d1428a45.zip |
Merge branch 'lh/testsuite'
* lh/testsuite:
Set commit date on snapshot contents
Fix html error detected by test-suite
Create initial testsuite
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ui-shared.c b/ui-shared.c index 7c69f60..9ec646b 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -358,7 +358,7 @@ void cgit_print_docstart(char *title, struct cacheitem *item) | |||
358 | ttl_seconds(item->ttl))); | 358 | ttl_seconds(item->ttl))); |
359 | html("\n"); | 359 | html("\n"); |
360 | html(cgit_doctype); | 360 | html(cgit_doctype); |
361 | html("<html>\n"); | 361 | html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n"); |
362 | html("<head>\n"); | 362 | html("<head>\n"); |
363 | html("<title>"); | 363 | html("<title>"); |
364 | html_txt(title); | 364 | html_txt(title); |
@@ -373,7 +373,7 @@ void cgit_print_docstart(char *title, struct cacheitem *item) | |||
373 | 373 | ||
374 | void cgit_print_docend() | 374 | void cgit_print_docend() |
375 | { | 375 | { |
376 | html("</td>\n</tr>\n<table>\n</body>\n</html>\n"); | 376 | html("</td>\n</tr>\n</table>\n</body>\n</html>\n"); |
377 | } | 377 | } |
378 | 378 | ||
379 | int print_branch_option(const char *refname, const unsigned char *sha1, | 379 | int print_branch_option(const char *refname, const unsigned char *sha1, |
@@ -456,21 +456,21 @@ void cgit_print_pageheader(char *title, int show_search) | |||
456 | int header = 0; | 456 | int header = 0; |
457 | 457 | ||
458 | html("<div id='sidebar'>\n"); | 458 | html("<div id='sidebar'>\n"); |
459 | html("<a href='"); | 459 | html("<div id='logo'><a href='"); |
460 | html_attr(cgit_rooturl()); | 460 | html_attr(cgit_rooturl()); |
461 | htmlf("'><div id='logo'><img src='%s' alt='cgit'/></div></a>\n", | 461 | htmlf("'><img src='%s' alt='cgit'/></a></div>\n", |
462 | cgit_logo); | 462 | cgit_logo); |
463 | html("<div class='infobox'>"); | 463 | html("<div class='infobox'>"); |
464 | if (cgit_query_repo) { | 464 | if (cgit_query_repo) { |
465 | html("<h1>"); | 465 | html("<h1 class='first'>"); |
466 | html_txt(strrpart(cgit_repo->name, 20)); | 466 | html_txt(strrpart(cgit_repo->name, 20)); |
467 | html("</h1>\n"); | 467 | html("</h1>\n"); |
468 | html_txt(cgit_repo->desc); | 468 | html_txt(cgit_repo->desc); |
469 | if (cgit_repo->owner) { | 469 | if (cgit_repo->owner) { |
470 | html("<p>\n<h1>owner</h1>\n"); | 470 | html("<h1>owner</h1>\n"); |
471 | html_txt(cgit_repo->owner); | 471 | html_txt(cgit_repo->owner); |
472 | } | 472 | } |
473 | html("<p>\n<h1>navigate</h1>\n"); | 473 | html("<h1>navigate</h1>\n"); |
474 | reporevlink(NULL, "summary", NULL, "menu", cgit_query_head, | 474 | reporevlink(NULL, "summary", NULL, "menu", cgit_query_head, |
475 | NULL, NULL); | 475 | NULL, NULL); |
476 | cgit_log_link("log", NULL, "menu", cgit_query_head, NULL, NULL, | 476 | cgit_log_link("log", NULL, "menu", cgit_query_head, NULL, NULL, |
@@ -484,19 +484,19 @@ void cgit_print_pageheader(char *title, int show_search) | |||
484 | 484 | ||
485 | for_each_ref(print_archive_ref, &header); | 485 | for_each_ref(print_archive_ref, &header); |
486 | 486 | ||
487 | html("<p>\n<h1>branch</h1>\n"); | 487 | html("<h1>branch</h1>\n"); |
488 | html("<form method='get' action=''>\n"); | 488 | html("<form method='get' action=''>\n"); |
489 | add_hidden_formfields(0, 1, cgit_query_page); | 489 | add_hidden_formfields(0, 1, cgit_query_page); |
490 | html("<table class='grid'><tr><td id='branch-dropdown-cell'>"); | 490 | html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>"); |
491 | html("<select name='h' onchange='this.form.submit();'>\n"); | 491 | html("<select name='h' onchange='this.form.submit();'>\n"); |
492 | for_each_branch_ref(print_branch_option, cgit_query_head); | 492 | for_each_branch_ref(print_branch_option, cgit_query_head); |
493 | html("</select>\n"); | 493 | html("</select>\n"); |
494 | html("</td><td>"); | 494 | html("</td><td>"); |
495 | html("<noscript><input type='submit' id='switch-btn' value='..'></noscript>\n"); | 495 | html("<noscript><input type='submit' id='switch-btn' value='..'/></noscript>\n"); |
496 | html("</td></tr></table>"); | 496 | html("</td></tr></table>"); |
497 | html("</form>\n"); | 497 | html("</form>\n"); |
498 | 498 | ||
499 | html("<p>\n<h1>search</h1>\n"); | 499 | html("<h1>search</h1>\n"); |
500 | html("<form method='get' action='"); | 500 | html("<form method='get' action='"); |
501 | if (cgit_virtual_root) | 501 | if (cgit_virtual_root) |
502 | html_attr(cgit_fileurl(cgit_query_repo, "log", | 502 | html_attr(cgit_fileurl(cgit_query_repo, "log", |
@@ -519,7 +519,7 @@ void cgit_print_pageheader(char *title, int show_search) | |||
519 | 519 | ||
520 | html("</div>\n"); | 520 | html("</div>\n"); |
521 | 521 | ||
522 | html("</div>\n<table class='grid'><tr><td id='content'>\n"); | 522 | html("</div>\n<table summary='page content' class='grid'><tr><td id='content'>\n"); |
523 | } | 523 | } |
524 | 524 | ||
525 | 525 | ||