Commit 29ab96c5 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Alain Takoudjou

NXD Show ICP on front page & on footer of every other pages

TODO detect whether request comes from China and only then show ICP (?).
parent 34948397
...@@ -200,4 +200,12 @@ module PageLayoutHelper ...@@ -200,4 +200,12 @@ module PageLayoutHelper
# Therefore, we need to process `original_fullpath` # Therefore, we need to process `original_fullpath`
request.original_fullpath.sub(request.path, '')[0] == '/' request.original_fullpath.sub(request.path, '')[0] == '/'
end end
def should_render_icp?
extra_config.has_key?('ICP')
# TODO render ICP only for requests from China
end
def render_icp
link_to extra_config.ICP, "http://www.miibeian.gov.cn/"
end end
...@@ -5,4 +5,6 @@ ...@@ -5,4 +5,6 @@
= link_to _("Explore"), explore_root_path = link_to _("Explore"), explore_root_path
= link_to _("Help"), help_path = link_to _("Help"), help_path
= link_to _("About GitLab"), "https://about.gitlab.com/" = link_to _("About GitLab"), "https://about.gitlab.com/"
- if should_render_icp?
= render_icp
= footer_message = footer_message
...@@ -33,3 +33,6 @@ ...@@ -33,3 +33,6 @@
= link_to "About GitLab", "https://about.gitlab.com/" = link_to "About GitLab", "https://about.gitlab.com/"
| |
= link_to "About Nexedi", "http://www.nexedi.com/" = link_to "About Nexedi", "http://www.nexedi.com/"
- if should_render_icp?
|
= render_icp
...@@ -1274,6 +1274,9 @@ production: &base ...@@ -1274,6 +1274,9 @@ production: &base
## https://docs.gitlab.com/ee/user/project/highlighting.html ## https://docs.gitlab.com/ee/user/project/highlighting.html
# maximum_text_highlight_size_kilobytes: 512 # maximum_text_highlight_size_kilobytes: 512
## Site ICP number
# ICP: '_your_site_icp_'
rack_attack: rack_attack:
git_basic_auth: git_basic_auth:
# Rack Attack IP banning enabled # Rack Attack IP banning enabled
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment