summaryrefslogtreecommitdiff
path: root/ui-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tree.c')
-rw-r--r--ui-tree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui-tree.c b/ui-tree.c
index c4d75ab..54dcdbe 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -23,7 +23,9 @@ static int print_entry(const unsigned char *sha1, const char *base,
return 0;
}
name = xstrdup(pathname);
- html("<tr><td>");
+ html("<tr><td class='filemode'>");
+ html_filemode(mode);
+ html("</td><td>");
if (S_ISDIR(mode)) {
html("<div class='ls-dir'><a href='");
html_attr(cgit_pageurl(cgit_query_repo, "tree",
@@ -39,7 +41,6 @@ static int print_entry(const unsigned char *sha1, const char *base,
html("/");
html("</a></div></td>");
htmlf("<td class='filesize'>%li</td>", size);
- htmlf("<td class='filemode'>%06o</td>", mode);
html("</tr>\n");
free(name);
return 0;
@@ -62,9 +63,11 @@ void cgit_print_tree(const char *hex)
html("<h2>Tree content</h2>\n");
html("<table class='list'>\n");
- html("<tr><th class='left'>Name</th>");
+ html("<tr>");
+ html("<th class='left'>Mode</th>");
+ html("<th class='left'>Name</th>");
html("<th class='right'>Size</th>");
- html("<th class='right'>Mode</th></tr>\n");
+ html("</tr>\n");
read_tree_recursive(tree, "", 0, 1, NULL, print_entry);
html("</table>\n");
}
le: still needs posix shellJason A. Donenfeld1-3/+3 2014-04-27base64: better justificationJason A. Donenfeld1-3/+3 2014-04-25makefile: use install -d instead of mkdir -pJason A. Donenfeld1-7/+7 2014-04-24Indent using spacesSvend Sorensen1-11/+11 2014-04-24tests: remember to escape $Jason A. Donenfeld1-1/+1 2014-04-24Use die function instead of boring if else everywhere.Jason A. Donenfeld1-69/+23 2014-04-24version: bump1.6.1Jason A. Donenfeld1-1/+1 2014-04-24Makefile: osx/bsd does not support -DJason A. Donenfeld2-25/+25 2014-04-24show: error out if password store is empty.Jason A. Donenfeld1-1/+4 2014-04-24find: proper segmenting of terms1.6Jason A. Donenfeld1-3/+3 2014-04-24dmenu: hide outputJason A. Donenfeld1-1/+1 2014-04-24tests: test for spacesJason A. Donenfeld3-8/+20 2014-04-24Move test instructions to INSTALL.Jason A. Donenfeld2-11/+18 2014-04-24tests: we don't use aggregate-resultsJason A. Donenfeld1-57/+0 2014-04-24Don't prompt for questions when stdin is not a tty.Jason A. Donenfeld3-7/+6 2014-04-24Allow overridable bash.Jason A. Donenfeld16-16/+16 2014-04-24dmenu: check for empty instead of ret codeJason A. Donenfeld1-1/+1 2014-04-24tests: sed doesn't like escaped chars on non-gnuJason A. Donenfeld1-1/+1 2014-04-24tests: run from anywhereJason A. Donenfeld13-4/+16 2014-04-24Turns out aliases were a bad idea.Jason A. Donenfeld14-95/+92 2014-04-24Make gpg_opts an array.Jason A. Donenfeld1-12/+12 2014-04-24Shellcheck errors.Jason A. Donenfeld1-6/+6 2014-04-24tests: todo updateJason A. Donenfeld1-25/+0