]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
Re-enable 'index-info' and add support for 'root-desc' in cgitrc
[ps-cgit] / ui-repolist.c
index a7de4534fc53addd45761bee9b3ecd83cbffa382..200640cc52a73b08b79fc7fc17127e7f6930adbe 100644 (file)
@@ -48,25 +48,19 @@ int is_match(struct cgit_repo *repo)
 {
        if (!ctx.qry.search)
                return 1;
-       if (repo->url && strstr(repo->url, ctx.qry.search))
+       if (repo->url && strcasestr(repo->url, ctx.qry.search))
                return 1;
-       if (repo->name && strstr(repo->name, ctx.qry.search))
+       if (repo->name && strcasestr(repo->name, ctx.qry.search))
                return 1;
-       if (repo->desc && strstr(repo->desc, ctx.qry.search))
+       if (repo->desc && strcasestr(repo->desc, ctx.qry.search))
                return 1;
-       if (repo->owner && strstr(repo->owner, ctx.qry.search))
+       if (repo->owner && strcasestr(repo->owner, ctx.qry.search))
                return 1;
        return 0;
 }
 
 void print_header(int columns)
 {
-       if (ctx.cfg.index_header) {
-               htmlf("<tr class='nohover'><td colspan='%d' class='include-block'>",
-                     columns);
-               html_include(ctx.cfg.index_header);
-               html("</td></tr>");
-       }
        html("<tr class='nohover'>"
             "<th class='left'>Name</th>"
             "<th class='left'>Description</th>"
@@ -90,6 +84,9 @@ void cgit_print_repolist()
        cgit_print_docstart(&ctx);
        cgit_print_pageheader(&ctx);
 
+       if (ctx.cfg.index_header)
+               html_include(ctx.cfg.index_header);
+
        html("<table summary='repository list' class='list nowrap'>");
        for (i=0; i<cgit_repolist.count; i++) {
                ctx.repo = &cgit_repolist.repos[i];
@@ -114,7 +111,9 @@ void cgit_print_repolist()
                html_txt(ctx.repo->name);
                html_link_close();
                html("</td><td>");
+               html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
                html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
+               html_link_close();
                html("</td><td>");
                html_txt(ctx.repo->owner);
                html("</td><td>");