about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLars Hjemli2007-05-16 02:12:06 +0200
committerLars Hjemli2007-05-16 02:16:55 +0200
commit8f6f8c3406ad069b37da7cb90462c1e61c991859 (patch)
tree0824c32c186dedee78e9d566d53c90ebe0ca4b5f
parentMake git_pageurl handle NULL querystrings (diff)
downloadcgit-8f6f8c3406ad069b37da7cb90462c1e61c991859.tar.gz
cgit-8f6f8c3406ad069b37da7cb90462c1e61c991859.zip
Add C D L and T links to index page
These are of course Commit, Diff, Log and Tree pages, all accessed w.o.
specifying refname or sha1.

Sadly, the layout is neither pretty nor accessible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--ui-repolist.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 2ce0d6a..d341193 100644 --- a/ui-repolist.c +++ b/ui-repolist.c
@@ -20,7 +20,8 @@ void cgit_print_repolist(struct cacheitem *item)
20 html("<tr class='nohover'>" 20 html("<tr class='nohover'>"
21 "<th class='left'>Name</th>" 21 "<th class='left'>Name</th>"
22 "<th class='left'>Description</th>" 22 "<th class='left'>Description</th>"
23 "<th class='left'>Owner</th></tr>\n"); 23 "<th class='left'>Owner</th>"
24 "<th class='left'>Links</th></tr>\n");
24 25
25 for (i=0; i<cgit_repolist.count; i++) { 26 for (i=0; i<cgit_repolist.count; i++) {
26 repo = &cgit_repolist.repos[i]; 27 repo = &cgit_repolist.repos[i];
@@ -32,6 +33,19 @@ void cgit_print_repolist(struct cacheitem *item)
32 html_txt(repo->desc); 33 html_txt(repo->desc);
33 html("</td><td>"); 34 html("</td><td>");
34 html_txt(repo->owner); 35 html_txt(repo->owner);
36 html("</td><td>");
37 html_link_open(cgit_pageurl(repo->name, "commit", NULL),
38 "Commit: display last commit", NULL);
39 html("C</a> ");
40 html_link_open(cgit_pageurl(repo->name, "diff", NULL),
41 "Diff: see changes introduced by last commit", NULL);
42 html("D</a> ");
43 html_link_open(cgit_pageurl(repo->name, "log", NULL),
44 "Log: show history of the main branch", NULL);
45 html("L</a> ");
46 html_link_open(cgit_pageurl(repo->name, "tree", NULL),
47 "Tree: browse the files in the main branch", NULL);
48 html("T</a>");
35 html("</td></tr>\n"); 49 html("</td></tr>\n");
36 } 50 }
37 html("</table>"); 51 html("</table>");