]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Cleanup page header
[ps-cgit] / ui-shared.c
index 782caa78e181eb067e8ab18aca6a1578168389a7..8a804c23b8997b4e75b328746027d411c43d63d1 100644 (file)
@@ -484,15 +484,10 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html_attr(cgit_rooturl());
        html("'><img src='");
        html_attr(ctx->cfg.logo);
-       html("'/></a></td>\n");
+       html("' alt='cgit logo'/></a></td>\n");
 
        html("<td class='main'>");
        if (ctx->repo) {
-/*
-               html("<a href='");
-               html_attr(cgit_rooturl());
-               html("'>index</a> : ");
-*/
                reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"),
                            ctx->qry.head, NULL, NULL);
                html(" : ");
@@ -507,25 +502,17 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html("</form>");
        } else
                html_txt(ctx->cfg.root_title);
-       html("</td>\n");
+       html("</td></tr>\n");
 
        html("<tr><td class='sub'");
        if (ctx->repo) {
                html(" colspan='2'>");
                html_txt(ctx->repo->desc);
-       }
-/*
-       else if (ctx->cfg.root_subtitle)
-               html_txt(ctx->cfg.root_subtitle);
-*/
-       else {
+       } else {
                html(">");
                html_txt("a fast webinterface for the git dscm");
        }
-       html("</td></tr>\n");
-
-       html("</tr>\n");
-       html("</table>\n");
+       html("</td></tr></table>\n");
 
        html("<table class='tabs'><tr><td>\n");
        if (ctx->repo) {
@@ -541,8 +528,6 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                                 ctx->qry.head, ctx->qry.sha1);
                cgit_diff_link("diff", NULL, hc(cmd, "diff"), ctx->qry.head,
                               ctx->qry.sha1, ctx->qry.sha2, NULL);
-               cgit_patch_link("patch", NULL, hc(cmd, "patch"), ctx->qry.head,
-                               ctx->qry.sha1);
                html("</td><td class='form'>");
                html("<form class='right' method='get' action='");
                if (ctx->cfg.virtual_root)
@@ -555,7 +540,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html_option("author", "author", ctx->qry.grep);
                html_option("committer", "committer", ctx->qry.grep);
                html("</select>\n");
-               html("<input class='txt' type='text' size='8' name='q' value='");
+               html("<input class='txt' type='text' size='10' name='q' value='");
                html_attr(ctx->qry.search);
                html("'/>\n");
                html("<input type='submit' value='search'/>\n");
@@ -564,6 +549,15 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html("<a class='active' href='");
                html_attr(cgit_rooturl());
                html("'>index</a>\n");
+               html("</td><td class='form'>");
+               html("<form method='get' action='");
+               html_attr(cgit_rooturl());
+               html("'>\n");
+               html("<input type='text' name='q' size='10' value='");
+               html_attr(ctx->qry.search);
+               html("'/>\n");
+               html("<input type='submit' value='search'/>\n");
+               html("</form>");
        }
        html("</td></tr></table>\n");
        html("<div class='content'>");