diff options
-rw-r--r-- | ui-shared.c | 8 | ||||
-rw-r--r-- | ui-tree.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 52fe76c..ea460e0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -776,6 +776,10 @@ static void print_rel_vcs_link(const char *url) static int emit_css_link(struct string_list_item *s, void *arg) { + /* Do not emit anything if css= is specified. */ + if (s && *s->string == '\0') + return 0; + html("<link rel='stylesheet' type='text/css' href='"); if (s) html_attr(s->string); @@ -788,6 +792,10 @@ static int emit_css_link(struct string_list_item *s, void *arg) static int emit_js_link(struct string_list_item *s, void *arg) { + /* Do not emit anything if js= is specified. */ + if (s && *s->string == '\0') + return 0; + html("<script type='text/javascript' src='"); if (s) html_attr(s->string); @@ -270,6 +270,9 @@ static int ls_item(const struct object_id *oid, struct strbuf *base, if (!S_ISGITLINK(mode)) cgit_plain_link("plain", NULL, "button", ctx.qry.head, walk_tree_ctx->curr_rev, fullpath.buf); + if (!S_ISDIR(mode)) + cgit_about_link("about", NULL, "button", ctx.qry.head, + walk_tree_ctx->curr_rev, fullpath.buf); if (!S_ISDIR(mode) && ctx.repo->enable_blame) cgit_blame_link("blame", NULL, "button", ctx.qry.head, walk_tree_ctx->curr_rev, fullpath.buf); |