about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-05-16 02:12:06 +0200
committerLars Hjemli <hjemli@gmail.com>2007-05-16 02:16:55 +0200
commit8f6f8c3406ad069b37da7cb90462c1e61c991859 (patch)
tree0824c32c186dedee78e9d566d53c90ebe0ca4b5f
parentMake git_pageurl handle NULL querystrings (diff)
downloadcgit-pink-8f6f8c3406ad069b37da7cb90462c1e61c991859.tar.gz
cgit-pink-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)
 	html("<tr class='nohover'>"
 	     "<th class='left'>Name</th>"
 	     "<th class='left'>Description</th>"
-	     "<th class='left'>Owner</th></tr>\n");
+	     "<th class='left'>Owner</th>"
+	     "<th class='left'>Links</th></tr>\n");
 
 	for (i=0; i<cgit_repolist.count; i++) {
 		repo = &cgit_repolist.repos[i];
@@ -32,6 +33,19 @@ void cgit_print_repolist(struct cacheitem *item)
 		html_txt(repo->desc);
 		html("</td><td>");
 		html_txt(repo->owner);
+		html("</td><td>");
+		html_link_open(cgit_pageurl(repo->name, "commit", NULL),
+			       "Commit: display last commit", NULL);
+		html("C</a> ");
+		html_link_open(cgit_pageurl(repo->name, "diff", NULL),
+			       "Diff: see changes introduced by last commit", NULL);
+		html("D</a> ");
+		html_link_open(cgit_pageurl(repo->name, "log", NULL),
+			       "Log: show history of the main branch", NULL);
+		html("L</a> ");
+		html_link_open(cgit_pageurl(repo->name, "tree", NULL),
+			       "Tree: browse the files in the main branch", NULL);
+		html("T</a>");
 		html("</td></tr>\n");
 	}
 	html("</table>");
lass='nohover-highlight'> 2021-10-14Import LibreSSL 3.4.1June McEnroe 2021-09-17Import LibreSSL 3.4.0June McEnroe 2021-08-24Import LibreSSL 3.3.4June McEnroe 2021-05-25Bump version to 3.3.3p1 3.3.3p1June McEnroe 2021-05-25build: Add scripts to EXTRA_DISTJune McEnroe 2021-05-25import: Add missing scripts/wrap-compiler-for-flag-checkJune McEnroe 2021-05-08Import LibreSSL 3.3.3June McEnroe 2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe 2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck. 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe