author | Lars Hjemli <hjemli@gmail.com> | 2007-06-18 20:06:00 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-06-18 20:06:00 (UTC) |
commit | 1f34fb9d4f0bf82706ed8912c37a4b320a14813b (patch) (side-by-side diff) | |
tree | 52b1ae2f6d61fc595669abdfb9cf42cb8dc7eae1 | |
parent | 7d6ee4ee8a2c79802a78bc09c0e1e96a7a82de78 (diff) | |
download | cgit-1f34fb9d4f0bf82706ed8912c37a4b320a14813b.zip cgit-1f34fb9d4f0bf82706ed8912c37a4b320a14813b.tar.gz cgit-1f34fb9d4f0bf82706ed8912c37a4b320a14813b.tar.bz2 |
Change "files" to "tree"
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 <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-repolist.c | 2 | ||||
-rw-r--r-- | ui-shared.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 2018dab..d5c77ea 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -45,54 +45,54 @@ static void print_modtime(struct repoinfo *repo) void cgit_print_repolist(struct cacheitem *item) { int i; char *last_group = NULL; cgit_print_docstart(cgit_root_title, item); cgit_print_pageheader(cgit_root_title, 0); html("<table class='list nowrap'>"); if (cgit_index_header) { html("<tr class='nohover'><td colspan='5' class='include-block'>"); html_include(cgit_index_header); html("</td></tr>"); } html("<tr class='nohover'>" "<th class='left'>Name</th>" "<th class='left'>Description</th>" "<th class='left'>Owner</th>" "<th class='left'>Idle</th>" "<th>Links</th></tr>\n"); for (i=0; i<cgit_repolist.count; i++) { cgit_repo = &cgit_repolist.repos[i]; if ((last_group == NULL && cgit_repo->group != NULL) || (last_group != NULL && cgit_repo->group == NULL) || (last_group != NULL && cgit_repo->group != NULL && strcmp(cgit_repo->group, last_group))) { html("<tr class='nohover'><td colspan='4' class='repogroup'>"); html_txt(cgit_repo->group); html("</td></tr>"); last_group = cgit_repo->group; } htmlf("<tr><td class='%s'>", cgit_repo->group ? "sublevel-repo" : "toplevel-repo"); html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL); html_txt(cgit_repo->name); html_link_close(); html("</td><td>"); html_ntxt(cgit_max_repodesc_len, cgit_repo->desc); html("</td><td>"); html_txt(cgit_repo->owner); html("</td><td>"); print_modtime(cgit_repo); html("</td><td>"); html_link_open(cgit_repourl(cgit_repo->url), "Summary", "button"); html("S</a>"); 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("</td></tr>\n"); } html("</table>"); cgit_print_docend(); } diff --git a/ui-shared.c b/ui-shared.c index 383b8ac..a198cf2 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -259,96 +259,96 @@ void cgit_print_docstart(char *title, struct cacheitem *item) htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime)); htmlf("Expires: %s\n", http_date(item->st.st_mtime + ttl_seconds(item->ttl))); html("\n"); html(cgit_doctype); html("<html>\n"); html("<head>\n"); html("<title>"); html_txt(title); html("</title>\n"); htmlf("<meta name='generator' content='cgit v%s'/>\n", cgit_version); html("<link rel='stylesheet' type='text/css' href='"); html_attr(cgit_css); html("'/>\n"); html("</head>\n"); html("<body>\n"); } void cgit_print_docend() { html("</td></tr></table>"); html("</body>\n</html>\n"); } void cgit_print_pageheader(char *title, int show_search) { html("<table id='layout'>"); html("<tr><td id='header'><a href='"); html_attr(cgit_rooturl()); html("'>"); html_txt(cgit_root_title); html("</a></td><td id='logo'>"); html("<a href='"); html_attr(cgit_logo_link); htmlf("'><img src='%s' alt='logo'/></a>", cgit_logo); html("</td></tr>"); html("<tr><td id='crumb'>"); if (cgit_query_repo) { html_txt(cgit_repo->name); html(" ("); html_txt(cgit_query_head); html(") : "); reporevlink(NULL, "summary", NULL, NULL, cgit_query_head, NULL, NULL); html(" "); cgit_log_link("log", NULL, NULL, cgit_query_head, cgit_query_sha1, cgit_query_path); html(" "); - cgit_tree_link("files", NULL, NULL, cgit_query_head, + cgit_tree_link("tree", NULL, NULL, cgit_query_head, cgit_query_sha1, cgit_query_path); html(" "); cgit_commit_link("commit", NULL, NULL, cgit_query_head, cgit_query_sha1); html(" "); cgit_diff_link("diff", NULL, NULL, cgit_query_head, cgit_query_sha1, cgit_query_sha2, cgit_query_path); } else { html_txt("Index of repositories"); } html("</td>"); html("<td id='search'>"); if (show_search) { html("<form method='get' action='"); html_attr(cgit_currurl()); html("'>"); if (!cgit_virtual_root) { if (cgit_query_repo) html_hidden("r", cgit_query_repo); if (cgit_query_page) html_hidden("p", cgit_query_page); } if (cgit_query_head) html_hidden("h", cgit_query_head); if (cgit_query_sha1) html_hidden("id", cgit_query_sha1); if (cgit_query_sha2) html_hidden("id2", cgit_query_sha2); html("<input type='text' name='q' value='"); html_attr(cgit_query_search); html("'/></form>"); } html("</td></tr>"); html("<tr><td id='content' colspan='2'>"); } void cgit_print_snapshot_start(const char *mimetype, const char *filename, struct cacheitem *item) { htmlf("Content-Type: %s\n", mimetype); htmlf("Content-Disposition: inline; filename=\"%s\"\n", filename); htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime)); htmlf("Expires: %s\n", http_date(item->st.st_mtime + ttl_seconds(item->ttl))); html("\n"); } |