Diffstat (limited to 'ui-diff.c')
| -rw-r--r-- | ui-diff.c | 26 |
1 files changed, 5 insertions, 21 deletions
@@ -370,11 +370,12 @@ void cgit_print_diff_ctrls(void) { int i, curr; - html("<form class='diff-ctrls' method='get'>"); + html("<div class='cgit-panel'>"); + html("<b>diff options</b>"); + html("<form method='get'>"); /* * Emit the same hidden fields as cgit_add_hidden_formfields(), except - * id/id2, which are carried by the ref-picker selects below. One - * form wraps both panels so any submission carries all controls. + * id/id2, which are carried by the ref-picker selects below. */ if (!ctx.cfg.virtual_root) { struct strbuf url = STRBUF_INIT; @@ -390,8 +391,6 @@ 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,22 +408,7 @@ void cgit_print_diff_ctrls(void) html("<td class='ctrl'>"); cgit_print_ref_select("id", new_ref); html("</td></tr>"); - - html("<tr><td/><td class='ctrl'>"); - cgit_diff_link("flip", "swap from and to", "button", - ctx.qry.head, - is_null_oid(old_rev_oid) ? NULL : - oid_to_hex(old_rev_oid), - new_ref, ctx.qry.path); - 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>"); @@ -459,8 +443,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("</div>"); html("</form>"); + html("</div>"); } void cgit_print_diff(const char *new_rev, const char *old_rev, |