| 1 | {{define "content"}}{{$d := .Data}}{{$page := $d.Page}} |
| 2 | {{template "back-nav" dict "Href" $page.Href "Label" $page.Label}} |
| 3 | {{template "page-header" dict "Title" "Choose what to keep" "Sub" "Someone saved this page while you were editing. Nothing of yours is lost: your text is kept until you choose."}} |
| 4 | <form rst-form method="post" action="/p/{{$page.Public}}/resolve" mapa-conflict><input type="hidden" name="grammar" value="{{grammar}}"> |
| 5 | <input type="hidden" name="current" value="{{$d.Conflict.Current}}"> |
| 6 | <input type="hidden" name="version" value="{{$d.Conflict.Version}}"> |
| 7 | {{if $d.Conflict.NoBase}} |
| 8 | <p>Your edit started from a version older than the 90-day history, so the two cannot be merged block by block. Here they are side by side.</p> |
| 9 | <div mapa-sides> |
| 10 | <section><h2>Yours</h2><pre mapa-source-text>{{$d.Conflict.Mine}}</pre></section> |
| 11 | <section><h2>Saved now</h2><pre mapa-source-text>{{$d.Conflict.Theirs}}</pre></section> |
| 12 | </div> |
| 13 | <fieldset mapa-choose><legend>Keep</legend> |
| 14 | <label mapa-choice><input type="radio" name="whole" value="mine" required> Yours, replacing what is saved now</label> |
| 15 | <label mapa-choice><input type="radio" name="whole" value="theirs"> What is saved now, discarding yours</label> |
| 16 | </fieldset> |
| 17 | {{else}} |
| 18 | <p>Blocks only one of you changed are already merged. Where you both changed the same block, choose.</p> |
| 19 | <article mapa-body> |
| 20 | {{range $d.Hunks}}{{if .Conflict}} |
| 21 | <fieldset mapa-hunk><legend>Both of you changed this</legend> |
| 22 | <label mapa-choice><input type="radio" name="choice-{{.Number}}" value="mine" required><span mapa-choice-body><strong>Yours</strong>{{.Mine}}</span></label> |
| 23 | <label mapa-choice><input type="radio" name="choice-{{.Number}}" value="theirs"><span mapa-choice-body><strong>Theirs</strong>{{.Theirs}}</span></label> |
| 24 | <label mapa-choice><input type="radio" name="choice-{{.Number}}" value="both"><span mapa-choice-body><strong>Both</strong>, yours first</span></label> |
| 25 | </fieldset> |
| 26 | {{else}}{{.HTML}}{{end}}{{end}} |
| 27 | </article> |
| 28 | {{end}} |
| 29 | {{template "form-foot" dict "Submit" "Save my choice" "CancelHref" $page.Href "CancelLabel" "Decide later"}} |
| 30 | </form> |
| 31 | {{end}} |
| 32 | |