forgejo/templates/repo/issue
jladbrook 891391689a
Update button is shown when a Pull Request is marked WIP - Issue #21740 (#22683)
Fix #21740.

Updated the Pull Request template so that the 'Update branch by merge'
button is visible for WIP PR's. Making the behaviour match a non WIP-PR.

Previous WIP page with changes pending on the branch:


![image](https://user-images.githubusercontent.com/1656302/215738307-e68a2f92-5ff8-4f48-a541-35ca81d1f1a4.png)

Updated UI adding the update button:


![image](https://user-images.githubusercontent.com/1656302/215737872-e0e9d712-b7aa-4b90-b7ed-6a92a14fc182.png)

## Notes

* have not removed the **$canAutoMerge** variable from the pull.tmpl on
this
[line](36dc11869d/templates/repo/issue/view_content/pull.tmpl (L131))
- doesn't appear to be used elsewhere but wasn't sure
* In order to avoid duplicating code corresponding UI code was added to
a new tmpl file, ```update_branch_by_merge.tmpl``` and is called in two
places from ```pull.tmpl```.

---------

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-03 14:24:45 +08:00
..
fields Support Issue forms and PR forms (#20987) 2022-09-02 15:58:49 +08:00
labels Optimize html templates (#22080) 2022-12-09 21:34:51 +08:00
view_content Update button is shown when a Pull Request is marked WIP - Issue #21740 (#22683) 2023-02-03 14:24:45 +08:00
branch_selector_field.tmpl Refactor i18n to locale (#20153) 2022-06-27 15:58:46 -05:00
choose.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
comment_tab.tmpl Support Issue forms and PR forms (#20987) 2022-09-02 15:58:49 +08:00
label_precolors.tmpl Fix purple color in suggested label colors (#18241) 2022-01-11 12:11:40 -06:00
labels.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
list.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
milestone_issues.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
milestone_new.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
milestones.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
navbar.tmpl Optimize html templates (#22080) 2022-12-09 21:34:51 +08:00
new.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
new_form.tmpl Do not add links to Posters or Assignees with ID < 0 (#20577) 2022-09-03 10:33:34 +01:00
openclose.tmpl Issues: add Project filter to issues list and search (#22544) 2023-01-29 11:45:29 +08:00
search.tmpl Issues: add Project filter to issues list and search (#22544) 2023-01-29 11:45:29 +08:00
view.tmpl Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
view_content.tmpl Change ID pattern of raw content container for issue (#21966) 2022-12-10 00:25:32 +08:00
view_title.tmpl Add code highlighting in issue titles (#21432) 2022-10-16 02:24:41 +08:00