From 1f34fb9d4f0bf82706ed8912c37a4b320a14813b Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 18 Jun 2007 22:06:00 +0200 Subject: Change "files" to "tree" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This renames the menu link and the shortcut on the repo index page from the strange "files" to the more gittish "tree". Suggested-by: Kristian Høgsberg Signed-off-by: Lars Hjemli --- ui-repolist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui-repolist.c') diff --git a/ui-repolist.c b/ui-repolist.c index 2018dab..d5c77ea 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -90,7 +90,7 @@ void cgit_print_repolist(struct cacheitem *item) "Summary", "button"); html("S"); cgit_log_link("L", "Log", "button", NULL, NULL, NULL); - cgit_tree_link("F", "Files", "button", NULL, NULL, NULL); + cgit_tree_link("T", "Tree", "button", NULL, NULL, NULL); html("\n"); } html(""); -- cgit v1.2.3 From a215bf4620113fcefb8dd3442bf3501bd648c463 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 18 Jun 2007 22:12:09 +0200 Subject: Change S/L/T to summary/log/tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In yet another attempt at better usability, the cryptic S/L/T links are changed to show their full name. Suggested-by: Kristian Høgsberg Signed-off-by: Lars Hjemli --- ui-repolist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui-repolist.c') diff --git a/ui-repolist.c b/ui-repolist.c index d5c77ea..4f820a8 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -87,10 +87,10 @@ void cgit_print_repolist(struct cacheitem *item) print_modtime(cgit_repo); html(""); html_link_open(cgit_repourl(cgit_repo->url), - "Summary", "button"); - html("S"); - cgit_log_link("L", "Log", "button", NULL, NULL, NULL); - cgit_tree_link("T", "Tree", "button", NULL, NULL, NULL); + NULL, "button"); + html("summary"); + cgit_log_link("log", NULL, "button", NULL, NULL, NULL); + cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html("\n"); } html(""); -- cgit v1.2.3 From 0d05bca502f4a5347fa629045aca97ba9b404acc Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Tue, 19 Jun 2007 00:56:40 +0200 Subject: Add setting to enable/disable extra links on index page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The summary/log/tree links displayed for each repository on the index page lost some of their purpose when the header menu was added, so this commit introduces the parameter 'enable-index-links' which must be set to 1 to enable these links. Suggested-by: Kristian Høgsberg Signed-off-by: Lars Hjemli --- ui-repolist.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'ui-repolist.c') diff --git a/ui-repolist.c b/ui-repolist.c index 4f820a8..c735368 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -44,15 +44,19 @@ static void print_modtime(struct repoinfo *repo) void cgit_print_repolist(struct cacheitem *item) { - int i; + int i, columns = 4; char *last_group = NULL; + if (cgit_enable_index_links) + columns++; + cgit_print_docstart(cgit_root_title, item); cgit_print_pageheader(cgit_root_title, 0); html(""); if (cgit_index_header) { - html(""); } @@ -60,8 +64,10 @@ void cgit_print_repolist(struct cacheitem *item) "" "" "" - "" - "\n"); + ""); + if (cgit_enable_index_links) + html(""); + html("\n"); for (i=0; igroup == NULL) || (last_group != NULL && cgit_repo->group != NULL && strcmp(cgit_repo->group, last_group))) { - html(""); last_group = cgit_repo->group; @@ -85,13 +92,17 @@ void cgit_print_repolist(struct cacheitem *item) html_txt(cgit_repo->owner); html("\n"); + html(""); + if (cgit_enable_index_links) { + html(""); + } + html("\n"); } html("
"); + htmlf("
", + columns); html_include(cgit_index_header); html("
NameDescriptionOwnerIdleLinks
IdleLinks
"); + htmlf("
", + columns); html_txt(cgit_repo->group); html("
"); print_modtime(cgit_repo); - html(""); - html_link_open(cgit_repourl(cgit_repo->url), - NULL, "button"); - html("summary"); - cgit_log_link("log", NULL, "button", NULL, NULL, NULL); - cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); - html("
"); + html_link_open(cgit_repourl(cgit_repo->url), + NULL, "button"); + html("summary"); + cgit_log_link("log", NULL, "button", NULL, NULL, NULL); + cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); + html("
"); cgit_print_docend(); -- cgit v1.2.3 From 103940fe6b0914dc42b8b033d1d328f38135ca5f Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Fri, 29 Jun 2007 20:27:41 +0200 Subject: Add ofs argument to cgit_log_link and use it in ui-log.c This fixes a bug in the prev/next links on the log page: when on the default branch the links to prev/next page would contain h=(null). Signed-off-by: Lars Hjemli --- ui-repolist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui-repolist.c') diff --git a/ui-repolist.c b/ui-repolist.c index c735368..4c86543 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -98,7 +98,7 @@ void cgit_print_repolist(struct cacheitem *item) html_link_open(cgit_repourl(cgit_repo->url), NULL, "button"); html("summary"); - cgit_log_link("log", NULL, "button", NULL, NULL, NULL); + cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html(""); } -- cgit v1.2.3