summaryrefslogtreecommitdiffabout
path: root/ui-repolist.c
authorLars Hjemli <hjemli@gmail.com>2007-06-17 11:57:51 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-06-17 11:57:51 (UTC)
commit48c487d72daef7e71683a85f775db8d36ab20341 (patch) (unidiff)
tree8770334d7c77bd3e81f42ee12550e6db5febd4d2 /ui-repolist.c
parent426032f767763b46f462de51d1ebded34f671d79 (diff)
downloadcgit-48c487d72daef7e71683a85f775db8d36ab20341.zip
cgit-48c487d72daef7e71683a85f775db8d36ab20341.tar.gz
cgit-48c487d72daef7e71683a85f775db8d36ab20341.tar.bz2
Add git_log_link() and fix bug in generic repolink function
The generic repolink function compared head with cgit_query_head, which almost always would be the same pointer. The test now compares with repo.defbranch, which is the wanted behavour. Bug discovered while adding cgit_log_link(), so this commit also contain that change. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-repolist.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-repolist.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 8ade91a..2018dab 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -76,25 +76,23 @@ void cgit_print_repolist(struct cacheitem *item)
76 } 76 }
77 htmlf("<tr><td class='%s'>", 77 htmlf("<tr><td class='%s'>",
78 cgit_repo->group ? "sublevel-repo" : "toplevel-repo"); 78 cgit_repo->group ? "sublevel-repo" : "toplevel-repo");
79 html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL); 79 html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL);
80 html_txt(cgit_repo->name); 80 html_txt(cgit_repo->name);
81 html_link_close(); 81 html_link_close();
82 html("</td><td>"); 82 html("</td><td>");
83 html_ntxt(cgit_max_repodesc_len, cgit_repo->desc); 83 html_ntxt(cgit_max_repodesc_len, cgit_repo->desc);
84 html("</td><td>"); 84 html("</td><td>");
85 html_txt(cgit_repo->owner); 85 html_txt(cgit_repo->owner);
86 html("</td><td>"); 86 html("</td><td>");
87 print_modtime(cgit_repo); 87 print_modtime(cgit_repo);
88 html("</td><td>"); 88 html("</td><td>");
89 html_link_open(cgit_repourl(cgit_repo->url), 89 html_link_open(cgit_repourl(cgit_repo->url),
90 "Summary", "button"); 90 "Summary", "button");
91 html("S</a>"); 91 html("S</a>");
92 html_link_open(cgit_pageurl(cgit_repo->name, "log", NULL), 92 cgit_log_link("L", "Log", "button", NULL, NULL, NULL);
93 "Log", "button");
94 html("L</a>");
95 cgit_tree_link("F", "Files", "button", NULL, NULL, NULL); 93 cgit_tree_link("F", "Files", "button", NULL, NULL, NULL);
96 html("</td></tr>\n"); 94 html("</td></tr>\n");
97 } 95 }
98 html("</table>"); 96 html("</table>");
99 cgit_print_docend(); 97 cgit_print_docend();
100} 98}