author | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 23:16:56 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 23:16:56 (UTC) |
commit | dff894d12953a8a3cd7cdca2357771212a2f57d6 (patch) (side-by-side diff) | |
tree | 042f1fbc0594d61d97721167197506760847ce2a | |
parent | f9ff7df613b4ee86fe5914c4ae3400650882c03d (diff) | |
download | cgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.zip cgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.tar.gz cgit-dff894d12953a8a3cd7cdca2357771212a2f57d6.tar.bz2 |
Add link to commitdiff below diffstat
This link is a lot easier to locate than the links to the right of the
parent entries.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 6 | ||||
-rw-r--r-- | ui-commit.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -237,7 +237,11 @@ div.commit-msg { } +div.diffstat-header { + font-weight: bold; + padding-top: 1.5em; +} + table.diffstat { border-collapse: collapse; - margin-top: 1.5em; width: 100%; border: solid 1px #aaa; diff --git a/ui-commit.c b/ui-commit.c index 93eb8fd..ff1fad3 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -222,4 +222,5 @@ void cgit_print_commit(const char *hex) html("</div>"); if (!(commit->parents && commit->parents->next && commit->parents->next->next)) { + html("<div class='diffstat-header'>Diffstat</div>"); html("<table class='diffstat'>"); max_changes = 0; @@ -229,6 +230,9 @@ void cgit_print_commit(const char *hex) html("</table>"); html("<div class='diffstat-summary'>"); - htmlf("%d files changed, %d insertions, %d deletions\n", + htmlf("%d files changed, %d insertions, %d deletions (", files, total_adds, total_rems); + query = fmt("h=%s", hex); + html_link_open(cgit_pageurl(cgit_query_repo, "diff", query), NULL, NULL); + html("show diff</a>)"); html("</div>"); } |