]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
Add support for 'enable-gitweb-owner' option
[ps-cgit] / ui-shared.c
index e9917993fb2d4181bf3adb6ff4c01dea0cb52f26..ae29615a32d04ac8c3e933815e61b64543fdecee 100644 (file)
@@ -341,6 +341,18 @@ void cgit_commit_link(char *name, const char *title, const char *class,
        if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) {
                html(delim);
                html("ss=1");
+               delim = "&";
+       }
+       if (ctx.qry.context > 0 && ctx.qry.context != 3) {
+               html(delim);
+               html("context=");
+               htmlf("%d", ctx.qry.context);
+               delim = "&";
+       }
+       if (ctx.qry.ignorews) {
+               html(delim);
+               html("ignorews=1");
+               delim = "&";
        }
        html("'>");
        html_txt(name);
@@ -382,6 +394,18 @@ void cgit_diff_link(const char *name, const char *title, const char *class,
        if ((ctx.qry.ssdiff && !toggle_ssdiff) || (!ctx.qry.ssdiff && toggle_ssdiff)) {
                html(delim);
                html("ss=1");
+               delim = "&";
+       }
+       if (ctx.qry.context > 0 && ctx.qry.context != 3) {
+               html(delim);
+               html("context=");
+               htmlf("%d", ctx.qry.context);
+               delim = "&";
+       }
+       if (ctx.qry.ignorews) {
+               html(delim);
+               html("ignorews=1");
+               delim = "&";
        }
        html("'>");
        html_txt(name);
@@ -816,6 +840,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html_option("grep", "log msg", ctx->qry.grep);
                html_option("author", "author", ctx->qry.grep);
                html_option("committer", "committer", ctx->qry.grep);
+               html_option("range", "range", ctx->qry.grep);
                html("</select>\n");
                html("<input class='txt' type='text' size='10' name='q' value='");
                html_attr(ctx->qry.search);