-rw-r--r-- | ui-shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c index 4c0613a..be2c75d 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -430,65 +430,65 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page) | |||
430 | char *url; | 430 | char *url; |
431 | 431 | ||
432 | if (!cgit_virtual_root) { | 432 | if (!cgit_virtual_root) { |
433 | url = fmt("%s/%s", cgit_query_repo, page); | 433 | url = fmt("%s/%s", cgit_query_repo, page); |
434 | if (cgit_query_path) | 434 | if (cgit_query_path) |
435 | url = fmt("%s/%s", url, cgit_query_path); | 435 | url = fmt("%s/%s", url, cgit_query_path); |
436 | html_hidden("url", url); | 436 | html_hidden("url", url); |
437 | } | 437 | } |
438 | 438 | ||
439 | if (incl_head && strcmp(cgit_query_head, cgit_repo->defbranch)) | 439 | if (incl_head && strcmp(cgit_query_head, cgit_repo->defbranch)) |
440 | html_hidden("h", cgit_query_head); | 440 | html_hidden("h", cgit_query_head); |
441 | 441 | ||
442 | if (cgit_query_sha1) | 442 | if (cgit_query_sha1) |
443 | html_hidden("id", cgit_query_sha1); | 443 | html_hidden("id", cgit_query_sha1); |
444 | if (cgit_query_sha2) | 444 | if (cgit_query_sha2) |
445 | html_hidden("id2", cgit_query_sha2); | 445 | html_hidden("id2", cgit_query_sha2); |
446 | 446 | ||
447 | if (incl_search) { | 447 | if (incl_search) { |
448 | if (cgit_query_grep) | 448 | if (cgit_query_grep) |
449 | html_hidden("qt", cgit_query_grep); | 449 | html_hidden("qt", cgit_query_grep); |
450 | if (cgit_query_search) | 450 | if (cgit_query_search) |
451 | html_hidden("q", cgit_query_search); | 451 | html_hidden("q", cgit_query_search); |
452 | } | 452 | } |
453 | } | 453 | } |
454 | 454 | ||
455 | void cgit_print_pageheader(char *title, int show_search) | 455 | void cgit_print_pageheader(char *title, int show_search) |
456 | { | 456 | { |
457 | static const char *default_info = "This is cgit, a fast webinterface for git repositories"; | 457 | static const char *default_info = "This is cgit, a fast webinterface for git repositories"; |
458 | int header = 0; | 458 | int header = 0; |
459 | 459 | ||
460 | html("<table id='layout' summary=''>\n"); | 460 | html("<table id='layout' summary=''>\n"); |
461 | html("<tr><td id='sidebar'>\n"); | 461 | html("<tr><td id='sidebar'>\n"); |
462 | html("<table class='sidebar' summary=''>\n"); | 462 | html("<table class='sidebar' cellspacing='0' summary=''>\n"); |
463 | html("<tr><td class='sidebar'>\n<a href='"); | 463 | html("<tr><td class='sidebar'>\n<a href='"); |
464 | html_attr(cgit_rooturl()); | 464 | html_attr(cgit_rooturl()); |
465 | htmlf("'><img src='%s' alt='cgit'/></a>\n", | 465 | htmlf("'><img src='%s' alt='cgit'/></a>\n", |
466 | cgit_logo); | 466 | cgit_logo); |
467 | html("</td></tr>\n<tr><td class='sidebar'>\n"); | 467 | html("</td></tr>\n<tr><td class='sidebar'>\n"); |
468 | if (cgit_query_repo) { | 468 | if (cgit_query_repo) { |
469 | html("<h1 class='first'>"); | 469 | html("<h1 class='first'>"); |
470 | html_txt(strrpart(cgit_repo->name, 20)); | 470 | html_txt(strrpart(cgit_repo->name, 20)); |
471 | html("</h1>\n"); | 471 | html("</h1>\n"); |
472 | html_txt(cgit_repo->desc); | 472 | html_txt(cgit_repo->desc); |
473 | if (cgit_repo->owner) { | 473 | if (cgit_repo->owner) { |
474 | html("<h1>owner</h1>\n"); | 474 | html("<h1>owner</h1>\n"); |
475 | html_txt(cgit_repo->owner); | 475 | html_txt(cgit_repo->owner); |
476 | } | 476 | } |
477 | html("<h1>navigate</h1>\n"); | 477 | html("<h1>navigate</h1>\n"); |
478 | reporevlink(NULL, "summary", NULL, "menu", cgit_query_head, | 478 | reporevlink(NULL, "summary", NULL, "menu", cgit_query_head, |
479 | NULL, NULL); | 479 | NULL, NULL); |
480 | cgit_log_link("log", NULL, "menu", cgit_query_head, NULL, NULL, | 480 | cgit_log_link("log", NULL, "menu", cgit_query_head, NULL, NULL, |
481 | 0, NULL, NULL); | 481 | 0, NULL, NULL); |
482 | cgit_tree_link("tree", NULL, "menu", cgit_query_head, | 482 | cgit_tree_link("tree", NULL, "menu", cgit_query_head, |
483 | cgit_query_sha1, NULL); | 483 | cgit_query_sha1, NULL); |
484 | cgit_commit_link("commit", NULL, "menu", cgit_query_head, | 484 | cgit_commit_link("commit", NULL, "menu", cgit_query_head, |
485 | cgit_query_sha1); | 485 | cgit_query_sha1); |
486 | cgit_diff_link("diff", NULL, "menu", cgit_query_head, | 486 | cgit_diff_link("diff", NULL, "menu", cgit_query_head, |
487 | cgit_query_sha1, cgit_query_sha2, NULL); | 487 | cgit_query_sha1, cgit_query_sha2, NULL); |
488 | 488 | ||
489 | for_each_ref(print_archive_ref, &header); | 489 | for_each_ref(print_archive_ref, &header); |
490 | 490 | ||
491 | html("<h1>branch</h1>\n"); | 491 | html("<h1>branch</h1>\n"); |
492 | html("<form method='get' action=''>\n"); | 492 | html("<form method='get' action=''>\n"); |
493 | add_hidden_formfields(0, 1, cgit_query_page); | 493 | add_hidden_formfields(0, 1, cgit_query_page); |
494 | // html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>"); | 494 | // html("<table summary='branch selector' class='grid'><tr><td id='branch-dropdown-cell'>"); |