| author | 2026-09-07 14:07:24 +0700 | |
|---|---|---|
| committer | 2026-09-07 14:35:13 +0700 | |
| commit | 8f95dce3ece6eccf240ed0b994fb267bf390bf30 (patch) | |
| tree | 35aeb1ecc32023777252954f7a984bce7bf47a40 /ui-diff.c | |
| parent | 61aa4378441859ed2851db01d5d1b01ed1aa2458 (diff) | |
| download | cgitext-8f95dce3ece6eccf240ed0b994fb267bf390bf30.tar.gz cgitext-8f95dce3ece6eccf240ed0b994fb267bf390bf30.zip | |
The diff controls panel mixed the from/to ref pickers with the
rendering options (context, space, mode). Split it into two panels,
stacked vertically: one for the refs and one for the other options,
so each groups related controls.
Diffstat (limited to 'ui-diff.c')
| -rw-r--r-- | ui-diff.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -370,12 +370,11 @@ void cgit_print_diff_ctrls(void) { int i, curr; - html("<div class='cgit-panel'>"); - html("<b>diff options</b>"); - html("<form method='get'>"); + html("<form class='diff-ctrls' method='get'>"); /* * Emit the same hidden fields as cgit_add_hidden_formfields(), except - * id/id2, which are carried by the ref-picker selects below. + * id/id2, which are carried by the ref-picker selects below. One + * form wraps both panels so any submission carries all controls. */ if (!ctx.cfg.virtual_root) { struct strbuf url = STRBUF_INIT; @@ -391,6 +390,8 @@ void cgit_print_diff_ctrls(void) if (ctx.qry.showmsg) html_hidden("showmsg", "1"); + html("<div class='cgit-panel'>"); + html("<b>diff refs</b>"); html("<table>"); html("<tr><td colspan='2'/></tr>"); @@ -409,6 +410,13 @@ void cgit_print_diff_ctrls(void) cgit_print_ref_select("id", new_ref); html("</td></tr>"); } + html("</table>"); + html("</div>"); + + html("<div class='cgit-panel'>"); + html("<b>diff options</b>"); + html("<table>"); + html("<tr><td colspan='2'/></tr>"); html("<tr>"); html("<td class='label'>context:</td>"); @@ -443,8 +451,8 @@ void cgit_print_diff_ctrls(void) html("<tr><td/><td class='ctrl'>"); html("<noscript><input type='submit' value='reload'/></noscript>"); html("</td></tr></table>"); - html("</form>"); html("</div>"); + html("</form>"); } void cgit_print_diff(const char *new_rev, const char *old_rev, |