Replace render_ce to render in EE template
What does this MR do and why?
render_ce
.
For Upstream, there is no need to use In file ee/app/views/projects/_merge_request_settings.html.haml
, render_ce
and render
have the same effect,
because the template files here are all in the app
directory, and there is no template with the same name under ee
.
The result of find
below can prove that:
results of `find` command
cd gitlab
% find . -name '*merge_request_merge_method_settings*'
./app/views/projects/_merge_request_merge_method_settings.html.haml
% find . -name '*merge_request_merge_options_settings*'
./app/views/projects/_merge_request_merge_options_settings.html.haml
% find . -name '*merge_request_squash_options_settings*'
./app/views/projects/_merge_request_squash_options_settings.html.haml
% find . -name '*merge_request_merge_checks_settings*'
./app/views/projects/_merge_request_merge_checks_settings.html.haml
% find . -name '*merge_request_merge_commit_template*'
./app/views/projects/_merge_request_merge_commit_template.html.haml
find . -name '*merge_request_squash_commit_template*'
./app/views/projects/_merge_request_squash_commit_template.html.haml
% find . -name '*merge_request_target_project_settings*'
./app/views/projects/_merge_request_target_project_settings.html.haml
render
to override the template
For JH, must use Related JH MR: https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/1711/diffs
jh/app/views/projects/_merge_request_merge_method_settings.html.haml
= render_ee 'projects/merge_request_merge_method_settings', local_assigns
-# Other JH code ...
Use render
to allow JH to override the template file merge_request_merge_method_settings
and reuse it under JH dir.
See doc: https://docs.gitlab.com/ee/development/ee_features.html#using-render_ce
cc JH EM @mtan-gitlab
Screenshots or screen recordings
The project settings page is displayed normally.
http://127.0.0.1:3000/jashkenas/Underscore/-/settings/merge_requests
Before | After (No Changes) |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.